diff --git a/.gitignore b/.gitignore index a72fba43..9cc0a8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,9 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json node_modules # Build artifacts -dist/ +packages/react/dist +examples/minimal-ts-webpack/dist +tools/testing/dist build.tar.gz # TypeScript cache diff --git a/README.md b/README.md index afa1587b..140281c0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ rush install Build all packages: ``` rush build +./make-UI-compatible.sh ``` To run an individual package's `package.json` commands, use the `rushx` command from within that package's directory, e.g.: diff --git a/make-UI-compatible.sh b/make-UI-compatible.sh new file mode 100755 index 00000000..700679d7 --- /dev/null +++ b/make-UI-compatible.sh @@ -0,0 +1 @@ +sed -i '' 's|\"production\"!==process.env.NODE_ENV|true|g' ./packages/c2pa-wc/dist/components/Popover/popover.js \ No newline at end of file diff --git a/packages/c2pa-wc/dist/06170432.js b/packages/c2pa-wc/dist/06170432.js new file mode 100644 index 00000000..02d1a937 --- /dev/null +++ b/packages/c2pa-wc/dist/06170432.js @@ -0,0 +1 @@ +const e=e=>n=>"function"==typeof n?((e,n)=>(window.customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:i}=n;return{kind:t,elements:i,finisher(n){window.customElements.define(e,n)}}})(e,n);export{e as n}; diff --git a/packages/c2pa-wc/dist/12d8f3c3.js b/packages/c2pa-wc/dist/12d8f3c3.js new file mode 100644 index 00000000..ab0b46ab --- /dev/null +++ b/packages/c2pa-wc/dist/12d8f3c3.js @@ -0,0 +1 @@ +import{e as t}from"./b803f408.js";function r(r){return t({...r,state:!0})}export{r as t}; diff --git a/packages/c2pa-wc/dist/b803f408.js b/packages/c2pa-wc/dist/b803f408.js new file mode 100644 index 00000000..6992aaf7 --- /dev/null +++ b/packages/c2pa-wc/dist/b803f408.js @@ -0,0 +1 @@ +function e(e,t,r,i){var o,n=arguments.length,c=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(c=(n<3?o(c):n>3?o(t,r,c):o(t,r))||c);return n>3&&c&&Object.defineProperty(t,r,c),c}const t=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function r(e){return(r,i)=>void 0!==i?((e,t,r)=>{t.constructor.createProperty(r,e)})(e,r,i):t(e,r)}var i;null===(i=window.HTMLSlotElement)||void 0===i||i.prototype.assignedElements;export{e as __decorate,r as e}; diff --git a/packages/c2pa-wc/dist/badge.d.ts b/packages/c2pa-wc/dist/badge.d.ts new file mode 100644 index 00000000..796f9d34 --- /dev/null +++ b/packages/c2pa-wc/dist/badge.d.ts @@ -0,0 +1,12 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { L2Ingredient, L2ManifestStore } from 'c2pa'; +import { Badge } from './components/Thumbnail'; +export declare function getBadgeFromManifestStore(manifestStore?: L2ManifestStore | null): Badge; +export declare function getBadgeFromIngredient(ingredient: L2Ingredient): Badge; diff --git a/packages/c2pa-wc/dist/badge.js b/packages/c2pa-wc/dist/badge.js new file mode 100644 index 00000000..b5369a14 --- /dev/null +++ b/packages/c2pa-wc/dist/badge.js @@ -0,0 +1 @@ +function r(r){if(!r.hasManifest)return"none";switch(r.error){case"otgp":return"missing";case"error":return"alert";default:return"info"}}export{r as getBadgeFromIngredient}; diff --git a/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.d.ts b/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.d.ts new file mode 100644 index 00000000..6f6fbe8b --- /dev/null +++ b/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../Thumbnail'; +import '../PanelSection'; +declare global { + interface HTMLElementTagNameMap { + 'cai-assets-used-dm-plugin': AssetsUsed; + } + namespace JSX { + interface IntrinsicElements { + 'cai-assets-used-dm-plugin': any; + } + } +} +export interface AssetsUsedConfig { + stringMap: Record; +} +declare const AssetsUsed_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class AssetsUsed extends AssetsUsed_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.js b/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.js new file mode 100644 index 00000000..8530a57a --- /dev/null +++ b/packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.js @@ -0,0 +1,26 @@ +import{__decorate as o}from"../../b803f408.js";import{r as s,$ as i,s as t}from"../../e4c0417e.js";import{n as e}from"../../06170432.js";import{defaultStyles as r,baseSectionStyles as n}from"../../styles.js";import{getBadgeFromIngredient as l}from"../../badge.js";import{ConfigurablePanelSection as c}from"../../mixins/configurablePanelSection.js";import"../Thumbnail/Thumbnail.js";import"../PanelSection/PanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";const a={stringMap:{"assets-used.header":"Assets used","assets-used.helpText":"Any assets used or added to this content"}};let m=class extends(c(t,{dataSelector:o=>o.ingredients,isEmpty:o=>!o.length,config:a})){static get styles(){return[r,n,s` + .section-assets-used-dm-plugin { + --cai-thumbnail-size: 48px; + display: grid; + color: blue; + grid-template-columns: repeat( + auto-fill, + var(--cai-thumbnail-size, 48px) + ); + grid-gap: 10px; + text-align: left; + } + `]}render(){var o;return this.renderSection(i` +
+ ${null===(o=this._data)||void 0===o?void 0:o.map((o=>i` + + `))} +
+
`)}};m=o([e("cai-assets-used-dm-plugin")],m); diff --git a/packages/c2pa-wc/dist/components/AssetsUsed/index.d.ts b/packages/c2pa-wc/dist/components/AssetsUsed/index.d.ts new file mode 100644 index 00000000..b79176dc --- /dev/null +++ b/packages/c2pa-wc/dist/components/AssetsUsed/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './AssetsUsed'; diff --git a/packages/c2pa-wc/dist/components/AssetsUsed/index.js b/packages/c2pa-wc/dist/components/AssetsUsed/index.js new file mode 100644 index 00000000..333dc057 --- /dev/null +++ b/packages/c2pa-wc/dist/components/AssetsUsed/index.js @@ -0,0 +1 @@ +import"./AssetsUsed.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../badge.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Thumbnail/Thumbnail.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";import"../PanelSection/PanelSection.js"; diff --git a/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.d.ts b/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.d.ts new file mode 100644 index 00000000..d164fbe4 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright 2023 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../../../assets/svg/monochrome/generic-info.svg'; +import '../Icon'; +import '../PanelSection'; +declare global { + interface HTMLElementTagNameMap { + 'cai-content-summary-dm-plugin': ContentSummary; + } + namespace JSX { + interface IntrinsicElements { + 'cai-content-summary-dm-plugin': any; + } + } +} +export interface ContentSummaryConfig { + stringMap: Record; +} +declare const ContentSummary_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class ContentSummary extends ContentSummary_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.js b/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.js new file mode 100644 index 00000000..d7163870 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.js @@ -0,0 +1,21 @@ +import{__decorate as o}from"../../b803f408.js";import{s as i,r as n,$ as t}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{ConfigurablePanelSection as e}from"../../mixins/configurablePanelSection.js";import{defaultStyles as r,baseSectionStyles as c}from"../../styles.js";import"../../icons/monochrome/generic-info.js";import"../Icon/Icon.js";import"../PanelSection/PanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";const m={stringMap:{"content-summary.header":"Content summary","content-summary.content.aiGenerated":"This content was generated with an AI tool."}};let l=class extends(e(i,{dataSelector:o=>null==o?void 0:o.generativeInfo,config:m})){static get styles(){return[r,c,n` + .section-process-content-dm-plugin { + display: flex; + align-items: center; + } + .section-icon-content-dm-plugin { + display: flex; + align-items: flex-start; + gap: var(--cai-icon-spacing, 8px); + } + `]}render(){return this.renderSection(t` +
+ + + ${this._config.stringMap["content-summary.content.aiGenerated"]} + +
+
`)}};l=o([s("cai-content-summary-dm-plugin")],l); diff --git a/packages/c2pa-wc/dist/components/ContentSummary/index.d.ts b/packages/c2pa-wc/dist/components/ContentSummary/index.d.ts new file mode 100644 index 00000000..c076eeb2 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ContentSummary/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2023 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './ContentSummary'; diff --git a/packages/c2pa-wc/dist/components/ContentSummary/index.js b/packages/c2pa-wc/dist/components/ContentSummary/index.js new file mode 100644 index 00000000..919e1355 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ContentSummary/index.js @@ -0,0 +1 @@ +import"./ContentSummary.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../../styles.js";import"../../icons/monochrome/generic-info.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js"; diff --git a/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.d.ts b/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.d.ts new file mode 100644 index 00000000..7f2c4570 --- /dev/null +++ b/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../PanelSection'; +declare global { + interface HTMLElementTagNameMap { + 'cai-edits-and-activity-dm-plugin': EditsAndActivity; + } + namespace JSX { + interface IntrinsicElements { + 'cai-edits-and-activity-dm-plugin': any; + } + } +} +export interface EditsAndActivityConfig { + stringMap: Record; + showDescriptions: boolean; +} +declare const EditsAndActivity_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class EditsAndActivity extends EditsAndActivity_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.js b/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.js new file mode 100644 index 00000000..1a592e8c --- /dev/null +++ b/packages/c2pa-wc/dist/components/EditsAndActivity/EditsAndActivity.js @@ -0,0 +1,72 @@ +import{__decorate as i}from"../../b803f408.js";import{s as t,r as o,$ as s}from"../../e4c0417e.js";import{n}from"../../06170432.js";import{o as e}from"../Popover/Popover.js";import{defaultStyles as c,baseSectionStyles as l}from"../../styles.js";import{ConfigurablePanelSection as a}from"../../mixins/configurablePanelSection.js";import"../PanelSection/PanelSection.js";import"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import"../../mixins/configurable.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";const d={stringMap:{"edits-and-activity.header":"Edits and activity","edits-and-activity.helpText":"Changes and actions taken to produce this content"},showDescriptions:!1};let r=class extends(a(t,{dataSelector:i=>i.editsAndActivity,isEmpty:i=>!(null==i?void 0:i.length),config:d})){static get styles(){return[c,l,o` + .section-edits-and-activity-content-dm-plugin { + display: flex; + flex-direction: column; + } + + .section-edits-and-activity-list-dm-plugin { + display: flex; + flex-direction: column; + gap: var(--cai-edits-and-activity-item-spacing, 6px); + list-style: none; + padding: 0; + margin: 0; + overflow: hidden; + } + + .section-edits-and-activity-list-item-term-dm-plugin { + display: flex; + align-items: center; + } + + .section-edits-and-activity-list-item-icon-dm-plugin { + margin-right: 8px; + width: 16px; + } + + .section-edits-and-activity-list-item-label-dm-plugin { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .section-edits-and-activity-list-item-description-dm-plugin { + color: var(--cai-secondary-color); + margin-left: 0px; + } + + .section-edits-and-activity-list-item-description-dm-plugin.has-icon { + margin-left: 24px; + } + `]}render(){var i;return this.renderSection(s` + +
+ ${null===(i=this._data)||void 0===i?void 0:i.map((({icon:i,label:t,description:o})=>s` +
+
+ ${i?s`${t}`:null} + + ${t} + +
+ ${this._config.showDescriptions?s` +
+ ${o} +
+ `:null} +
+ `))} +
+
+ `)}};r=i([n("cai-edits-and-activity-dm-plugin")],r); diff --git a/packages/c2pa-wc/dist/components/EditsAndActivity/index.d.ts b/packages/c2pa-wc/dist/components/EditsAndActivity/index.d.ts new file mode 100644 index 00000000..da8ad082 --- /dev/null +++ b/packages/c2pa-wc/dist/components/EditsAndActivity/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './EditsAndActivity'; diff --git a/packages/c2pa-wc/dist/components/EditsAndActivity/index.js b/packages/c2pa-wc/dist/components/EditsAndActivity/index.js new file mode 100644 index 00000000..cdf07410 --- /dev/null +++ b/packages/c2pa-wc/dist/components/EditsAndActivity/index.js @@ -0,0 +1 @@ +import"./EditsAndActivity.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../Popover/Popover.js";import"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import"../../styles.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/Icon/Icon.d.ts b/packages/c2pa-wc/dist/components/Icon/Icon.d.ts new file mode 100644 index 00000000..175c3470 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Icon/Icon.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement, nothing, TemplateResult } from 'lit'; +import '../../../assets/svg/color/logos/adobe-stock.svg'; +import '../../../assets/svg/color/logos/adobe.svg'; +import '../../../assets/svg/color/logos/behance.svg'; +import '../../../assets/svg/color/logos/cai.svg'; +import '../../../assets/svg/color/logos/facebook.svg'; +import '../../../assets/svg/color/logos/instagram.svg'; +import '../../../assets/svg/color/logos/lightroom.svg'; +import '../../../assets/svg/color/logos/photoshop.svg'; +import '../../../assets/svg/color/logos/truepic.svg'; +import '../../../assets/svg/color/logos/twitter.svg'; +declare global { + interface HTMLElementTagNameMap { + 'cai-icon': Icon; + } + namespace JSX { + interface IntrinsicElements { + 'cai-icon': any; + } + } +} +export declare class Icon extends LitElement { + source: string; + static readonly matchers: { + pattern: RegExp; + icon: TemplateResult<1>; + }[]; + protected icon: TemplateResult | undefined; + updated(changedProperties: any): void; + static get styles(): import("lit").CSSResult[]; + render(): TemplateResult<1> | typeof nothing; +} diff --git a/packages/c2pa-wc/dist/components/Icon/Icon.js b/packages/c2pa-wc/dist/components/Icon/Icon.js new file mode 100644 index 00000000..0d0941cb --- /dev/null +++ b/packages/c2pa-wc/dist/components/Icon/Icon.js @@ -0,0 +1,13 @@ +import{__decorate as i,e as o}from"../../b803f408.js";import{$ as c,s as n,r as t,w as r}from"../../e4c0417e.js";import{n as a}from"../../06170432.js";import{t as s}from"../../12d8f3c3.js";import{defaultStyles as e}from"../../styles.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";var p;let m=p=class extends n{constructor(){super(...arguments),this.source=""}updated(i){var o;i.has("source")&&(this.icon=null===(o=p.matchers.find((({pattern:i})=>i.test(this.source))))||void 0===o?void 0:o.icon)}static get styles(){return[e,t` + :host { + max-height: var(--cai-icon-size, 16px); + } + #container-dm-plugin { + display: inline-block; + width: var(--cai-icon-size, 16px); + height: var(--cai-icon-size, 16px); + --cai-icon-width: var(--cai-icon-size, 16px); + --cai-icon-height: var(--cai-icon-size, 16px); + margin-right: var(--cai-icon-spacing, 8px); + } + `]}render(){return this.icon?c`
${this.icon}
`:r}};m.matchers=[{pattern:/photoshop/i,icon:c``},{pattern:/adobe\sstock/i,icon:c``},{pattern:/adobe/i,icon:c``},{pattern:/behance\.net/i,icon:c``},{pattern:/facebook\.com/i,icon:c``},{pattern:/instagram\.com/i,icon:c``},{pattern:/truepic/i,icon:c``},{pattern:/twitter\.com/i,icon:c``},{pattern:/lightroom/i,icon:c``}],i([o({type:String})],m.prototype,"source",void 0),i([s()],m.prototype,"icon",void 0),m=p=i([a("cai-icon")],m); diff --git a/packages/c2pa-wc/dist/components/Icon/index.d.ts b/packages/c2pa-wc/dist/components/Icon/index.d.ts new file mode 100644 index 00000000..89252fa3 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Icon/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './Icon'; diff --git a/packages/c2pa-wc/dist/components/Icon/index.js b/packages/c2pa-wc/dist/components/Icon/index.js new file mode 100644 index 00000000..17c66f85 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Icon/index.js @@ -0,0 +1 @@ +import"./Icon.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../12d8f3c3.js";import"../../styles.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/Indicator/Indicator.d.ts b/packages/c2pa-wc/dist/components/Indicator/Indicator.d.ts new file mode 100644 index 00000000..415159b6 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Indicator/Indicator.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../../../assets/svg/color/info.svg'; +declare global { + interface HTMLElementTagNameMap { + 'cai-indicator-dm-plugin': Indicator; + } + namespace JSX { + interface IntrinsicElements { + 'cai-indicator-dm-plugin': any; + } + } +} +declare type Variant = 'info-light' | 'info-dark' | 'warning' | 'error'; +export declare class Indicator extends LitElement { + /** + * Image source - if set to undefined/null it will show a broken image icon + */ + variant: Variant; + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/Indicator/Indicator.js b/packages/c2pa-wc/dist/components/Indicator/Indicator.js new file mode 100644 index 00000000..90b59c5f --- /dev/null +++ b/packages/c2pa-wc/dist/components/Indicator/Indicator.js @@ -0,0 +1,11 @@ +import{__decorate as i,e as r}from"../../b803f408.js";import{s as t,r as c,$ as n}from"../../e4c0417e.js";import{n as o}from"../../06170432.js";import"../../icons/color/info.js";import{defaultStyles as a}from"../../styles.js";let s=class extends t{constructor(){super(...arguments),this.variant="info-light"}static get styles(){return[a,c` + :host { + display: inline-block; + width: var(--cai-indicator-size, 24px); + height: var(--cai-indicator-size, 24px); + } + .icon { + --cai-icon-width: var(--cai-indicator-size, 24px); + --cai-icon-height: var(--cai-indicator-size, 24px); + } + `]}render(){switch(this.variant){case"warning":return n``;case"error":return n``}return n``}};i([r({type:String})],s.prototype,"variant",void 0),s=i([o("cai-indicator-dm-plugin")],s); diff --git a/packages/c2pa-wc/dist/components/Indicator/index.d.ts b/packages/c2pa-wc/dist/components/Indicator/index.d.ts new file mode 100644 index 00000000..4e8835f5 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Indicator/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './Indicator'; diff --git a/packages/c2pa-wc/dist/components/Indicator/index.js b/packages/c2pa-wc/dist/components/Indicator/index.js new file mode 100644 index 00000000..82cfb791 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Indicator/index.js @@ -0,0 +1 @@ +import"./Indicator.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../icons/color/info.js";import"../../styles.js"; diff --git a/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.d.ts b/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.d.ts new file mode 100644 index 00000000..9e852adf --- /dev/null +++ b/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.d.ts @@ -0,0 +1,51 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import { L2ManifestStore } from 'c2pa'; +import type { EditsAndActivityConfig } from '../EditsAndActivity'; +import type { MinimumViableProvenanceConfig } from '../MinimumViableProvenance'; +import '../ContentSummary'; +import '../AssetsUsed'; +import '../ProducedBy'; +import '../ProducedWith'; +import '../SocialMedia'; +import '../EditsAndActivity'; +import '../MinimumViableProvenance'; +declare global { + interface HTMLElementTagNameMap { + 'cai-manifest-summary-dm-plugin': ManifestSummary; + } + namespace JSX { + interface IntrinsicElements { + 'cai-manifest-summary-dm-plugin': any; + } + } +} +export interface ManifestSummaryConfig extends Pick, Pick { + stringMap: Record; + sections?: { + assetsUsed?: boolean; + editsAndActivity?: boolean; + producedBy?: boolean; + producedWith?: boolean; + socialMedia?: boolean; + contentSummary?: boolean; + }; +} +declare const ManifestSummary_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface) & typeof LitElement; +export declare class ManifestSummary extends ManifestSummary_base { + static readonly cssParts: { + viewMore: string; + }; + static get styles(): import("lit").CSSResult[]; + manifestStore: L2ManifestStore | undefined; + viewMoreUrl: string; + render(): import("lit-html").TemplateResult<1> | null; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.js b/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.js new file mode 100644 index 00000000..aa966fe7 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ManifestSummary/ManifestSummary.js @@ -0,0 +1,127 @@ +import{__decorate as i,e as o}from"../../b803f408.js";import{r as t,$ as e,w as r,s as n}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{defaultStyles as a}from"../../styles.js";import{hasChanged as m,defaultDateFormatter as c}from"../../utils.js";import{Configurable as d}from"../../mixins/configurable.js";import"../ContentSummary/ContentSummary.js";import"../AssetsUsed/AssetsUsed.js";import"../ProducedBy/ProducedBy.js";import"../ProducedWith/ProducedWith.js";import"../SocialMedia/SocialMedia.js";import"../EditsAndActivity/EditsAndActivity.js";import"../MinimumViableProvenance/MinimumViableProvenance.js";import"../../12d8f3c3.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/panelSection.js";import"../../icons/monochrome/generic-info.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../../badge.js";import"../Thumbnail/Thumbnail.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";var l;const p={stringMap:{"manifest-summary.viewMore":"View more","manifest-summary.error":"Content Credentials unavailable or invalid"},dateFormatter:c,showDescriptions:!0,sections:{assetsUsed:!0,editsAndActivity:!0,producedBy:!0,producedWith:!0,socialMedia:!0,contentSummary:!0}};let u=l=class extends(d(n,p)){constructor(){super(...arguments),this.viewMoreUrl=""}static get styles(){return[a,t` + #container-dm-plugin { + width: var(--cai-manifest-summary-width, 320px); + } + + #content-container-dm-plugin { + padding: var(--cai-manifest-summary-content-padding, 20px); + max-height: var(--cai-manifest-summary-content-max-height, 550px); + border-bottom-width: var( + --cai-manifest-summary-content-border-bottom-width, + 1px + ); + border-bottom-style: var( + --cai-manifest-summary-content-border-bottom-style, + solid + ); + border-bottom-color: var( + --cai-manifest-summary-content-border-bottom-color, + #e1e1e1 + ); + + overflow-y: auto; + overflow-x: hidden; + } + + #content-container-dm-plugin > *:not(:first-child):not([empty]), + ::slotted(*) { + padding-top: var(--cai-manifest-summary-section-spacing, 20px); + margin-top: var(--cai-manifest-summary-section-spacing, 20px); + border-top-width: var( + --cai-manifest-summary-section-border-width, + 1px + ) !important; + border-top-style: var( + --cai-manifest-summary-section-border-style, + solid + ) !important; + border-top-color: var( + --cai-manifest-summary-section-border-color, + #e1e1e1 + ) !important; + } + + #view-more-container-dm-plugin { + padding: var(--cai-manifest-summary-view-more-padding, 20px); + } + + #view-more-dm-plugin { + display: block; + transition: all 150ms ease-in-out; + background-color: transparent; + border-radius: 9999px; + border: 2px solid #b3b3b3; + padding: 8px 0; + font-weight: bold; + text-align: center; + text-decoration: none; + width: 100%; + color: var(--cai-primary-color); + } + + #view-more-dm-plugin:hover { + background-color: #eeeeee; + } + `]}render(){var i,o,t,n,s,a,m,c,d,p,u,g;return this.manifestStore?e`
+
+ + + ${"error"===this.manifestStore.error?e` +
${this._config.stringMap["manifest-summary.error"]}
+ `:e` + ${(null===(o=null===(i=this._config)||void 0===i?void 0:i.sections)||void 0===o?void 0:o.contentSummary)?e` + + `:r} + ${(null===(n=null===(t=this._config)||void 0===t?void 0:t.sections)||void 0===n?void 0:n.producedBy)?e` + + `:r} + ${(null===(a=null===(s=this._config)||void 0===s?void 0:s.sections)||void 0===a?void 0:a.producedWith)?e` + + `:r} + ${(null===(c=null===(m=this._config)||void 0===m?void 0:m.sections)||void 0===c?void 0:c.editsAndActivity)?e` + + `:r} + ${(null===(p=null===(d=this._config)||void 0===d?void 0:d.sections)||void 0===p?void 0:p.assetsUsed)?e` + + `:r} + ${(null===(g=null===(u=this._config)||void 0===u?void 0:u.sections)||void 0===g?void 0:g.socialMedia)?e` + + `:r} + `} + + +
+ +
`:null}};u.cssParts={viewMore:"manifest-summary-view-more"},i([o({type:Object,hasChanged:m})],u.prototype,"manifestStore",void 0),i([o({type:String,attribute:"view-more-url"})],u.prototype,"viewMoreUrl",void 0),u=l=i([s("cai-manifest-summary-dm-plugin")],u); diff --git a/packages/c2pa-wc/dist/components/ManifestSummary/index.d.ts b/packages/c2pa-wc/dist/components/ManifestSummary/index.d.ts new file mode 100644 index 00000000..a361ba3a --- /dev/null +++ b/packages/c2pa-wc/dist/components/ManifestSummary/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './ManifestSummary'; diff --git a/packages/c2pa-wc/dist/components/ManifestSummary/index.js b/packages/c2pa-wc/dist/components/ManifestSummary/index.js new file mode 100644 index 00000000..98240ad0 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ManifestSummary/index.js @@ -0,0 +1 @@ +import"./ManifestSummary.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../utils.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../ContentSummary/ContentSummary.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/panelSection.js";import"../../icons/monochrome/generic-info.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../AssetsUsed/AssetsUsed.js";import"../../badge.js";import"../Thumbnail/Thumbnail.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";import"../ProducedBy/ProducedBy.js";import"../ProducedWith/ProducedWith.js";import"../SocialMedia/SocialMedia.js";import"../EditsAndActivity/EditsAndActivity.js";import"../MinimumViableProvenance/MinimumViableProvenance.js"; diff --git a/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.d.ts b/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.d.ts new file mode 100644 index 00000000..618e95e9 --- /dev/null +++ b/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { L2ManifestStore } from 'c2pa'; +import { LitElement } from 'lit'; +import '../PanelSection'; +declare global { + interface HTMLElementTagNameMap { + 'cai-minimum-viable-provenance-dm-plugin': MinimumViableProvenance; + } + namespace JSX { + interface IntrinsicElements { + 'cai-minimum-viable-provenance-dm-plugin': any; + } + } +} +export interface MinimumViableProvenanceConfig { + stringMap: Record; + dateFormatter: (date: Date) => string; +} +declare const MinimumViableProvenance_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface) & typeof LitElement; +export declare class MinimumViableProvenance extends MinimumViableProvenance_base { + manifestStore: L2ManifestStore | undefined; + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.js b/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.js new file mode 100644 index 00000000..7828318c --- /dev/null +++ b/packages/c2pa-wc/dist/components/MinimumViableProvenance/MinimumViableProvenance.js @@ -0,0 +1,51 @@ +import{__decorate as e,e as t}from"../../b803f408.js";import{r as i,$ as n,w as r,s as o}from"../../e4c0417e.js";import{n as a}from"../../06170432.js";import{defaultDateFormatter as l}from"../../utils.js";import{Configurable as s}from"../../mixins/configurable.js";import{defaultStyles as m,baseSectionStyles as u}from"../../styles.js";import{o as c}from"../Popover/Popover.js";import"../PanelSection/PanelSection.js";import"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import"../Tooltip/Tooltip.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";function d(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function p(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function g(e){p(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function v(e){return p(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}var f={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},h=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,b=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,N=/^([+-])(\d{2})(?::?(\d{2}))?$/;function D(e){var t,i={},n=e.split(f.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],f.timeZoneDelimiter.test(i.date)&&(i.date=e.split(f.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var r=f.timezone.exec(t);r?(i.time=t.replace(r[1],""),i.timezone=r[1]):i.time=t}return i}function j(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((n[1]||n[2]).length)}}function w(e,t){if(null===t)return new Date(NaN);var i=e.match(h);if(!i)return new Date(NaN);var n=!!i[4],r=y(i[1]),o=y(i[2])-1,a=y(i[3]),l=y(i[4]),s=y(i[5])-1;if(n)return function(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}(0,l,s)?function(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var r=n.getUTCDay()||7,o=7*(t-1)+i+1-r;return n.setUTCDate(n.getUTCDate()+o),n}(t,l,s):new Date(NaN);var m=new Date(0);return function(e,t,i){return t>=0&&t<=11&&i>=1&&i<=($[t]||(C(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(C(e)?366:365)}(t,r)?(m.setUTCFullYear(t,o,Math.max(r,a)),m):new Date(NaN)}function y(e){return e?parseInt(e):1}function T(e){var t=e.match(b);if(!t)return NaN;var i=S(t[1]),n=S(t[2]),r=S(t[3]);return function(e,t,i){if(24===e)return 0===t&&0===i;return i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}(i,n,r)?36e5*i+6e4*n+1e3*r:NaN}function S(e){return e&&parseFloat(e.replace(",","."))||0}function x(e){if("Z"===e)return 0;var t=e.match(N);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?i*(36e5*n+6e4*r):NaN}var $=[31,null,31,30,31,30,31,31,30,31,30,31];function C(e){return e%400==0||e%4==0&&e%100!=0}const U={stringMap:{"minimum-viable-provenance.header":"Content Credentials","minimum-viable-provenance.helpText":"Attribution and history data attached to this content","minimum-viable-provenance.invalidDate":"Invalid date"},dateFormatter:l};let M=class extends(s(o,U)){static get styles(){return[m,u,i` + .minimum-viable-provenance-content-dm-plugin { + --cai-thumbnail-size: 48px; + display: grid; + grid-template-columns: 48px auto; + grid-gap: 2px 10px; + text-align: left; + } + .minimum-viable-provenance-thumbnail-dm-plugin { + grid-column: 1; + grid-row: 1 / 3; + } + .minimum-viable-provenance-signer-dm-plugin { + grid-column: 2; + grid-row: 1; + align-self: flex-end; + display: grid; + grid-template-columns: min-content max-content; + align-items: center; + } + .minimum-viable-provenance-signer-dm-plugin.no-date { + grid-row: span 2; + height: 100%; + } + .minimum-viable-provenance-date-dm-plugin { + grid-column: 2; + grid-row: 2; + color: var(--cai-secondary-color, #6e6e6e); + `]}render(){var e,t,i,o,a,l,s,m,u,f,h;const b="error"===(null===(e=this.manifestStore)||void 0===e?void 0:e.error),N={"minimum-viable-provenance-signer-dm-plugin":!0,"no-date":b},y=(null===(i=null===(t=this.manifestStore)||void 0===t?void 0:t.signature)||void 0===i?void 0:i.isoDateString)?function(e,t){p(1,arguments);var i=t||{},n=null==i.additionalDigits?2:d(i.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=D(e);if(o.date){var a=j(o.date,n);r=w(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var l,s=r.getTime(),m=0;if(o.time&&(m=T(o.time),isNaN(m)))return new Date(NaN);if(!o.timezone){var u=new Date(s+m),c=new Date(0);return c.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),c.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),c}return l=x(o.timezone),isNaN(l)?new Date(NaN):new Date(s+m+l)}(null===(o=this.manifestStore)||void 0===o?void 0:o.signature.isoDateString):void 0;return n` +
+ +
+ + ${null===(u=null===(m=this.manifestStore)||void 0===m?void 0:m.signature)||void 0===u?void 0:u.issuer} +
+ ${b?r:n` +
+ ${function(e){if(p(1,arguments),!v(e)&&"number"!=typeof e)return!1;var t=g(e);return!isNaN(Number(t))}(y)?n`${null===(f=this._config)||void 0===f?void 0:f.dateFormatter(y)}`:n`${null===(h=this._config)||void 0===h?void 0:h.stringMap["minimum-viable-provenance.invalidDate"]}`} +
+ `} +
+
`}};e([t({type:Object})],M.prototype,"manifestStore",void 0),M=e([a("cai-minimum-viable-provenance-dm-plugin")],M); diff --git a/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.d.ts b/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.d.ts new file mode 100644 index 00000000..8f2a187c --- /dev/null +++ b/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './MinimumViableProvenance'; diff --git a/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.js b/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.js new file mode 100644 index 00000000..591e6999 --- /dev/null +++ b/packages/c2pa-wc/dist/components/MinimumViableProvenance/index.js @@ -0,0 +1 @@ +import"./MinimumViableProvenance.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../utils.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../styles.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/PanelSection/PanelSection.d.ts b/packages/c2pa-wc/dist/components/PanelSection/PanelSection.d.ts new file mode 100644 index 00000000..67684e05 --- /dev/null +++ b/packages/c2pa-wc/dist/components/PanelSection/PanelSection.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../Tooltip'; +declare global { + interface HTMLElementTagNameMap { + 'cai-panel-section-dm-plugin': PanelSection; + } + namespace JSX { + interface IntrinsicElements { + 'cai-panel-section-dm-plugin': any; + } + } +} +export declare class PanelSection extends LitElement { + header: string; + helpText: string | null; + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<1>; +} diff --git a/packages/c2pa-wc/dist/components/PanelSection/PanelSection.js b/packages/c2pa-wc/dist/components/PanelSection/PanelSection.js new file mode 100644 index 00000000..6d647d70 --- /dev/null +++ b/packages/c2pa-wc/dist/components/PanelSection/PanelSection.js @@ -0,0 +1,32 @@ +import{__decorate as o,e as t}from"../../b803f408.js";import{s as i,r as s,$ as e,w as r}from"../../e4c0417e.js";import{n as l}from"../../06170432.js";import{defaultStyles as c,baseSectionStyles as n}from"../../styles.js";import"../Tooltip/Tooltip.js";import"../../12d8f3c3.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";let p=class extends i{constructor(){super(...arguments),this.header="",this.helpText=null}static get styles(){return[c,n,s` + div.layout { + display: grid; + grid-template-columns: auto; + grid-template-rows: auto; + gap: var(--cai-panel-section-internal-spacing, 0.5rem); + } + div.heading { + display: flex; + align-items: center; + justify-content: space-between; + } + div.heading-text { + color: var( + --cai-panel-section-heading-color, + var(--cai-primary-color) + ); + font-weight: var(--cai-panel-section-heading-font-weight, bold); + } + `]}render(){return e` +
+
+
${this.header}
+ + ${this.helpText?e` +
${this.helpText}
+
`:r} +
+
+ +
+ `}};o([t({type:String})],p.prototype,"header",void 0),o([t({type:String})],p.prototype,"helpText",void 0),p=o([l("cai-panel-section-dm-plugin")],p); diff --git a/packages/c2pa-wc/dist/components/PanelSection/index.d.ts b/packages/c2pa-wc/dist/components/PanelSection/index.d.ts new file mode 100644 index 00000000..d2ca75bc --- /dev/null +++ b/packages/c2pa-wc/dist/components/PanelSection/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './PanelSection'; diff --git a/packages/c2pa-wc/dist/components/PanelSection/index.js b/packages/c2pa-wc/dist/components/PanelSection/index.js new file mode 100644 index 00000000..50c94239 --- /dev/null +++ b/packages/c2pa-wc/dist/components/PanelSection/index.js @@ -0,0 +1 @@ +import"./PanelSection.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../Tooltip/Tooltip.js";import"../../12d8f3c3.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/Popover/Popover.d.ts b/packages/c2pa-wc/dist/components/Popover/Popover.d.ts new file mode 100644 index 00000000..3ce691ae --- /dev/null +++ b/packages/c2pa-wc/dist/components/Popover/Popover.d.ts @@ -0,0 +1,54 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { autoPlacement, flip, offset, Placement, shift, Strategy } from '@floating-ui/dom'; +import { LitElement, PropertyValueMap } from 'lit'; +import '../../../assets/svg/monochrome/help.svg'; +declare global { + interface HTMLElementTagNameMap { + 'cai-popover-dm-plugin': Popover; + } + namespace JSX { + interface IntrinsicElements { + 'cai-popover-dm-plugin': any; + } + } +} +export declare class Popover extends LitElement { + private _updateCleanupFn; + private _eventCleanupFns; + private positionConfig; + protected _isShown: boolean; + animationDuration: number; + placement: Placement; + strategy: Strategy; + arrow: boolean; + flip: Parameters[0]; + autoPlacement: Parameters[0]; + offset: Parameters[0]; + shift: Parameters[0]; + inline: boolean; + interactive: boolean; + trigger: string; + zIndex: number; + arrowElement: HTMLElement | undefined; + contentElement: HTMLElement | undefined; + hostElement: HTMLElement | undefined; + triggerElement: HTMLElement | undefined; + protected updated(_changedProperties: PropertyValueMap | Map): void; + static get styles(): import("lit").CSSResult[]; + private _showTooltip; + private _hideTooltip; + private _cleanupTriggers; + private _setTriggers; + private _updatePosition; + private computeArrowStyle; + firstUpdated(): void; + disconnectedCallback(): void; + render(): import("lit-html").TemplateResult<1>; +} diff --git a/packages/c2pa-wc/dist/components/Popover/Popover.js b/packages/c2pa-wc/dist/components/Popover/Popover.js new file mode 100644 index 00000000..fcb3a9d7 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Popover/Popover.js @@ -0,0 +1,61 @@ +import{__decorate as t,e}from"../../b803f408.js";import{b as i,w as n,s as o,r as s,$ as r}from"../../e4c0417e.js";import{n as l}from"../../06170432.js";import{t as a}from"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import{defaultStyles as c}from"../../styles.js";function h(t,e){return(({finisher:t,descriptor:e})=>(i,n)=>{var o;if(void 0===n){const n=null!==(o=i.originalKey)&&void 0!==o?o:i.key,s=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(s.finisher=function(e){t(e,n)}),s}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(o,n)}})({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})}const d=1,u=2,f=t=>(...e)=>({_$litDirective$:t,values:e});class p{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const m=f(class extends p{constructor(t){var e;if(super(t),t.type!==d||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var n,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(n=this.st)||void 0===n?void 0:n.has(t))&&this.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return i}});function v(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function y(t){return["top","bottom"].includes(v(t))?"x":"y"}function w(t){return"y"===t?"height":"width"}function b(t,e,i){let{reference:n,floating:o}=t;const s=n.x+n.width/2-o.width/2,r=n.y+n.height/2-o.height/2,l=y(e),a=w(l),c=n[a]/2-o[a]/2,h="x"===l;let d;switch(v(e)){case"top":d={x:s,y:n.y-o.height};break;case"bottom":d={x:s,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:r};break;case"left":d={x:n.x-o.width,y:r};break;default:d={x:n.x,y:n.y}}switch(g(e)){case"start":d[l]-=c*(i&&h?-1:1);break;case"end":d[l]+=c*(i&&h?-1:1)}return d}function x(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function A(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function _(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:u=!1,padding:f=0}=e,p=x(f),m=l[u?"floating"===d?"reference":"floating":d],v=A(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:h,strategy:a})),g=A(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...r.floating,x:n,y:o}:r.reference,offsetParent:await(null==s.getOffsetParent?void 0:s.getOffsetParent(l.floating)),strategy:a}):r[d]);return{top:v.top-g.top+p.top,bottom:g.bottom-v.bottom+p.bottom,left:v.left-g.left+p.left,right:g.right-v.right+p.right}}const E=Math.min,O=Math.max;function $(t,e,i){return O(t,E(e,i))}const C={left:"right",right:"left",bottom:"top",top:"bottom"};function R(t){return t.replace(/left|right|bottom|top/g,(t=>C[t]))}function T(t,e,i){void 0===i&&(i=!1);const n=g(t),o=y(t),s=w(o);let r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=R(r)),{main:r,cross:R(r)}}const L={start:"end",end:"start"};function P(t){return t.replace(/start|end/g,(t=>L[t]))}const S=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const k=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,n,o,s,r;const{x:l,y:a,rects:c,middlewareData:h,placement:d,platform:u,elements:f}=e,{alignment:p=null,allowedPlacements:m=S,autoAlignment:y=!0,...w}=t,b=function(t,e,i){return(t?[...i.filter((e=>g(e)===t)),...i.filter((e=>g(e)!==t))]:i.filter((t=>v(t)===t))).filter((i=>!t||g(i)===t||!!e&&P(i)!==i))}(p,y,m),x=await _(e,w),A=null!=(i=null==(n=h.autoPlacement)?void 0:n.index)?i:0,E=b[A];if(null==E)return{};const{main:O,cross:$}=T(E,c,await(null==u.isRTL?void 0:u.isRTL(f.floating)));if(d!==E)return{x:l,y:a,reset:{placement:b[0]}};const C=[x[v(E)],x[O],x[$]],R=[...null!=(o=null==(s=h.autoPlacement)?void 0:s.overflows)?o:[],{placement:E,overflows:C}],L=b[A+1];if(L)return{data:{index:A+1,overflows:R},reset:{placement:L}};const k=R.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),j=null==(r=k.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:r.placement,N=null!=j?j:k[0].placement;return N!==d?{data:{index:A+1,overflows:R},reset:{placement:N}}:{}}}};const j=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:n,middlewareData:o,rects:s,initialPlacement:r,platform:l,elements:a}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",flipAlignment:f=!0,...p}=t,m=v(n),g=d||(m===r||!f?[R(r)]:function(t){const e=R(t);return[P(t),e,P(e)]}(r)),y=[r,...g],w=await _(e,p),b=[];let x=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&b.push(w[m]),h){const{main:t,cross:e}=T(n,s,await(null==l.isRTL?void 0:l.isRTL(a.floating)));b.push(w[t],w[e])}if(x=[...x,{placement:n,overflows:b}],!b.every((t=>t<=0))){var A,E;const t=(null!=(A=null==(E=o.flip)?void 0:E.index)?A:0)+1,e=y[t];if(e)return{data:{index:t,overflows:x},reset:{placement:e}};let i="bottom";switch(u){case"bestFit":{var O;const t=null==(O=x.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:O[0].placement;t&&(i=t);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}};const N=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:n}=e,o=await async function(t,e){const{placement:i,platform:n,elements:o}=t,s=await(null==n.isRTL?void 0:n.isRTL(o.floating)),r=v(i),l=g(i),a="x"===y(i),c=["left","top"].includes(r)?-1:1,h=s&&a?-1:1,d="function"==typeof e?e(t):e;let{mainAxis:u,crossAxis:f,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof p&&(f="end"===l?-1*p:p),a?{x:f*h,y:u*c}:{x:u*c,y:f*h}}(e,t);return{x:i+o.x,y:n+o.y,data:o}}}};function D(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function F(t){if(null==t)return window;if(!D(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function z(t){return F(t).getComputedStyle(t)}function H(t){return D(t)?"":t?(t.nodeName||"").toLowerCase():""}function M(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function W(t){return t instanceof F(t).HTMLElement}function I(t){return t instanceof F(t).Element}function V(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof F(t).ShadowRoot||t instanceof ShadowRoot}function U(t){const{overflow:e,overflowX:i,overflowY:n}=z(t);return/auto|scroll|overlay|hidden/.test(e+n+i)}function B(t){return["table","td","th"].includes(H(t))}function q(t){const e=/firefox/i.test(M()),i=z(t);return"none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||["transform","perspective"].includes(i.willChange)||e&&"filter"===i.willChange||e&&!!i.filter&&"none"!==i.filter}function K(){return!/^((?!chrome|android).)*safari/i.test(M())}const X=Math.min,Y=Math.max,Q=Math.round;function Z(t,e,i){var n,o,s,r;void 0===e&&(e=!1),void 0===i&&(i=!1);const l=t.getBoundingClientRect();let a=1,c=1;e&&W(t)&&(a=t.offsetWidth>0&&Q(l.width)/t.offsetWidth||1,c=t.offsetHeight>0&&Q(l.height)/t.offsetHeight||1);const h=I(t)?F(t):window,d=!K()&&i,u=(l.left+(d&&null!=(n=null==(o=h.visualViewport)?void 0:o.offsetLeft)?n:0))/a,f=(l.top+(d&&null!=(s=null==(r=h.visualViewport)?void 0:r.offsetTop)?s:0))/c,p=l.width/a,m=l.height/c;return{width:p,height:m,top:f,right:u+p,bottom:f+m,left:u,x:u,y:f}}function G(t){return(e=t,(e instanceof F(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function J(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function tt(t){return Z(G(t)).left+J(t).scrollLeft}function et(t,e,i){const n=W(e),o=G(e),s=Z(t,n&&function(t){const e=Z(t);return Q(e.width)!==t.offsetWidth||Q(e.height)!==t.offsetHeight}(e),"fixed"===i);let r={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&"fixed"!==i)if(("body"!==H(e)||U(o))&&(r=J(e)),W(e)){const t=Z(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=tt(o));return{x:s.left+r.scrollLeft-l.x,y:s.top+r.scrollTop-l.y,width:s.width,height:s.height}}function it(t){return"html"===H(t)?t:t.assignedSlot||t.parentNode||(V(t)?t.host:null)||G(t)}function nt(t){return W(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function ot(t){const e=F(t);let i=nt(t);for(;i&&B(i)&&"static"===getComputedStyle(i).position;)i=nt(i);return i&&("html"===H(i)||"body"===H(i)&&"static"===getComputedStyle(i).position&&!q(i))?e:i||function(t){let e=it(t);for(V(e)&&(e=e.host);W(e)&&!["html","body"].includes(H(e));){if(q(e))return e;e=e.parentNode}return null}(t)||e}function st(t){if(W(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=Z(t);return{width:e.width,height:e.height}}function rt(t){const e=it(t);return["html","body","#document"].includes(H(e))?t.ownerDocument.body:W(e)&&U(e)?e:rt(e)}function lt(t,e){var i;void 0===e&&(e=[]);const n=rt(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=F(n),r=o?[s].concat(s.visualViewport||[],U(n)?n:[]):n,l=e.concat(r);return o?l:l.concat(lt(r))}function at(t,e,i){return"viewport"===e?A(function(t,e){const i=F(t),n=G(t),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const t=K();(t||!t&&"fixed"===e)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}(t,i)):I(e)?function(t,e){const i=Z(t,!1,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e,i):A(function(t){var e;const i=G(t),n=J(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=Y(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=Y(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-n.scrollLeft+tt(t);const a=-n.scrollTop;return"rtl"===z(o||i).direction&&(l+=Y(i.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:l,y:a}}(G(t)))}function ct(t){const e=lt(t),i=["absolute","fixed"].includes(z(t).position)&&W(t)?ot(t):t;return I(i)?e.filter((t=>I(t)&&function(t,e){const i=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(i&&V(i)){let i=e;do{if(i&&t===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(t,i)&&"body"!==H(t))):[]}const ht={getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const s=[..."clippingAncestors"===i?ct(e):[].concat(i),n],r=s[0],l=s.reduce(((t,i)=>{const n=at(e,i,o);return t.top=Y(n.top,t.top),t.right=X(n.right,t.right),t.bottom=X(n.bottom,t.bottom),t.left=Y(n.left,t.left),t}),at(e,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:n}=t;const o=W(i),s=G(i);if(i===s)return e;let r={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==n)&&(("body"!==H(i)||U(s))&&(r=J(i)),W(i))){const t=Z(i,!0);l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{...e,x:e.x-r.scrollLeft+l.x,y:e.y-r.scrollTop+l.y}},isElement:I,getDimensions:st,getOffsetParent:ot,getDocumentElement:G,getElementRects:t=>{let{reference:e,floating:i,strategy:n}=t;return{reference:et(e,ot(i),n),floating:{...st(i),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===z(t).direction};const dt=(t,e,i)=>(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=await(null==r.isRTL?void 0:r.isRTL(e));if(true&&(null==r&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),s.filter((t=>{let{name:e}=t;return"autoPlacement"===e||"flip"===e})).length>1))throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let a=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:h}=b(a,n,l),d=n,u={},f=0;for(let i=0;i50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(a=!0===w.rects?await r.getElementRects({reference:t,floating:e,strategy:o}):w.rects),({x:c,y:h}=b(a,d,l))),i=-1)}return{x:c,y:h,placement:d,strategy:o,middlewareData:u}})(t,e,{platform:ht,...i}),ut=(t,e)=>{var i,n;const o=t._$AN;if(void 0===o)return!1;for(const t of o)null===(n=(i=t)._$AO)||void 0===n||n.call(i,e,!1),ut(t,e);return!0},ft=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},pt=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),gt(e)}};function mt(t){void 0!==this._$AN?(ft(this),this._$AM=t,pt(this)):this._$AM=t}function vt(t,e=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=i;t{var e,i,n,o;t.type==u&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=vt),null!==(i=(o=t)._$AQ)&&void 0!==i||(o._$AQ=mt))};class yt extends p{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),pt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(ut(this,t),ft(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const wt=new WeakMap;let bt=0;const xt=new Map,At=new WeakSet,_t=()=>new Promise((t=>requestAnimationFrame(t))),Et=(t,e)=>{const i=t-e;return 0===i?void 0:i},Ot=(t,e)=>{const i=t/e;return 1===i?void 0:i},$t={left:(t,e)=>{const i=Et(t,e);return{value:i,transform:i&&`translateX(${i}px)`}},top:(t,e)=>{const i=Et(t,e);return{value:i,transform:i&&`translateY(${i}px)`}},width:(t,e)=>{const i=Ot(t,e);return{value:i,transform:i&&`scaleX(${i})`}},height:(t,e)=>{const i=Ot(t,e);return{value:i,transform:i&&`scaleY(${i})`}}},Ct={duration:333,easing:"ease-in-out"},Rt=["left","top","width","height","opacity","color","background"],Tt=new WeakMap;const Lt=f(class extends yt{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===u)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return n}getController(){return wt.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var i;const n=void 0===this.l;return n&&(this.l=null===(i=t.options)||void 0===i?void 0:i.host,this.l.addController(this),this.element=t.element,Tt.set(this.element,this)),this.optionsOrCallback=e,(n||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,i;t=null!=t?t:{};const n=this.getController();void 0!==n&&((t={...n.defaultOptions,...t}).keyframeOptions={...n.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(i=t).properties)&&void 0!==e||(i.properties=Rt),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((n=>{var o;const s=null!==(o=e[n])&&void 0!==o?o:$t[n]?void 0:i[n],r=Number(s);t[n]=isNaN(r)?s+"":r})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,i)=>t===e[i])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await _t;const e=this.A(),i=this._(this.options.keyframeOptions,e),n=this.v();if(void 0!==this.g){const{from:i,to:o}=this.j(this.g,n,e);this.log("measured",[this.g,n,i,o]),t=this.calculateKeyframes(i,o)}else{const i=xt.get(this.options.inId);if(i){xt.delete(this.options.inId);const{from:o,to:s}=this.j(i,n,e);t=this.calculateKeyframes(o,s),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,bt++,t.forEach((t=>t.zIndex=bt))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){var t;void 0!==this.S&&(this.element.setAttribute("style",null!==(t=this.S)&&void 0!==t?t:""),this.S=void 0)}commitStyles(){var t,e;this.S=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&xt.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await _t(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,i=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===i||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==i&&(this.element.style.top=i+"px")}}const e=this._(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,i;t&&(null===(i=(e=this.options).onComplete)||void 0===i||i.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}A(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const i=Tt.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=At.has(this.l);return t||this.l.updateComplete.then((()=>{At.add(this.l)})),t}_(t,e=this.A()){const i={...Ct};return e.forEach((t=>Object.assign(i,t.options.keyframeOptions))),Object.assign(i,t),i}j(t,e,i){t={...t},e={...e};const n=i.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,s=1;return void 0!==n&&(n.forEach((t=>{t.width&&(o/=t.width),t.height&&(s/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=o*t.left,e.left=o*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=s*t.top,e.top=s*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){var n;const o={},s={};let r=!1;const l={};for(const i in e){const a=t[i],c=e[i];if(i in $t){const t=$t[i];if(void 0===a||void 0===c)continue;const e=t(a,c);void 0!==e.transform&&(l[i]=e.value,r=!0,o.transform=`${null!==(n=o.transform)&&void 0!==n?n:""} ${e.transform}`)}else a!==c&&void 0!==a&&void 0!==c&&(r=!0,o[i]=a,s[i]=c)}return o.transformOrigin=s.transformOrigin=i?"center center":"top left",this.animatingProperties=l,r?[o,s]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const n=this.getController();null==n||n.add(this);try{await this.webAnimation.finished}catch(t){}null==n||n.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}),Pt=f(class extends p{constructor(t){var e;if(super(t),t.type!==d||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const n=t[i];return null==n?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:n}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?n.removeProperty(t):n[t]="")}));for(const t in e){const i=e[t];null!=i&&(this.ct.add(t),t.includes("-")?n.setProperty(t,i):n[t]=i)}return i}});let St=class extends o{constructor(){super(...arguments),this._updateCleanupFn=null,this._eventCleanupFns=[],this.positionConfig={},this._isShown=!1,this.animationDuration=200,this.placement="left",this.strategy="absolute",this.arrow=!1,this.flip=void 0,this.autoPlacement=void 0,this.offset={mainAxis:6},this.shift={},this.inline=!1,this.interactive=!1,this.trigger="mouseenter:mouseleave focus:blur",this.zIndex=10}updated(t){const e=[];var i;this.inline&&e.push((void 0===i&&(i={}),{name:"inline",options:i,async fn(t){var e;const{placement:n,elements:o,rects:s,platform:r,strategy:l}=t,{padding:a=2,x:c,y:h}=i,d=A(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:s.reference,offsetParent:await(null==r.getOffsetParent?void 0:r.getOffsetParent(o.floating)),strategy:l}):s.reference),u=null!=(e=await(null==r.getClientRects?void 0:r.getClientRects(o.reference)))?e:[],f=x(a),p=await r.getElementRects({reference:{getBoundingClientRect:function(){var t;if(2===u.length&&u[0].left>u[1].right&&null!=c&&null!=h)return null!=(t=u.find((t=>c>t.left-f.left&&ct.top-f.top&&h=2){if("x"===y(n)){const t=u[0],e=u[u.length-1],i="top"===v(n),o=t.top,s=e.bottom,r=i?t.left:e.left,l=i?t.right:e.right;return{top:o,bottom:s,left:r,right:l,width:l-r,height:s-o,x:r,y:o}}const t="left"===v(n),e=O(...u.map((t=>t.right))),i=E(...u.map((t=>t.left))),o=u.filter((n=>t?n.left===i:n.right===e)),s=o[0].top,r=o[o.length-1].bottom;return{top:s,bottom:r,left:i,right:e,width:e-i,height:r-s,x:i,y:s}}return d}},floating:o.floating,strategy:l});return s.reference.x!==p.reference.x||s.reference.y!==p.reference.y||s.reference.width!==p.reference.width||s.reference.height!==p.reference.height?{reset:{rects:p}}:{}}})),this.flip&&!this.autoPlacement&&e.push(j(this.flip)),this.offset&&e.push(N(this.offset)),this.shift&&e.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=t,c={x:i,y:n},h=await _(e,a),d=y(v(o)),u="x"===d?"y":"x";let f=c[d],p=c[u];if(s){const t="y"===d?"bottom":"right";f=$(f+h["y"===d?"top":"left"],f,f-h[t])}if(r){const t="y"===u?"bottom":"right";p=$(p+h["y"===u?"top":"left"],p,p-h[t])}const m=l.fn({...e,[d]:f,[u]:p});return{...m,data:{x:m.x-i,y:m.y-n}}}}}(this.shift)),this.autoPlacement&&e.push(k(this.autoPlacement)),this.arrow&&e.push((t=>({name:"arrow",options:t,async fn(e){const{element:i,padding:n=0}=null!=t?t:{},{x:o,y:s,placement:r,rects:l,platform:a}=e;if(null==i)returntrue&&console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=x(n),h={x:o,y:s},d=y(r),u=g(r),f=w(d),p=await a.getDimensions(i),m="y"===d?"top":"left",v="y"===d?"bottom":"right",b=l.reference[f]+l.reference[d]-h[d]-l.floating[f],A=h[d]-l.reference[d],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i));let E=_?"y"===d?_.clientHeight||0:_.clientWidth||0:0;0===E&&(E=l.floating[f]);const O=b/2-A/2,C=c[m],R=E-p[f]-c[v],T=E/2-p[f]/2+O,L=$(C,T,R),P=("start"===u?c[m]:c[v])>0&&T!==L&&l.reference[f]<=l.floating[f];return{[d]:h[d]-(P?T{const[e,i]=t.split(":");return this.triggerElement.addEventListener(e,this._showTooltip.bind(this)),this.interactive&&"mouseleave"===i?this.hostElement.addEventListener(i,this._hideTooltip.bind(this)):this.triggerElement.addEventListener(i,this._hideTooltip.bind(this)),()=>{this.triggerElement.removeEventListener(e,this._showTooltip),this.interactive&&"mouseleave"===i?this.contentElement.addEventListener(i,this._hideTooltip.bind(this)):this.triggerElement.removeEventListener(i,this._hideTooltip)}}))}async _updatePosition(){const{x:t,y:e,middlewareData:i,placement:n}=await dt(this.triggerElement,this.contentElement,this.positionConfig);if(Object.assign(this.contentElement.style,{left:`${t}px`,top:`${e}px`}),this.arrow&&this.arrowElement&&i.arrow){const{x:t,y:e}=i.arrow,o=this.computeArrowStyle(t,e,n);Object.assign(this.arrowElement.style,o)}}computeArrowStyle(t,e,i){const n={top:"",left:"",bottom:"",right:""};switch(i.split("-")[0]){case"bottom":return Object.assign(Object.assign({},n),{top:"-4px",left:null!==t?`${t}px`:""});case"top":return Object.assign(Object.assign({},n),{left:null!==t?`${t}px`:"",bottom:"-4px"});case"left":return Object.assign(Object.assign({},n),{top:null!==e?`${e}px`:"",right:"-4px"});case"right":return Object.assign(Object.assign({},n),{top:null!==e?`${e}px`:"",left:"-4px"});default:return Object.assign(Object.assign({},n),{display:"none"})}}firstUpdated(){var t;this._setTriggers(),this._updateCleanupFn=function(t,e,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=!0,animationFrame:l=!1}=n,a=o&&!l,c=s&&!l,h=a||c?[...I(t)?lt(t):[],...lt(e)]:[];h.forEach((t=>{a&&t.addEventListener("scroll",i,{passive:!0}),c&&t.addEventListener("resize",i)}));let d,u=null;if(r){let n=!0;u=new ResizeObserver((()=>{n||i(),n=!1})),I(t)&&!l&&u.observe(t),u.observe(e)}let f=l?Z(t):null;return l&&function e(){const n=Z(t);!f||n.x===f.x&&n.y===f.y&&n.width===f.width&&n.height===f.height||i(),f=n,d=requestAnimationFrame(e)}(),i(),()=>{var t;h.forEach((t=>{a&&t.removeEventListener("scroll",i),c&&t.removeEventListener("resize",i)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(d)}}(this.triggerElement,this.contentElement,(()=>{this._updatePosition()})),null===(t=this.contentElement)||void 0===t||t.classList.add("hidden")}disconnectedCallback(){var t;null===(t=this._updateCleanupFn)||void 0===t||t.call(this),this._cleanupTriggers(),super.disconnectedCallback()}render(){const t={shown:this._isShown,interactive:this.interactive},e={"z-index":this.zIndex.toString()};return r`
+
{t.element.classList.contains("shown")&&t.element.classList.remove("hidden")},onComplete:t=>{t.element.classList.contains("shown")||t.element.classList.add("hidden")}})} + > + + ${this.arrow?r`
`:null} +
+
+
+ +
+
`}};t([a()],St.prototype,"_isShown",void 0),t([e({type:Number})],St.prototype,"animationDuration",void 0),t([e({type:String})],St.prototype,"placement",void 0),t([e({type:String})],St.prototype,"strategy",void 0),t([e({type:Boolean})],St.prototype,"arrow",void 0),t([e({type:Object})],St.prototype,"flip",void 0),t([e({type:Object})],St.prototype,"autoPlacement",void 0),t([e({type:Object})],St.prototype,"offset",void 0),t([e({type:Object})],St.prototype,"shift",void 0),t([e({type:Boolean})],St.prototype,"inline",void 0),t([e({type:Boolean})],St.prototype,"interactive",void 0),t([e({type:String})],St.prototype,"trigger",void 0),t([e({type:Number})],St.prototype,"zIndex",void 0),t([h("#arrow")],St.prototype,"arrowElement",void 0),t([h("#content")],St.prototype,"contentElement",void 0),t([h("#element")],St.prototype,"hostElement",void 0),t([h("#trigger")],St.prototype,"triggerElement",void 0),St=t([l("cai-popover-dm-plugin")],St);export{m as o}; diff --git a/packages/c2pa-wc/dist/components/Popover/index.d.ts b/packages/c2pa-wc/dist/components/Popover/index.d.ts new file mode 100644 index 00000000..516fb0c4 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Popover/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './Popover'; diff --git a/packages/c2pa-wc/dist/components/Popover/index.js b/packages/c2pa-wc/dist/components/Popover/index.js new file mode 100644 index 00000000..a44eb111 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Popover/index.js @@ -0,0 +1 @@ +import"./Popover.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import"../../styles.js"; diff --git a/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.d.ts b/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.d.ts new file mode 100644 index 00000000..0c86b1d6 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../PanelSection'; +declare global { + interface HTMLElementTagNameMap { + 'cai-produced-by-dm-plugin': ProducedBy; + } + namespace JSX { + interface IntrinsicElements { + 'cai-produced-by-dm-plugin': any; + } + } +} +declare const ProducedBy_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class ProducedBy extends ProducedBy_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.js b/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.js new file mode 100644 index 00000000..bb97f479 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedBy/ProducedBy.js @@ -0,0 +1,6 @@ +import{__decorate as o}from"../../b803f408.js";import{s as i,$ as r}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{defaultStyles as t,baseSectionStyles as e}from"../../styles.js";import{ConfigurablePanelSection as c}from"../../mixins/configurablePanelSection.js";import"../PanelSection/PanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";const n={stringMap:{"produced-by.header":"Produced by","produced-by.helpText":"Chosen name of the person who exported this content"}};let p=class extends(c(i,{dataSelector:o=>{var i;return null===(i=o.producer)||void 0===i?void 0:i.name},config:n})){static get styles(){return[t,e]}render(){return this.renderSection(r` +
${this._data}
+
`)}};p=o([s("cai-produced-by-dm-plugin")],p); diff --git a/packages/c2pa-wc/dist/components/ProducedBy/index.d.ts b/packages/c2pa-wc/dist/components/ProducedBy/index.d.ts new file mode 100644 index 00000000..75a98194 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedBy/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './ProducedBy'; diff --git a/packages/c2pa-wc/dist/components/ProducedBy/index.js b/packages/c2pa-wc/dist/components/ProducedBy/index.js new file mode 100644 index 00000000..400f4b6c --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedBy/index.js @@ -0,0 +1 @@ +import"./ProducedBy.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.d.ts b/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.d.ts new file mode 100644 index 00000000..35af297c --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../PanelSection'; +import '../Icon'; +declare global { + interface HTMLElementTagNameMap { + 'cai-produced-with-dm-plugin': ProducedWith; + } + namespace JSX { + interface IntrinsicElements { + 'cai-produced-with-dm-plugin': any; + } + } +} +export interface ProducedWithConfig { + stringMap: Record; +} +declare const ProducedWith_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class ProducedWith extends ProducedWith_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.js b/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.js new file mode 100644 index 00000000..f6ca3198 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedWith/ProducedWith.js @@ -0,0 +1,24 @@ +import{__decorate as o}from"../../b803f408.js";import{s as i,r as t,$ as e}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{defaultStyles as r,baseSectionStyles as c}from"../../styles.js";import{ConfigurablePanelSection as n}from"../../mixins/configurablePanelSection.js";import"../PanelSection/PanelSection.js";import"../Icon/Icon.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";const l={stringMap:{"produced-with.header":"Produced with","produced-with.helpText":"Software used to make this content","produced-with.beta":"Content Credentials (Beta)"}};let p=class extends(n(i,{dataSelector:o=>o.claimGenerator,config:l})){static get styles(){return[r,c,t` + .section-produced-with-content-dm-plugin { + display: flex; + align-items: center; + } + + .section-produced-with-beta-dm-plugin { + margin-left: 24px; + color: var(--cai-secondary-color); + } + `]}render(){var o,i,t;return this.renderSection(e` +
+
+ + ${null===(i=this._data)||void 0===i?void 0:i.product} +
+ ${(null===(t=this.manifestStore)||void 0===t?void 0:t.isBeta)?e`
+ ${this._config.stringMap["produced-with.beta"]} +
`:null} +
+
`)}};p=o([s("cai-produced-with-dm-plugin")],p); diff --git a/packages/c2pa-wc/dist/components/ProducedWith/index.d.ts b/packages/c2pa-wc/dist/components/ProducedWith/index.d.ts new file mode 100644 index 00000000..16eef599 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedWith/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './ProducedWith'; diff --git a/packages/c2pa-wc/dist/components/ProducedWith/index.js b/packages/c2pa-wc/dist/components/ProducedWith/index.js new file mode 100644 index 00000000..278da064 --- /dev/null +++ b/packages/c2pa-wc/dist/components/ProducedWith/index.js @@ -0,0 +1 @@ +import"./ProducedWith.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.d.ts b/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.d.ts new file mode 100644 index 00000000..3bb769e9 --- /dev/null +++ b/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import '../PanelSection'; +import '../Icon'; +declare global { + interface HTMLElementTagNameMap { + 'cai-social-media-dm-plugin': SocialMedia; + } + namespace JSX { + interface IntrinsicElements { + 'cai-social-media-dm-plugin': any; + } + } +} +export interface SocialMediaConfig { + stringMap: Record; +} +declare const SocialMedia_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface) & typeof LitElement; +export declare class SocialMedia extends SocialMedia_base { + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<2 | 1>; +} +export {}; diff --git a/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.js b/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.js new file mode 100644 index 00000000..e0053885 --- /dev/null +++ b/packages/c2pa-wc/dist/components/SocialMedia/SocialMedia.js @@ -0,0 +1,43 @@ +import{__decorate as o}from"../../b803f408.js";import{s as i,r as s,$ as e}from"../../e4c0417e.js";import{n as l}from"../../06170432.js";import{defaultStyles as t,baseSectionStyles as c}from"../../styles.js";import{ConfigurablePanelSection as n}from"../../mixins/configurablePanelSection.js";import"../PanelSection/PanelSection.js";import"../Icon/Icon.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";const a={stringMap:{"social-media.header":"Social media","social-media.helpText":"Social media accounts connected to the producer of this content"}};let r=class extends(n(i,{dataSelector:o=>null==o?void 0:o.socialAccounts,isEmpty:o=>!(null==o?void 0:o.length),config:a})){static get styles(){return[t,c,s` + .section-social-media-list-dm-plugin { + display: flex; + flex-direction: column; + gap: 6px; + list-style: none; + padding: 0; + margin: 0; + overflow: hidden; + } + + .section-social-media-list-item-dm-plugin { + display: flex; + align-items: center; + } + + .section-social-media-list-item-link-dm-plugin { + color: var(--cai-social-media-item-color, var(--cai-primary-color)); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + `]}render(){var o;return this.renderSection(e` +
    + ${null===(o=this._data)||void 0===o?void 0:o.map((o=>e` +
  • + + + @${o.name} + +
  • + `))} +
+
`)}};r=o([l("cai-social-media-dm-plugin")],r); diff --git a/packages/c2pa-wc/dist/components/SocialMedia/index.d.ts b/packages/c2pa-wc/dist/components/SocialMedia/index.d.ts new file mode 100644 index 00000000..5c8964d5 --- /dev/null +++ b/packages/c2pa-wc/dist/components/SocialMedia/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './SocialMedia'; diff --git a/packages/c2pa-wc/dist/components/SocialMedia/index.js b/packages/c2pa-wc/dist/components/SocialMedia/index.js new file mode 100644 index 00000000..84d1c65c --- /dev/null +++ b/packages/c2pa-wc/dist/components/SocialMedia/index.js @@ -0,0 +1 @@ +import"./SocialMedia.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../mixins/configurablePanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../PanelSection/PanelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.d.ts b/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.d.ts new file mode 100644 index 00000000..4e9b25a5 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.d.ts @@ -0,0 +1,47 @@ +/** + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement, TemplateResult } from 'lit'; +import { nothing } from 'lit-html'; +import '../Tooltip'; +import '../../../assets/svg/monochrome/broken-image.svg'; +import '../../../assets/svg/color/info.svg'; +import '../../../assets/svg/color/alert.svg'; +import '../../../assets/svg/color/missing.svg'; +declare global { + interface HTMLElementTagNameMap { + 'cai-thumbnail-dm-plugin': Thumbnail; + } + namespace JSX { + interface IntrinsicElements { + 'cai-thumbnail-dm-plugin': any; + } + } +} +export declare type Badge = 'none' | 'info' | 'missing' | 'alert'; +export declare class Thumbnail extends LitElement { + static readonly badgeMap: Record; + /** + * Image source - if set to undefined/null it will show a broken image icon + */ + src: undefined; + /** + * A badge to show, if desired + */ + badge: Badge; + /** + * True if the thumbnail is selected + */ + selected: boolean; + /** + * Help text to be displayed when a user hovers over the badge + */ + badgeHelpText: undefined; + static get styles(): import("lit").CSSResult[]; + render(): TemplateResult<1>; +} diff --git a/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.js b/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.js new file mode 100644 index 00000000..0507961f --- /dev/null +++ b/packages/c2pa-wc/dist/components/Thumbnail/Thumbnail.js @@ -0,0 +1,87 @@ +import{__decorate as i,e as o}from"../../b803f408.js";import{w as t,$ as a,s as e,r as n}from"../../e4c0417e.js";import{n as c}from"../../06170432.js";import{defaultStyles as s}from"../../styles.js";import{classPartMap as l}from"../../utils.js";import"../Tooltip/Tooltip.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";import"../../12d8f3c3.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";var r;let d=r=class extends e{constructor(){super(...arguments),this.src=void 0,this.badge="none",this.selected=!1,this.badgeHelpText=void 0}static get styles(){return[s,n` + :host { + display: inline-block; + width: var(--cai-thumbnail-size, 72px); + height: var(--cai-thumbnail-size, 72px); + } + .container-dm-plugin { + position: relative; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + border-radius: var(--cai-thumbnail-border-radius, 3px); + transition: box-shadow 200ms ease-in-out; + box-shadow: 0 0 0 0 transparent; + } + .selected-dm-plugin { + box-shadow: var(--cai-thumbnail-selected-shadow-offset-x, 0) + var(--cai-thumbnail-selected-shadow-offset-y, 0) + var(--cai-thumbnail-selected-shadow-blur, 0) + var(--cai-thumbnail-selected-shadow-spread, 3px) + var(--cai-thumbnail-selected-shadow-color, #1473e6); + } + cai-tooltip-dm-plugin.badge-tooltip-dm-plugin, + .badge-no-tooltip-dm-plugin { + position: absolute; + top: var(--cai-thumbnail-badge-icon-top, 1px); + right: var(--cai-thumbnail-badge-icon-right, 1px); + left: var(--cai-thumbnail-badge-icon-left, auto); + bottom: var(--cai-thumbnail-badge-icon-bottom, auto); + width: var(--cai-thumbnail-badge-icon-width, 20px); + height: var(--cai-thumbnail-badge-icon-height, 20px); + } + cai-tooltip-dm-plugin.badge-tooltip-dm-plugin { + pointer-events: auto; + } + .badge-icon-dm-plugin { + --cai-icon-width: var(--cai-thumbnail-badge-icon-width, 20px); + --cai-icon-height: var(--cai-thumbnail-badge-icon-height, 20px); + } + .included-badge-dm-plugin { + display: flex; + } + .no-image-dm-plugin { + --cai-icon-width: var( + --cai-thumbnail-no-image-icon-width, + var(--cai-icon-width, 20px) + ); + --cai-icon-width: var( + --cai-thumbnail-no-image-icon-height, + var(--cai-icon-height, 20px) + ); + --cai-icon-fill: var( + --cai-thumbnail-no-image-icon-fill, + var(--cai-icon-width, #8e8e8e) + ); + } + `]}render(){const i=l({"container-dm-plugin":!0,selected:this.selected});return a` +
+ + ${"none"!==this.badge&&this.badgeHelpText?a` +
${this.badgeHelpText}
+
+ ${r.badgeMap[this.badge]} +
+
`:a`
+ ${r.badgeMap[this.badge]} +
`} +
+ ${this.src?t:a`
+ +
`} +
`}};d.badgeMap={none:t,info:a``,missing:a``,alert:a``},i([o({type:String})],d.prototype,"src",void 0),i([o({type:String})],d.prototype,"badge",void 0),i([o({type:Boolean})],d.prototype,"selected",void 0),i([o({type:String,attribute:"badge-help-text"})],d.prototype,"badgeHelpText",void 0),d=r=i([c("cai-thumbnail-dm-plugin")],d); diff --git a/packages/c2pa-wc/dist/components/Thumbnail/index.d.ts b/packages/c2pa-wc/dist/components/Thumbnail/index.d.ts new file mode 100644 index 00000000..4bcc172c --- /dev/null +++ b/packages/c2pa-wc/dist/components/Thumbnail/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './Thumbnail'; diff --git a/packages/c2pa-wc/dist/components/Thumbnail/index.js b/packages/c2pa-wc/dist/components/Thumbnail/index.js new file mode 100644 index 00000000..e4ed7d1e --- /dev/null +++ b/packages/c2pa-wc/dist/components/Thumbnail/index.js @@ -0,0 +1 @@ +import"./Thumbnail.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../styles.js";import"../../utils.js";import"../Tooltip/Tooltip.js";import"../../12d8f3c3.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js"; diff --git a/packages/c2pa-wc/dist/components/Tooltip/Tooltip.d.ts b/packages/c2pa-wc/dist/components/Tooltip/Tooltip.d.ts new file mode 100644 index 00000000..47cc8fbc --- /dev/null +++ b/packages/c2pa-wc/dist/components/Tooltip/Tooltip.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { autoPlacement } from '@floating-ui/dom'; +import { LitElement } from 'lit'; +import '../../../assets/svg/monochrome/help.svg'; +import '../Icon'; +import '../Popover'; +declare global { + interface HTMLElementTagNameMap { + 'cai-tooltip-dm-plugin': Tooltip; + } + namespace JSX { + interface IntrinsicElements { + 'cai-tooltip-dm-plugin': any; + } + } +} +export declare class Tooltip extends LitElement { + protected _isShown: boolean; + animationDuration: number; + autoPlacement: Parameters[0]; + arrow: boolean; + static get styles(): import("lit").CSSResult[]; + render(): import("lit-html").TemplateResult<1>; +} diff --git a/packages/c2pa-wc/dist/components/Tooltip/Tooltip.js b/packages/c2pa-wc/dist/components/Tooltip/Tooltip.js new file mode 100644 index 00000000..751f9e12 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Tooltip/Tooltip.js @@ -0,0 +1,43 @@ +import{__decorate as o,e as i}from"../../b803f408.js";import{s as t,r,$ as n}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{t as e}from"../../12d8f3c3.js";import{o as p}from"../Popover/Popover.js";import"../../icons/monochrome/help.js";import{defaultStyles as c}from"../../styles.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";let a=class extends t{constructor(){super(...arguments),this._isShown=!1,this.animationDuration=200,this.autoPlacement={padding:10},this.arrow=!0}static get styles(){return[c,r` + #trigger-dm-plugin { + display: flex; + --cai-icon-width: var(--cai-popover-icon-width, 16px); + --cai-icon-height: var(--cai-popover-icon-height, 16px); + --cai-icon-fill: var(--cai-popover-icon-fill, #a8a8a8); + cursor: pointer; + } + .content-dm-plugin { + min-width: 165px; + max-width: 235px; + font-size: 13px; + padding: 10px; + box-shadow: none; + border-radius: var(--cai-border-radius); + background-color: #fff; + filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4)); + z-index: 10; + pointer-events: none; + } + .content-dm-plugin.shown { + opacity: 1; + } + .content-dm-plugin.hidden { + display: none; + } + `]}render(){const o={content:!0,shown:this._isShown};return n` + +
+ + + +
+
+ +
+
+ `}};o([e()],a.prototype,"_isShown",void 0),o([i({type:Number})],a.prototype,"animationDuration",void 0),o([i({type:Object})],a.prototype,"autoPlacement",void 0),o([i({type:Boolean})],a.prototype,"arrow",void 0),a=o([s("cai-tooltip-dm-plugin")],a); diff --git a/packages/c2pa-wc/dist/components/Tooltip/index.d.ts b/packages/c2pa-wc/dist/components/Tooltip/index.d.ts new file mode 100644 index 00000000..cfe76338 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Tooltip/index.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * from './Tooltip'; diff --git a/packages/c2pa-wc/dist/components/Tooltip/index.js b/packages/c2pa-wc/dist/components/Tooltip/index.js new file mode 100644 index 00000000..285ebbf2 --- /dev/null +++ b/packages/c2pa-wc/dist/components/Tooltip/index.js @@ -0,0 +1 @@ +import"./Tooltip.js";import"../../b803f408.js";import"../../e4c0417e.js";import"../../06170432.js";import"../../12d8f3c3.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../../styles.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js"; diff --git a/packages/c2pa-wc/dist/e4c0417e.js b/packages/c2pa-wc/dist/e4c0417e.js new file mode 100644 index 00000000..e4c94da9 --- /dev/null +++ b/packages/c2pa-wc/dist/e4c0417e.js @@ -0,0 +1 @@ +const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),s=new Map;class i{constructor(t,s){if(this._$cssResult$=!0,s!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let e=s.get(this.cssText);return t&&void 0===e&&(s.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const n=(t,...s)=>{const n=1===t.length?t[0]:s.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new i(n,e)},o=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new i("string"==typeof t?t:t+"",e))(s)})(t):t;var r;const l=window.trustedTypes,h=l?l.emptyScript:"",a=window.reactiveElementPolyfillSupport,d={toAttribute(t,e){switch(e){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},c=(t,e)=>e!==t&&(e==e||t==t),u={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:c};class p extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Eh(s,e);void 0!==i&&(this._$Eu.set(i,s),t.push(i))})),t}static createProperty(t,e=u){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||u}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Eh(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var e;const s=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,s)=>{t?e.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((t=>{const s=document.createElement("style"),i=window.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=t.cssText,e.appendChild(s)}))})(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ES(t,e,s=u){var i,n;const o=this.constructor._$Eh(t,s);if(void 0!==o&&!0===s.reflect){const r=(null!==(n=null===(i=s.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==n?n:d.toAttribute)(e,s.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,e){var s,i,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(i=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==i?i:"function"==typeof l?l:null)&&void 0!==n?n:d.fromAttribute;this._$Ei=r,this[r]=h(e,t.type),this._$Ei=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||c)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}var $;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==a||a({ReactiveElement:p}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const v=globalThis.trustedTypes,_=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,f="?"+A,g=`<${f}>`,y=document,m=(t="")=>y.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,C=/>/g,U=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,x=/'/g,P=/"/g,T=/^(?:script|style|textarea|title)$/i,H=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),N=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),O=new WeakMap,R=y.createTreeWalker(y,129,null,!1),k=(t,e)=>{const s=t.length-1,i=[];let n,o=2===e?"":"",r=S;for(let e=0;e"===h[0]?(r=null!=n?n:S,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?U:'"'===h[3]?P:x):r===P||r===x?r=U:r===w||r===C?r=S:(r=U,n=void 0);const c=r===U&&t[e+1].startsWith("/>")?" ":"";o+=r===S?s+g:a>=0?(i.push(l),s.slice(0,a)+"$lit$"+s.slice(a)+A+c):s+A+(-2===a?(i.push(void 0),e):c)}const l=o+(t[s]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(l):l,i]};class L{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=k(t,e);if(this.el=L.createElement(h,s),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=R.nextNode())&&l.length0){i.textContent=v?v.emptyScript:"";for(let s=0;s{var e;return b(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==M&&E(this._$AH)?this._$AA.nextSibling.data=t:this.k(y.createTextNode(t)),this._$AH=t}T(t){var e;const{values:s,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=L.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(s);else{const t=new B(n,this),e=t.p(this.options);t.m(s),this.k(e),this._$AH=t}}_$AC(t){let e=O.get(t.strings);return void 0===e&&O.set(t.strings,e=new L(t)),e}S(t){b(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new D(this.M(m()),this.M(m()),this,this.options)):s=e[i],s._$AI(n),i++;i2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(void 0===n)t=z(this,t,e,0),o=!E(t)||t!==this._$AH&&t!==N,o&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new D(e.insertBefore(m(),t),t,void 0,null!=s?s:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return N}}G.finalized=!0,G._$litElement$=!0,null===(Z=globalThis.litElementHydrateSupport)||void 0===Z||Z.call(globalThis,{LitElement:G});const Q=globalThis.litElementPolyfillSupport;null==Q||Q({LitElement:G}),(null!==(F=globalThis.litElementVersions)&&void 0!==F?F:globalThis.litElementVersions=[]).push("3.2.0");export{H as $,N as b,n as r,G as s,M as w}; diff --git a/packages/c2pa-wc/dist/icons/color/alert.js b/packages/c2pa-wc/dist/icons/color/alert.js new file mode 100644 index 00000000..5e746278 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/alert.js @@ -0,0 +1,40 @@ +import{s as i,r as e,$ as t}from"../../e4c0417e.js";customElements.define("cai-icon-alert-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/info-blue.js b/packages/c2pa-wc/dist/icons/color/info-blue.js new file mode 100644 index 00000000..29b78fda --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/info-blue.js @@ -0,0 +1,35 @@ +import{s as i,r as e,$ as t}from"../../e4c0417e.js";customElements.define("cai-icon-info-blue-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/info.js b/packages/c2pa-wc/dist/icons/color/info.js new file mode 100644 index 00000000..83c26be4 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/info.js @@ -0,0 +1,35 @@ +import{s as i,r as e,$ as t}from"../../e4c0417e.js";customElements.define("cai-icon-info-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/adobe-stock.js b/packages/c2pa-wc/dist/icons/color/logos/adobe-stock.js new file mode 100644 index 00000000..0b156e99 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/adobe-stock.js @@ -0,0 +1,31 @@ +import{s as a,r as i,$ as e}from"../../../e4c0417e.js";customElements.define("cai-icon-adobe-stock-dm-plugin",class extends a{static get styles(){return i` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return e``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/adobe.js b/packages/c2pa-wc/dist/icons/color/logos/adobe.js new file mode 100644 index 00000000..78ceb76c --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/adobe.js @@ -0,0 +1,47 @@ +import{s as a,r as i,$ as e}from"../../../e4c0417e.js";customElements.define("cai-icon-adobe-dm-plugin",class extends a{static get styles(){return i` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return e``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/behance.js b/packages/c2pa-wc/dist/icons/color/logos/behance.js new file mode 100644 index 00000000..1bd7963d --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/behance.js @@ -0,0 +1,34 @@ +import{s as i,r as e,$ as c}from"../../../e4c0417e.js";customElements.define("cai-icon-behance-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return c``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/cai.js b/packages/c2pa-wc/dist/icons/color/logos/cai.js new file mode 100644 index 00000000..4193c97a --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/cai.js @@ -0,0 +1,29 @@ +import{s as i,r as e,$ as t}from"../../../e4c0417e.js";customElements.define("cai-icon-cai-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/crypto-eth.js b/packages/c2pa-wc/dist/icons/color/logos/crypto-eth.js new file mode 100644 index 00000000..68bab8cd --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/crypto-eth.js @@ -0,0 +1,29 @@ +import{s as i,r as e,$ as t}from"../../../e4c0417e.js";customElements.define("cai-icon-crypto-eth-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/facebook.js b/packages/c2pa-wc/dist/icons/color/logos/facebook.js new file mode 100644 index 00000000..1209c113 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/facebook.js @@ -0,0 +1,35 @@ +import{s as i,r as e,$ as t}from"../../../e4c0417e.js";customElements.define("cai-icon-facebook-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/instagram.js b/packages/c2pa-wc/dist/icons/color/logos/instagram.js new file mode 100644 index 00000000..577f0fdf --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/instagram.js @@ -0,0 +1,43 @@ +import{s as a,r as e,$ as s}from"../../../e4c0417e.js";customElements.define("cai-icon-instagram-dm-plugin",class extends a{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return s``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/lightroom.js b/packages/c2pa-wc/dist/icons/color/logos/lightroom.js new file mode 100644 index 00000000..7af6d601 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/lightroom.js @@ -0,0 +1,42 @@ +import{s as i,r as e,$ as l}from"../../../e4c0417e.js";customElements.define("cai-icon-lightroom-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return l``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/photoshop.js b/packages/c2pa-wc/dist/icons/color/logos/photoshop.js new file mode 100644 index 00000000..6ac9025b --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/photoshop.js @@ -0,0 +1,37 @@ +import{s as a,r as e,$ as i}from"../../../e4c0417e.js";customElements.define("cai-icon-photoshop-dm-plugin",class extends a{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return i``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/truepic.js b/packages/c2pa-wc/dist/icons/color/logos/truepic.js new file mode 100644 index 00000000..82c1d43f --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/truepic.js @@ -0,0 +1,56 @@ +import{s as i,r as t,$ as a}from"../../../e4c0417e.js";customElements.define("cai-icon-truepic-dm-plugin",class extends i{static get styles(){return t` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return a``}}); diff --git a/packages/c2pa-wc/dist/icons/color/logos/twitter.js b/packages/c2pa-wc/dist/icons/color/logos/twitter.js new file mode 100644 index 00000000..38d56f68 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/logos/twitter.js @@ -0,0 +1,32 @@ +import{s as i,r as e,$ as t}from"../../../e4c0417e.js";customElements.define("cai-icon-twitter-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/color/missing.js b/packages/c2pa-wc/dist/icons/color/missing.js new file mode 100644 index 00000000..de4cae5e --- /dev/null +++ b/packages/c2pa-wc/dist/icons/color/missing.js @@ -0,0 +1,42 @@ +import{s as i,r as e,$ as l}from"../../e4c0417e.js";customElements.define("cai-icon-missing-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + } + `}render(){return l``}}); diff --git a/packages/c2pa-wc/dist/icons/monochrome/ai-model.js b/packages/c2pa-wc/dist/icons/monochrome/ai-model.js new file mode 100644 index 00000000..082ad58f --- /dev/null +++ b/packages/c2pa-wc/dist/icons/monochrome/ai-model.js @@ -0,0 +1,30 @@ +import{s as i,r as e,$ as l}from"../../e4c0417e.js";customElements.define("cai-icon-ai-model-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + fill: inherit; + } + `}render(){return l``}}); diff --git a/packages/c2pa-wc/dist/icons/monochrome/broken-image.js b/packages/c2pa-wc/dist/icons/monochrome/broken-image.js new file mode 100644 index 00000000..fc31aad5 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/monochrome/broken-image.js @@ -0,0 +1,29 @@ +import{s as i,r as e,$ as a}from"../../e4c0417e.js";customElements.define("cai-icon-broken-image-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + fill: inherit; + } + `}render(){return a``}}); diff --git a/packages/c2pa-wc/dist/icons/monochrome/generic-info.js b/packages/c2pa-wc/dist/icons/monochrome/generic-info.js new file mode 100644 index 00000000..a751ed70 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/monochrome/generic-info.js @@ -0,0 +1,28 @@ +import{s as i,r as e,$ as t}from"../../e4c0417e.js";customElements.define("cai-icon-generic-info-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + fill: inherit; + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/icons/monochrome/help.js b/packages/c2pa-wc/dist/icons/monochrome/help.js new file mode 100644 index 00000000..8442da77 --- /dev/null +++ b/packages/c2pa-wc/dist/icons/monochrome/help.js @@ -0,0 +1,28 @@ +import{s as i,r as e,$ as t}from"../../e4c0417e.js";customElements.define("cai-icon-help-dm-plugin",class extends i{static get styles(){return e` + :host { + display: inline-block; + width: var(--cai-icon-width, 16px); + height: var(--cai-icon-height, 16px); + } + + svg { + width: 100%; + height: 100%; + fill: var(--cai-icon-fill, currentColor); + } + + path { + fill: inherit; + } + `}render(){return t``}}); diff --git a/packages/c2pa-wc/dist/index.d.ts b/packages/c2pa-wc/dist/index.d.ts new file mode 100644 index 00000000..13eae530 --- /dev/null +++ b/packages/c2pa-wc/dist/index.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export * as utils from './utils'; +export * from './components/AssetsUsed'; +export * from './components/EditsAndActivity'; +export * from './components/Icon'; +export * from './components/Indicator'; +export * from './components/ManifestSummary'; +export * from './components/MinimumViableProvenance'; +export * from './components/PanelSection'; +export * from './components/Popover'; +export * from './components/ProducedBy'; +export * from './components/ProducedWith'; +export * from './components/SocialMedia'; +export * from './components/Thumbnail'; +export * from './components/Tooltip'; diff --git a/packages/c2pa-wc/dist/index.js b/packages/c2pa-wc/dist/index.js new file mode 100644 index 00000000..b34465a8 --- /dev/null +++ b/packages/c2pa-wc/dist/index.js @@ -0,0 +1 @@ +import"./utils.js";import"./components/AssetsUsed/AssetsUsed.js";import"./components/EditsAndActivity/EditsAndActivity.js";import"./components/Icon/Icon.js";import"./components/Indicator/Indicator.js";import"./components/ManifestSummary/ManifestSummary.js";import"./components/MinimumViableProvenance/MinimumViableProvenance.js";import"./components/PanelSection/PanelSection.js";import"./components/Popover/Popover.js";import"./components/ProducedBy/ProducedBy.js";import"./components/ProducedWith/ProducedWith.js";import"./components/SocialMedia/SocialMedia.js";import"./components/Thumbnail/Thumbnail.js";import"./components/Tooltip/Tooltip.js";import"./b803f408.js";import"./e4c0417e.js";import"./06170432.js";import"./styles.js";import"./badge.js";import"./mixins/configurablePanelSection.js";import"./mixins/configurable.js";import"./12d8f3c3.js";import"./mixins/panelSection.js";import"./icons/color/logos/adobe-stock.js";import"./icons/color/logos/adobe.js";import"./icons/color/logos/behance.js";import"./icons/color/logos/cai.js";import"./icons/color/logos/facebook.js";import"./icons/color/logos/instagram.js";import"./icons/color/logos/lightroom.js";import"./icons/color/logos/photoshop.js";import"./icons/color/logos/truepic.js";import"./icons/color/logos/twitter.js";import"./icons/color/info.js";import"./components/ContentSummary/ContentSummary.js";import"./icons/monochrome/generic-info.js";import"./icons/monochrome/help.js";import"./icons/monochrome/broken-image.js";import"./icons/color/alert.js";import"./icons/color/missing.js"; diff --git a/packages/c2pa-wc/dist/mixins/configurable.d.ts b/packages/c2pa-wc/dist/mixins/configurable.d.ts new file mode 100644 index 00000000..ecd099c5 --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/configurable.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +export declare class ConfigurableInterface> { + config: Partial; + protected _config: ConfigType; +} +declare type Constructor = new (...args: any[]) => T; +export declare const Configurable: , ConfigType extends Record>(superClass: T, defaultConfig: ConfigType) => Constructor> & T; +export {}; diff --git a/packages/c2pa-wc/dist/mixins/configurable.js b/packages/c2pa-wc/dist/mixins/configurable.js new file mode 100644 index 00000000..661b0140 --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/configurable.js @@ -0,0 +1 @@ +import{__decorate as t,e as r}from"../b803f408.js";import{t as e}from"../12d8f3c3.js";import{commonjsGlobal as n,hasChanged as o}from"../utils.js";var a=function(){this.__data__=[],this.size=0};var i=function(t,r){return t===r||t!=t&&r!=r},u=i;var c=function(t,r){for(var e=t.length;e--;)if(u(t[e][0],r))return e;return-1},f=c,s=Array.prototype.splice;var v=c;var p=c;var l=c;var h=a,y=function(t){var r=this.__data__,e=f(r,t);return!(e<0)&&(e==r.length-1?r.pop():s.call(r,e,1),--this.size,!0)},_=function(t){var r=this.__data__,e=v(r,t);return e<0?void 0:r[e][1]},b=function(t){return p(this.__data__,t)>-1},d=function(t,r){var e=this.__data__,n=l(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function j(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1&&t%1==0&&t<=9007199254740991},Br=W,Er=$r;var Ir=function(t){return null!=t&&Er(t.length)&&!Br(t)},kr=Ir,Mr=wr;var Cr=function(t){return Mr(t)&&kr(t)},Dr={exports:{}};var Rr=function(){return!1};!function(t,r){var e=F,n=Rr,o=r&&!r.nodeType&&r,a=o&&t&&!t.nodeType&&t,i=a&&a.exports===o?e.Buffer:void 0,u=(i?i.isBuffer:void 0)||n;t.exports=u}(Dr,Dr.exports);var qr=q,Lr=yr,Nr=wr,Gr=Function.prototype,Vr=Object.prototype,Wr=Gr.toString,Hr=Vr.hasOwnProperty,Jr=Wr.call(Object);var Kr=function(t){if(!Nr(t)||"[object Object]"!=qr(t))return!1;var r=Lr(t);if(null===r)return!0;var e=Hr.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&Wr.call(e)==Jr},Qr=q,Xr=$r,Yr=wr,Zr={};Zr["[object Float32Array]"]=Zr["[object Float64Array]"]=Zr["[object Int8Array]"]=Zr["[object Int16Array]"]=Zr["[object Int32Array]"]=Zr["[object Uint8Array]"]=Zr["[object Uint8ClampedArray]"]=Zr["[object Uint16Array]"]=Zr["[object Uint32Array]"]=!0,Zr["[object Arguments]"]=Zr["[object Array]"]=Zr["[object ArrayBuffer]"]=Zr["[object Boolean]"]=Zr["[object DataView]"]=Zr["[object Date]"]=Zr["[object Error]"]=Zr["[object Function]"]=Zr["[object Map]"]=Zr["[object Number]"]=Zr["[object Object]"]=Zr["[object RegExp]"]=Zr["[object Set]"]=Zr["[object String]"]=Zr["[object WeakMap]"]=!1;var te=function(t){return Yr(t)&&Xr(t.length)&&!!Zr[Qr(t)]};var re=function(t){return function(r){return t(r)}},ee={exports:{}};!function(t,r){var e=z,n=r&&!r.nodeType&&r,o=n&&t&&!t.nodeType&&t,a=o&&o.exports===n&&e.process,i=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=i}(ee,ee.exports);var ne=te,oe=re,ae=ee.exports,ie=ae&&ae.isTypedArray,ue=ie?oe(ie):ne;var ce=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]},fe=er,se=i,ve=Object.prototype.hasOwnProperty;var pe=function(t,r,e){var n=t[r];ve.call(t,r)&&se(n,e)&&(void 0!==e||r in t)||fe(t,r,e)},le=er;var he=function(t,r,e,n){var o=!e;e||(e={});for(var a=-1,i=r.length;++a-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(vn),hn=on,yn=cn,_n=ln;var bn=i,dn=Ir,jn=_e,gn=L;var On=function(t,r){return _n(yn(t,r,hn),t+"")},wn=function(t,r,e){if(!gn(e))return!1;var n=typeof r;return!!("number"==n?dn(e)&&jn(r,e.length):"string"==n&&r in e)&&bn(e[r],t)};var mn=nn,xn=function(t){return On((function(r,e){var n=-1,o=e.length,a=o>1?e[o-1]:void 0,i=o>2?e[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,i&&wn(e[0],e[1],i)&&(a=o<3?void 0:a,o=1),r=Object(r);++n{class i extends n{constructor(){super(...arguments),this.config={},this._config=a}willUpdate(t){super.willUpdate(t),t.has("config")&&(this._config=xn({},a,this.config))}}return t([r({attribute:!1,hasChanged:o})],i.prototype,"config",void 0),t([e()],i.prototype,"_config",void 0),i};export{An as Configurable}; diff --git a/packages/c2pa-wc/dist/mixins/configurablePanelSection.d.ts b/packages/c2pa-wc/dist/mixins/configurablePanelSection.d.ts new file mode 100644 index 00000000..ba9b455d --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/configurablePanelSection.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { LitElement } from 'lit'; +import { PanelSectionConfig } from './panelSection'; +declare type Constructor = new (...args: any[]) => T; +interface ConfigurablePanelSectionConfig extends PanelSectionConfig { + config: Record; +} +export declare const ConfigurablePanelSection: , DataType>(superClass: T, config: ConfigurablePanelSectionConfig) => (new (...args: any[]) => import("./configurable").ConfigurableInterface>) & (new (...args: any[]) => import("./panelSection").PanelSectionInterface) & T; +export {}; diff --git a/packages/c2pa-wc/dist/mixins/configurablePanelSection.js b/packages/c2pa-wc/dist/mixins/configurablePanelSection.js new file mode 100644 index 00000000..84b73976 --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/configurablePanelSection.js @@ -0,0 +1 @@ +import{Configurable as o}from"./configurable.js";import{PanelSection as i}from"./panelSection.js";import"../b803f408.js";import"../12d8f3c3.js";import"../utils.js";import"../e4c0417e.js";const r=(r,t)=>o(i(r,t),t.config);export{r as ConfigurablePanelSection}; diff --git a/packages/c2pa-wc/dist/mixins/panelSection.d.ts b/packages/c2pa-wc/dist/mixins/panelSection.d.ts new file mode 100644 index 00000000..785d8527 --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/panelSection.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright 2022 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +import { L2ManifestStore } from 'c2pa'; +import { LitElement, TemplateResult } from 'lit'; +export declare class PanelSectionInterface { + manifestStore: L2ManifestStore | undefined; + protected _data: DataType; + protected _isEmpty: boolean; + renderSection: (content: TemplateResult) => TemplateResult; +} +export interface PanelSectionConfig { + dataSelector: (manifestStore: L2ManifestStore) => DataType; + isEmpty?: (data: DataType) => boolean; +} +declare type Constructor = new (...args: any[]) => T; +export declare const PanelSection: , DataType>(superClass: T, config: PanelSectionConfig) => Constructor> & T; +export {}; diff --git a/packages/c2pa-wc/dist/mixins/panelSection.js b/packages/c2pa-wc/dist/mixins/panelSection.js new file mode 100644 index 00000000..191008b7 --- /dev/null +++ b/packages/c2pa-wc/dist/mixins/panelSection.js @@ -0,0 +1 @@ +import{__decorate as t,e}from"../b803f408.js";import{w as o}from"../e4c0417e.js";import{t as s}from"../12d8f3c3.js";const r=(r,i)=>{class a extends r{constructor(){super(...arguments),this.empty=!1,this._data=null}willUpdate(t){super.willUpdate(t),t.has("manifestStore")&&(this._data=this.manifestStore?i.dataSelector(this.manifestStore):null,this.empty=!this._data||(i.isEmpty?i.isEmpty(this._data):!this._data))}renderSection(t){return this.empty?o:t}}return t([e({type:Object})],a.prototype,"manifestStore",void 0),t([e({type:Boolean,reflect:!0})],a.prototype,"empty",void 0),t([s()],a.prototype,"_data",void 0),a};export{r as PanelSection}; diff --git a/packages/c2pa-wc/dist/styles.d.ts b/packages/c2pa-wc/dist/styles.d.ts new file mode 100644 index 00000000..01df1f36 --- /dev/null +++ b/packages/c2pa-wc/dist/styles.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +export declare const defaultStyles: import("lit").CSSResult; +export declare const baseSectionStyles: import("lit").CSSResult; diff --git a/packages/c2pa-wc/dist/styles.js b/packages/c2pa-wc/dist/styles.js new file mode 100644 index 00000000..a0ddfbac --- /dev/null +++ b/packages/c2pa-wc/dist/styles.js @@ -0,0 +1,30 @@ +import{r as o}from"./e4c0417e.js";const r=o` + :host { + --cai-font-size-base: 0.9375rem; + --cai-font-size-lg: 1rem; + --cai-font-size-md: 0.9375rem; + --cai-font-size-sm: 0.875rem; + --cai-border-radius: 4px; + --cai-primary-color: #2c2c2c; + --cai-secondary-color: #8e8e8e; + --cai-popover-bg-color: #ffffff; + --cai-popover-color: var(--cai-primary-color); + --cai-social-media-item-color: #1473e6; + + font-family: var(--cai-font-family); + font-size: var(--cai-font-size-base); + color: var(--cai-primary-color); + + text-align: left; + + *, + *::before, + *::after { + box-sizing: border-box; + } + } +`,i=o` + :host { + display: block; + } +`;export{i as baseSectionStyles,r as defaultStyles}; diff --git a/packages/c2pa-wc/dist/utils.d.ts b/packages/c2pa-wc/dist/utils.d.ts new file mode 100644 index 00000000..8746b9b5 --- /dev/null +++ b/packages/c2pa-wc/dist/utils.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + */ +/** + * Converts an object of keys and values (where the values are truthy values or functions + * that return something truthy) into a space-delimited set of strings, suitable for a + * class list or parts list. Made this because LitElement's classMap doesn't work with `part` + * attributes. + */ +export declare const classPartMap: (object: object | null | undefined) => string; +export declare const hasChanged: (a: any, b: any) => boolean; +export declare function defaultDateFormatter(date: Date): string; diff --git a/packages/c2pa-wc/dist/utils.js b/packages/c2pa-wc/dist/utils.js new file mode 100644 index 00000000..2441a303 --- /dev/null +++ b/packages/c2pa-wc/dist/utils.js @@ -0,0 +1 @@ +var n,t,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e={exports:{}};n=e,t=e.exports,function(){function e(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function u(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function l(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function B(n,t){for(var r=n.length;r--&&m(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Xt[n]}function F(n){return Vt.test(n)}function T(n){return Gt.test(n)}function D(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function M(n,t){return function(r){return n(t(r))}}function P(n,t){for(var r=-1,e=n.length,u=0,i=[];++r"']/g,Mn=RegExp(Tn.source),Pn=RegExp(Dn.source),Un=/<%-([\s\S]+?)%>/g,qn=/<%([\s\S]+?)%>/g,$n=/<%=([\s\S]+?)%>/g,Nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kn=/^\w*$/,Zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vn=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(Vn.source),Hn=/^\s+/,Jn=/\s/,Yn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qn=/\{\n\/\* \[wrapped with (.+)\] \*/,Xn=/,? & /,nt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,rt=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ut=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,ft=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,st=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,pt="\\ud800-\\udfff",vt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",gt="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",dt="A-Z\\xc0-\\xd6\\xd8-\\xde",yt="\\ufe0e\\ufe0f",mt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bt="['’]",wt="["+pt+"]",xt="["+mt+"]",At="["+vt+"]",It="\\d+",Wt="["+gt+"]",jt="["+_t+"]",Ot="[^"+pt+mt+It+gt+_t+dt+"]",Rt="\\ud83c[\\udffb-\\udfff]",kt="[^"+pt+"]",Et="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+dt+"]",Bt="\\u200d",Lt="(?:"+jt+"|"+Ot+")",Ct="(?:"+zt+"|"+Ot+")",Ft="(?:['’](?:d|ll|m|re|s|t|ve))?",Tt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Dt="(?:"+At+"|"+Rt+")?",Mt="["+yt+"]?",Pt=Mt+Dt+"(?:\\u200d(?:"+[kt,Et,St].join("|")+")"+Mt+Dt+")*",Ut="(?:"+[Wt,Et,St].join("|")+")"+Pt,qt="(?:"+[kt+At+"?",At,Et,St,wt].join("|")+")",$t=RegExp(bt,"g"),Nt=RegExp(At,"g"),Kt=RegExp(Rt+"(?="+Rt+")|"+qt+Pt,"g"),Zt=RegExp([zt+"?"+jt+"+"+Ft+"(?="+[xt,zt,"$"].join("|")+")",Ct+"+"+Tt+"(?="+[xt,zt+Lt,"$"].join("|")+")",zt+"?"+Lt+"+"+Ft,zt+"+"+Tt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Ut].join("|"),"g"),Vt=RegExp("["+Bt+pt+vt+yt+"]"),Gt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ht=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jt=-1,Yt={};Yt[Wn]=Yt[jn]=Yt[On]=Yt[Rn]=Yt[kn]=Yt[En]=Yt[Sn]=Yt[zn]=Yt[Bn]=!0,Yt[an]=Yt[fn]=Yt[An]=Yt[cn]=Yt[In]=Yt[ln]=Yt[sn]=Yt[hn]=Yt[vn]=Yt[gn]=Yt[_n]=Yt[yn]=Yt[mn]=Yt[bn]=Yt[xn]=!1;var Qt={};Qt[an]=Qt[fn]=Qt[An]=Qt[In]=Qt[cn]=Qt[ln]=Qt[Wn]=Qt[jn]=Qt[On]=Qt[Rn]=Qt[kn]=Qt[vn]=Qt[gn]=Qt[_n]=Qt[yn]=Qt[mn]=Qt[bn]=Qt[wn]=Qt[En]=Qt[Sn]=Qt[zn]=Qt[Bn]=!0,Qt[sn]=Qt[hn]=Qt[xn]=!1;var Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nr=parseFloat,tr=parseInt,rr="object"==typeof r&&r&&r.Object===Object&&r,er="object"==typeof self&&self&&self.Object===Object&&self,ur=rr||er||Function("return this")(),ir=t&&!t.nodeType&&t,or=ir&&n&&!n.nodeType&&n,ar=or&&or.exports===ir,fr=ar&&rr.process,cr=function(){try{var n=or&&or.require&&or.require("util").types;return n||fr&&fr.binding&&fr.binding("util")}catch(n){}}(),lr=cr&&cr.isArrayBuffer,sr=cr&&cr.isDate,hr=cr&&cr.isMap,pr=cr&&cr.isRegExp,vr=cr&&cr.isSet,gr=cr&&cr.isTypedArray,_r=A("length"),dr=I({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),yr=I({"&":"&","<":"<",">":">",'"':""","'":"'"}),mr=I({"&":"&","<":"<",">":">",""":'"',"'":"'"}),br=function n(t){function r(n){if(Pu(n)&&!Ea(n)&&!(n instanceof nt)){if(n instanceof Jn)return n;if(ki.call(n,"__wrapped__"))return hu(n)}return new Jn(n)}function I(){}function Jn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function nt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=un,this.__views__=[]}function pt(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Et(n,t,r,e,u,o){var a,f=1&t,c=2&t,l=4&t;if(r&&(a=u?r(n,e,u,o):r(n)),a!==Z)return a;if(!Mu(n))return n;var s=Ea(n);if(s){if(a=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&ki.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!f)return ce(n,a)}else{var h=Po(n),p=h==hn||h==pn;if(za(n))return ee(n,f);if(h==_n||h==an||p&&!u){if(a=c||p?{}:Ve(n),!f)return c?function(n,t){return le(n,Mo(n),t)}(n,function(n,t){return n&&le(t,ti(t),n)}(a,n)):function(n,t){return le(n,Do(n),t)}(n,jt(a,n))}else{if(!Qt[h])return u?n:{};a=function(n,t,r){var e=n.constructor;switch(t){case An:return ue(n);case cn:case ln:return new e(+n);case In:return function(n,t){return new n.constructor(t?ue(n.buffer):n.buffer,n.byteOffset,n.byteLength)}(n,r);case Wn:case jn:case On:case Rn:case kn:case En:case Sn:case zn:case Bn:return ie(n,r);case vn:return new e;case gn:case bn:return new e(n);case yn:return function(n){var t=new n.constructor(n.source,ut.exec(n));return t.lastIndex=n.lastIndex,t}(n);case mn:return new e;case wn:return function(n){return Wo?bi(Wo.call(n)):{}}(n)}}(n,h,f)}}o||(o=new dt);var v=o.get(n);if(v)return v;o.set(n,a),Fa(n)?n.forEach((function(e){a.add(Et(e,t,r,e,n,o))})):La(n)&&n.forEach((function(e,u){a.set(u,Et(e,t,r,u,n,o))}));var g=s?Z:(l?c?Me:De:c?ti:ni)(n);return i(g||n,(function(e,u){g&&(e=n[u=e]),At(a,u,Et(e,t,r,u,n,o))})),a}function St(n,t,r){var e=r.length;if(null==n)return!e;for(n=bi(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Z&&!(u in n)||!i(o))return!1}return!0}function zt(n,t,r){if("function"!=typeof n)throw new Ai(V);return $o((function(){n.apply(Z,r)}),t)}function Bt(n,t,r,e){var u=-1,i=c,o=!0,a=n.length,f=[],h=t.length;if(!a)return f;r&&(t=s(t,k(r))),e?(i=l,o=!1):t.length>=200&&(i=S,o=!1,t=new _t(t));n:for(;++u0&&r(a)?t>1?Tt(a,t-1,r,e,u):h(u,a):e||(u[u.length]=a)}return u}function Dt(n,t){return n&&Eo(n,t,ni)}function Mt(n,t){return n&&So(n,t,ni)}function Pt(n,t){return f(t,(function(t){return Fu(n[t])}))}function Ut(n,t){for(var r=0,e=(t=te(t,n)).length;null!=n&&rt}function Vt(n,t){return null!=n&&ki.call(n,t)}function Gt(n,t){return null!=n&&t in bi(n)}function Xt(n,t,r){for(var e=r?l:c,u=n[0].length,i=n.length,o=i,a=gi(i),f=1/0,h=[];o--;){var p=n[o];o&&t&&(p=s(p,k(t))),f=io(p.length,f),a[o]=!r&&(t||u>=120&&p.length>=120)?new _t(o&&p):Z}p=n[0];var v=-1,g=a[0];n:for(;++v=a?f:f*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)}))}function kr(n,t,r){for(var e=-1,u=t.length,i={};++e-1;)a!==n&&$i.call(a,f,1),$i.call(n,f,1);return n}function Sr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;He(u)?$i.call(n,u,1):Vr(n,u)}}return n}function zr(n,t){return n+Qi(fo()*(t-n+1))}function Br(n,t){var r="";if(!n||t<1||t>rn)return r;do{t%2&&(r+=n),(t=Qi(t/2))&&(n+=n)}while(t);return r}function Lr(n,t){return No(ru(n,t,fi),n+"")}function Cr(n){return mt(ei(n))}function Fr(n,t){var r=ei(n);return fu(r,kt(t,0,r.length))}function Tr(n,t,r,e){if(!Mu(n))return n;for(var u=-1,i=(t=te(t,n)).length,o=i-1,a=n;null!=a&&++uu?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=gi(u);++e>>1,o=n[i];null!==o&&!Nu(o)&&(r?o<=t:o=200){var s=t?null:Fo(n);if(s)return U(s);o=!1,u=S,f=new _t}else f=t?[]:a;n:for(;++e=e?n:Mr(n,t,r)}function ee(n,t){if(t)return n.slice();var r=n.length,e=Mi?Mi(r):new n.constructor(r);return n.copy(e),e}function ue(n){var t=new n.constructor(n.byteLength);return new Di(t).set(new Di(n)),t}function ie(n,t){return new n.constructor(t?ue(n.buffer):n.buffer,n.byteOffset,n.length)}function oe(n,t){if(n!==t){var r=n!==Z,e=null===n,u=n==n,i=Nu(n),o=t!==Z,a=null===t,f=t==t,c=Nu(t);if(!a&&!c&&!i&&n>t||i&&o&&f&&!a&&!c||e&&o&&f||!r&&f||!u)return 1;if(!e&&!i&&!c&&n1?r[u-1]:Z,o=u>2?r[2]:Z;for(i=n.length>3&&"function"==typeof i?(u--,i):Z,o&&Je(r[0],r[1],o)&&(i=u<3?Z:i,u=1),t=bi(t);++e-1?u[i?t[o]:o]:Z}}function be(n){return Te((function(t){var r=t.length,e=r,u=Jn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new Ai(V);if(u&&!o&&"wrapper"==Pe(i))var o=new Jn([],!0)}for(e=o?e:r;++e1&&y.reverse(),l&&fa))return!1;var c=i.get(n),l=i.get(t);if(c&&l)return c==t&&l==n;var s=-1,h=!0,p=2&r?new _t:Z;for(i.set(n,t),i.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Yn,"{\n/* [wrapped with "+t+"] */\n")}(e,su(function(n){var t=n.match(Qn);return t?t[1].split(Xn):[]}(e),r)))}function au(n){var t=0,r=0;return function(){var e=oo(),u=16-(e-r);if(r=e,u>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(Z,arguments)}}function fu(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Z?e:t;++r0&&(r=t.apply(this,arguments)),n<=1&&(t=Z),r}}function ku(n,t,r){function e(t){var r=c,e=l;return c=l=Z,g=t,h=n.apply(e,r)}function u(n){return g=n,p=$o(o,t),_?e(n):h}function i(n){var r=n-v;return v===Z||r>=t||r<0||d&&n-g>=s}function o(){var n=ya();return i(n)?a(n):(p=$o(o,function(n){var r=t-(n-v);return d?io(r,s-(n-g)):r}(n)),Z)}function a(n){return p=Z,y&&c?e(n):(c=l=Z,h)}function f(){var n=ya(),r=i(n);if(c=arguments,l=this,v=n,r){if(p===Z)return u(v);if(d)return Co(p),p=$o(o,t),e(v)}return p===Z&&(p=$o(o,t)),h}var c,l,s,h,p,v,g=0,_=!1,d=!1,y=!0;if("function"!=typeof n)throw new Ai(V);return t=Hu(t)||0,Mu(r)&&(_=!!r.leading,s=(d="maxWait"in r)?uo(Hu(r.maxWait)||0,t):s,y="trailing"in r?!!r.trailing:y),f.cancel=function(){p!==Z&&Co(p),g=0,c=v=l=p=Z},f.flush=function(){return p===Z?h:a(ya())},f}function Eu(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Ai(V);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Eu.Cache||gt),r}function Su(n){if("function"!=typeof n)throw new Ai(V);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function zu(n,t){return n===t||n!=n&&t!=t}function Bu(n){return null!=n&&Du(n.length)&&!Fu(n)}function Lu(n){return Pu(n)&&Bu(n)}function Cu(n){if(!Pu(n))return!1;var t=Kt(n);return t==sn||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!qu(n)}function Fu(n){if(!Mu(n))return!1;var t=Kt(n);return t==hn||t==pn||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Tu(n){return"number"==typeof n&&n==Vu(n)}function Du(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=rn}function Mu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function Pu(n){return null!=n&&"object"==typeof n}function Uu(n){return"number"==typeof n||Pu(n)&&Kt(n)==gn}function qu(n){if(!Pu(n)||Kt(n)!=_n)return!1;var t=Pi(n);if(null===t)return!0;var r=ki.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ri.call(r)==Bi}function $u(n){return"string"==typeof n||!Ea(n)&&Pu(n)&&Kt(n)==bn}function Nu(n){return"symbol"==typeof n||Pu(n)&&Kt(n)==wn}function Ku(n){if(!n)return[];if(Bu(n))return $u(n)?$(n):ce(n);if(Ki&&n[Ki])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Ki]());var t=Po(n);return(t==vn?D:t==mn?U:ei)(n)}function Zu(n){return n?(n=Hu(n))===tn||n===-tn?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function Vu(n){var t=Zu(n),r=t%1;return t==t?r?t-r:t:0}function Gu(n){return n?kt(Vu(n),0,un):0}function Hu(n){if("number"==typeof n)return n;if(Nu(n))return en;if(Mu(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=Mu(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=ot.test(n);return r||ft.test(n)?tr(n.slice(2),r?2:8):it.test(n)?en:+n}function Ju(n){return le(n,ti(n))}function Yu(n){return null==n?"":Kr(n)}function Qu(n,t,r){var e=null==n?Z:Ut(n,t);return e===Z?r:e}function Xu(n,t){return null!=n&&Ze(n,t,Gt)}function ni(n){return Bu(n)?yt(n):_r(n)}function ti(n){return Bu(n)?yt(n,!0):wr(n)}function ri(n,t){if(null==n)return{};var r=s(Me(n),(function(n){return[n]}));return t=qe(t),kr(n,r,(function(n,r){return t(n,r[0])}))}function ei(n){return null==n?[]:E(n,ni(n))}function ui(n){return lf(Yu(n).toLowerCase())}function ii(n){return(n=Yu(n))&&n.replace(lt,dr).replace(Nt,"")}function oi(n,t,r){return n=Yu(n),(t=r?Z:t)===Z?T(n)?K(n):_(n):n.match(t)||[]}function ai(n){return function(){return n}}function fi(n){return n}function ci(n){return cr("function"==typeof n?n:Et(n,1))}function li(n,t,r){var e=ni(t),u=Pt(t,e);null!=r||Mu(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=Pt(t,ni(t)));var o=!(Mu(r)&&"chain"in r&&!r.chain),a=Fu(n);return i(u,(function(r){var e=t[r];n[r]=e,a&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=ce(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,h([this.value()],arguments))})})),n}function si(){}function hi(n){return Ye(n)?A(cu(n)):function(n){return function(t){return Ut(t,n)}}(n)}function pi(){return[]}function vi(){return!1}var gi=(t=null==t?ur:br.defaults(ur.Object(),t,br.pick(ur,Ht))).Array,_i=t.Date,di=t.Error,yi=t.Function,mi=t.Math,bi=t.Object,wi=t.RegExp,xi=t.String,Ai=t.TypeError,Ii=gi.prototype,Wi=yi.prototype,ji=bi.prototype,Oi=t["__core-js_shared__"],Ri=Wi.toString,ki=ji.hasOwnProperty,Ei=0,Si=function(){var n=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),zi=ji.toString,Bi=Ri.call(bi),Li=ur._,Ci=wi("^"+Ri.call(ki).replace(Vn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fi=ar?t.Buffer:Z,Ti=t.Symbol,Di=t.Uint8Array,Mi=Fi?Fi.allocUnsafe:Z,Pi=M(bi.getPrototypeOf,bi),Ui=bi.create,qi=ji.propertyIsEnumerable,$i=Ii.splice,Ni=Ti?Ti.isConcatSpreadable:Z,Ki=Ti?Ti.iterator:Z,Zi=Ti?Ti.toStringTag:Z,Vi=function(){try{var n=Ke(bi,"defineProperty");return n({},"",{}),n}catch(n){}}(),Gi=t.clearTimeout!==ur.clearTimeout&&t.clearTimeout,Hi=_i&&_i.now!==ur.Date.now&&_i.now,Ji=t.setTimeout!==ur.setTimeout&&t.setTimeout,Yi=mi.ceil,Qi=mi.floor,Xi=bi.getOwnPropertySymbols,no=Fi?Fi.isBuffer:Z,to=t.isFinite,ro=Ii.join,eo=M(bi.keys,bi),uo=mi.max,io=mi.min,oo=_i.now,ao=t.parseInt,fo=mi.random,co=Ii.reverse,lo=Ke(t,"DataView"),so=Ke(t,"Map"),ho=Ke(t,"Promise"),po=Ke(t,"Set"),vo=Ke(t,"WeakMap"),go=Ke(bi,"create"),_o=vo&&new vo,yo={},mo=lu(lo),bo=lu(so),wo=lu(ho),xo=lu(po),Ao=lu(vo),Io=Ti?Ti.prototype:Z,Wo=Io?Io.valueOf:Z,jo=Io?Io.toString:Z,Oo=function(){function n(){}return function(t){if(!Mu(t))return{};if(Ui)return Ui(t);n.prototype=t;var r=new n;return n.prototype=Z,r}}();r.templateSettings={escape:Un,evaluate:qn,interpolate:$n,variable:"",imports:{_:r}},r.prototype=I.prototype,r.prototype.constructor=r,Jn.prototype=Oo(I.prototype),Jn.prototype.constructor=Jn,nt.prototype=Oo(I.prototype),nt.prototype.constructor=nt,pt.prototype.clear=function(){this.__data__=go?go(null):{},this.size=0},pt.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},pt.prototype.get=function(n){var t=this.__data__;if(go){var r=t[n];return r===G?Z:r}return ki.call(t,n)?t[n]:Z},pt.prototype.has=function(n){var t=this.__data__;return go?t[n]!==Z:ki.call(t,n)},pt.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=go&&t===Z?G:t,this},vt.prototype.clear=function(){this.__data__=[],this.size=0},vt.prototype.delete=function(n){var t=this.__data__,r=It(t,n);return!(r<0||(r==t.length-1?t.pop():$i.call(t,r,1),--this.size,0))},vt.prototype.get=function(n){var t=this.__data__,r=It(t,n);return r<0?Z:t[r][1]},vt.prototype.has=function(n){return It(this.__data__,n)>-1},vt.prototype.set=function(n,t){var r=this.__data__,e=It(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},gt.prototype.clear=function(){this.size=0,this.__data__={hash:new pt,map:new(so||vt),string:new pt}},gt.prototype.delete=function(n){var t=$e(this,n).delete(n);return this.size-=t?1:0,t},gt.prototype.get=function(n){return $e(this,n).get(n)},gt.prototype.has=function(n){return $e(this,n).has(n)},gt.prototype.set=function(n,t){var r=$e(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},_t.prototype.add=_t.prototype.push=function(n){return this.__data__.set(n,G),this},_t.prototype.has=function(n){return this.__data__.has(n)},dt.prototype.clear=function(){this.__data__=new vt,this.size=0},dt.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},dt.prototype.get=function(n){return this.__data__.get(n)},dt.prototype.has=function(n){return this.__data__.has(n)},dt.prototype.set=function(n,t){var r=this.__data__;if(r instanceof vt){var e=r.__data__;if(!so||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new gt(e)}return r.set(n,t),this.size=r.size,this};var Ro=pe(Dt),ko=pe(Mt,!0),Eo=ve(),So=ve(!0),zo=_o?function(n,t){return _o.set(n,t),n}:fi,Bo=Vi?function(n,t){return Vi(n,"toString",{configurable:!0,enumerable:!1,value:ai(t),writable:!0})}:fi,Lo=Lr,Co=Gi||function(n){return ur.clearTimeout(n)},Fo=po&&1/U(new po([,-0]))[1]==tn?function(n){return new po(n)}:si,To=_o?function(n){return _o.get(n)}:si,Do=Xi?function(n){return null==n?[]:(n=bi(n),f(Xi(n),(function(t){return qi.call(n,t)})))}:pi,Mo=Xi?function(n){for(var t=[];n;)h(t,Do(n)),n=Pi(n);return t}:pi,Po=Kt;(lo&&Po(new lo(new ArrayBuffer(1)))!=In||so&&Po(new so)!=vn||ho&&Po(ho.resolve())!=dn||po&&Po(new po)!=mn||vo&&Po(new vo)!=xn)&&(Po=function(n){var t=Kt(n),r=t==_n?n.constructor:Z,e=r?lu(r):"";if(e)switch(e){case mo:return In;case bo:return vn;case wo:return dn;case xo:return mn;case Ao:return xn}return t});var Uo=Oi?Fu:vi,qo=au(zo),$o=Ji||function(n,t){return ur.setTimeout(n,t)},No=au(Bo),Ko=function(n){var t=Eu(n,(function(n){return 500===r.size&&r.clear(),n})),r=t.cache;return t}((function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Zn,(function(n,r,e,u){t.push(e?u.replace(rt,"$1"):r||n)})),t})),Zo=Lr((function(n,t){return Lu(n)?Bt(n,Tt(t,1,Lu,!0)):[]})),Vo=Lr((function(n,t){var r=du(t);return Lu(r)&&(r=Z),Lu(n)?Bt(n,Tt(t,1,Lu,!0),qe(r,2)):[]})),Go=Lr((function(n,t){var r=du(t);return Lu(r)&&(r=Z),Lu(n)?Bt(n,Tt(t,1,Lu,!0),Z,r):[]})),Ho=Lr((function(n){var t=s(n,Xr);return t.length&&t[0]===n[0]?Xt(t):[]})),Jo=Lr((function(n){var t=du(n),r=s(n,Xr);return t===du(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?Xt(r,qe(t,2)):[]})),Yo=Lr((function(n){var t=du(n),r=s(n,Xr);return(t="function"==typeof t?t:Z)&&r.pop(),r.length&&r[0]===n[0]?Xt(r,Z,t):[]})),Qo=Lr(yu),Xo=Te((function(n,t){var r=null==n?0:n.length,e=Rt(n,t);return Sr(n,s(t,(function(n){return He(n,r)?+n:n})).sort(oe)),e})),na=Lr((function(n){return Zr(Tt(n,1,Lu,!0))})),ta=Lr((function(n){var t=du(n);return Lu(t)&&(t=Z),Zr(Tt(n,1,Lu,!0),qe(t,2))})),ra=Lr((function(n){var t=du(n);return t="function"==typeof t?t:Z,Zr(Tt(n,1,Lu,!0),Z,t)})),ea=Lr((function(n,t){return Lu(n)?Bt(n,t):[]})),ua=Lr((function(n){return Yr(f(n,Lu))})),ia=Lr((function(n){var t=du(n);return Lu(t)&&(t=Z),Yr(f(n,Lu),qe(t,2))})),oa=Lr((function(n){var t=du(n);return t="function"==typeof t?t:Z,Yr(f(n,Lu),Z,t)})),aa=Lr(bu),fa=Lr((function(n){var t=n.length,r=t>1?n[t-1]:Z;return r="function"==typeof r?(n.pop(),r):Z,wu(n,r)})),ca=Te((function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Rt(t,n)};return!(t>1||this.__actions__.length)&&e instanceof nt&&He(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:Au,args:[u],thisArg:Z}),new Jn(e,this.__chain__).thru((function(n){return t&&!n.length&&n.push(Z),n}))):this.thru(u)})),la=se((function(n,t,r){ki.call(n,r)?++n[r]:Ot(n,r,1)})),sa=me(pu),ha=me(vu),pa=se((function(n,t,r){ki.call(n,r)?n[r].push(t):Ot(n,r,[t])})),va=Lr((function(n,t,r){var u=-1,i="function"==typeof t,o=Bu(n)?gi(n.length):[];return Ro(n,(function(n){o[++u]=i?e(t,n,r):rr(n,t,r)})),o})),ga=se((function(n,t,r){Ot(n,r,t)})),_a=se((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]})),da=Lr((function(n,t){if(null==n)return[];var r=t.length;return r>1&&Je(n,t[0],t[1])?t=[]:r>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),Rr(n,Tt(t,1),[])})),ya=Hi||function(){return ur.Date.now()},ma=Lr((function(n,t,r){var e=1;if(r.length){var u=P(r,Ue(ma));e|=Y}return ze(n,e,t,r,u)})),ba=Lr((function(n,t,r){var e=3;if(r.length){var u=P(r,Ue(ba));e|=Y}return ze(t,e,n,r,u)})),wa=Lr((function(n,t){return zt(n,1,t)})),xa=Lr((function(n,t,r){return zt(n,Hu(t)||0,r)}));Eu.Cache=gt;var Aa=Lo((function(n,t){var r=(t=1==t.length&&Ea(t[0])?s(t[0],k(qe())):s(Tt(t,1),k(qe()))).length;return Lr((function(u){for(var i=-1,o=io(u.length,r);++i=t})),ka=er(function(){return arguments}())?er:function(n){return Pu(n)&&ki.call(n,"callee")&&!qi.call(n,"callee")},Ea=gi.isArray,Sa=lr?k(lr):function(n){return Pu(n)&&Kt(n)==An},za=no||vi,Ba=sr?k(sr):function(n){return Pu(n)&&Kt(n)==ln},La=hr?k(hr):function(n){return Pu(n)&&Po(n)==vn},Ca=pr?k(pr):function(n){return Pu(n)&&Kt(n)==yn},Fa=vr?k(vr):function(n){return Pu(n)&&Po(n)==mn},Ta=gr?k(gr):function(n){return Pu(n)&&Du(n.length)&&!!Yt[Kt(n)]},Da=Re(xr),Ma=Re((function(n,t){return n<=t})),Pa=he((function(n,t){if(Xe(t)||Bu(t))return le(t,ni(t),n),Z;for(var r in t)ki.call(t,r)&&At(n,r,t[r])})),Ua=he((function(n,t){le(t,ti(t),n)})),qa=he((function(n,t,r,e){le(t,ti(t),n,e)})),$a=he((function(n,t,r,e){le(t,ni(t),n,e)})),Na=Te(Rt),Ka=Lr((function(n,t){n=bi(n);var r=-1,e=t.length,u=e>2?t[2]:Z;for(u&&Je(t[0],t[1],u)&&(e=1);++r1),t})),le(n,Me(n),r),e&&(r=Et(r,7,Ce));for(var u=t.length;u--;)Vr(r,t[u]);return r})),Xa=Te((function(n,t){return null==n?{}:function(n,t){return kr(n,t,(function(t,r){return Xu(n,r)}))}(n,t)})),nf=Se(ni),tf=Se(ti),rf=_e((function(n,t,r){return t=t.toLowerCase(),n+(r?ui(t):t)})),ef=_e((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),uf=_e((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),of=ge("toLowerCase"),af=_e((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()})),ff=_e((function(n,t,r){return n+(r?" ":"")+lf(t)})),cf=_e((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),lf=ge("toUpperCase"),sf=Lr((function(n,t){try{return e(n,Z,t)}catch(n){return Cu(n)?n:new di(n)}})),hf=Te((function(n,t){return i(t,(function(t){t=cu(t),Ot(n,t,ma(n[t],n))})),n})),pf=be(),vf=be(!0),gf=Lr((function(n,t){return function(r){return rr(r,n,t)}})),_f=Lr((function(n,t){return function(r){return rr(n,r,t)}})),df=Ie(s),yf=Ie(a),mf=Ie(g),bf=Oe(),wf=Oe(!0),xf=Ae((function(n,t){return n+t}),0),Af=Ee("ceil"),If=Ae((function(n,t){return n/t}),1),Wf=Ee("floor"),jf=Ae((function(n,t){return n*t}),1),Of=Ee("round"),Rf=Ae((function(n,t){return n-t}),0);return r.after=function(n,t){if("function"!=typeof t)throw new Ai(V);return n=Vu(n),function(){if(--n<1)return t.apply(this,arguments)}},r.ary=Ou,r.assign=Pa,r.assignIn=Ua,r.assignInWith=qa,r.assignWith=$a,r.at=Na,r.before=Ru,r.bind=ma,r.bindAll=hf,r.bindKey=ba,r.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Ea(n)?n:[n]},r.chain=xu,r.chunk=function(n,t,r){t=(r?Je(n,t,r):t===Z)?1:uo(Vu(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=gi(Yi(e/t));uu?0:u+r),(e=e===Z||e>u?u:Vu(e))<0&&(e+=u),e=r>e?0:Gu(e);r>>0)?(n=Yu(n))&&("string"==typeof t||null!=t&&!Ca(t))&&!(t=Kr(t))&&F(n)?re($(n),0,r):n.split(t,r):[]},r.spread=function(n,t){if("function"!=typeof n)throw new Ai(V);return t=null==t?0:uo(Vu(t),0),Lr((function(r){var u=r[t],i=re(r,0,t);return u&&h(i,u),e(n,this,i)}))},r.tail=function(n){var t=null==n?0:n.length;return t?Mr(n,1,t):[]},r.take=function(n,t,r){return n&&n.length?Mr(n,0,(t=r||t===Z?1:Vu(t))<0?0:t):[]},r.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?Mr(n,(t=e-(t=r||t===Z?1:Vu(t)))<0?0:t,e):[]},r.takeRightWhile=function(n,t){return n&&n.length?Hr(n,qe(t,3),!1,!0):[]},r.takeWhile=function(n,t){return n&&n.length?Hr(n,qe(t,3)):[]},r.tap=function(n,t){return t(n),n},r.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Ai(V);return Mu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ku(n,t,{leading:e,maxWait:t,trailing:u})},r.thru=Au,r.toArray=Ku,r.toPairs=nf,r.toPairsIn=tf,r.toPath=function(n){return Ea(n)?s(n,cu):Nu(n)?[n]:ce(Ko(Yu(n)))},r.toPlainObject=Ju,r.transform=function(n,t,r){var e=Ea(n),u=e||za(n)||Ta(n);if(t=qe(t,4),null==r){var o=n&&n.constructor;r=u?e?new o:[]:Mu(n)&&Fu(o)?Oo(Pi(n)):{}}return(u?i:Dt)(n,(function(n,e,u){return t(r,n,e,u)})),r},r.unary=function(n){return Ou(n,1)},r.union=na,r.unionBy=ta,r.unionWith=ra,r.uniq=function(n){return n&&n.length?Zr(n):[]},r.uniqBy=function(n,t){return n&&n.length?Zr(n,qe(t,2)):[]},r.uniqWith=function(n,t){return t="function"==typeof t?t:Z,n&&n.length?Zr(n,Z,t):[]},r.unset=function(n,t){return null==n||Vr(n,t)},r.unzip=bu,r.unzipWith=wu,r.update=function(n,t,r){return null==n?n:Gr(n,t,ne(r))},r.updateWith=function(n,t,r,e){return e="function"==typeof e?e:Z,null==n?n:Gr(n,t,ne(r),e)},r.values=ei,r.valuesIn=function(n){return null==n?[]:E(n,ti(n))},r.without=ea,r.words=oi,r.wrap=function(n,t){return Ia(ne(t),n)},r.xor=ua,r.xorBy=ia,r.xorWith=oa,r.zip=aa,r.zipObject=function(n,t){return Qr(n||[],t||[],At)},r.zipObjectDeep=function(n,t){return Qr(n||[],t||[],Tr)},r.zipWith=fa,r.entries=nf,r.entriesIn=tf,r.extend=Ua,r.extendWith=qa,li(r,r),r.add=xf,r.attempt=sf,r.camelCase=rf,r.capitalize=ui,r.ceil=Af,r.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=(r=Hu(r))==r?r:0),t!==Z&&(t=(t=Hu(t))==t?t:0),kt(Hu(n),t,r)},r.clone=function(n){return Et(n,4)},r.cloneDeep=function(n){return Et(n,5)},r.cloneDeepWith=function(n,t){return Et(n,5,t="function"==typeof t?t:Z)},r.cloneWith=function(n,t){return Et(n,4,t="function"==typeof t?t:Z)},r.conformsTo=function(n,t){return null==t||St(n,t,ni(t))},r.deburr=ii,r.defaultTo=function(n,t){return null==n||n!=n?t:n},r.divide=If,r.endsWith=function(n,t,r){n=Yu(n),t=Kr(t);var e=n.length,u=r=r===Z?e:kt(Vu(r),0,e);return(r-=t.length)>=0&&n.slice(r,u)==t},r.eq=zu,r.escape=function(n){return(n=Yu(n))&&Pn.test(n)?n.replace(Dn,yr):n},r.escapeRegExp=function(n){return(n=Yu(n))&&Gn.test(n)?n.replace(Vn,"\\$&"):n},r.every=function(n,t,r){var e=Ea(n)?a:Lt;return r&&Je(n,t,r)&&(t=Z),e(n,qe(t,3))},r.find=sa,r.findIndex=pu,r.findKey=function(n,t){return d(n,qe(t,3),Dt)},r.findLast=ha,r.findLastIndex=vu,r.findLastKey=function(n,t){return d(n,qe(t,3),Mt)},r.floor=Wf,r.forEach=Iu,r.forEachRight=Wu,r.forIn=function(n,t){return null==n?n:Eo(n,qe(t,3),ti)},r.forInRight=function(n,t){return null==n?n:So(n,qe(t,3),ti)},r.forOwn=function(n,t){return n&&Dt(n,qe(t,3))},r.forOwnRight=function(n,t){return n&&Mt(n,qe(t,3))},r.get=Qu,r.gt=Oa,r.gte=Ra,r.has=function(n,t){return null!=n&&Ze(n,t,Vt)},r.hasIn=Xu,r.head=_u,r.identity=fi,r.includes=function(n,t,r,e){n=Bu(n)?n:ei(n),r=r&&!e?Vu(r):0;var u=n.length;return r<0&&(r=uo(u+r,0)),$u(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&m(n,t,r)>-1},r.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Vu(r);return u<0&&(u=uo(e+u,0)),m(n,t,u)},r.inRange=function(n,t,r){return t=Zu(t),r===Z?(r=t,t=0):r=Zu(r),function(n,t,r){return n>=io(t,r)&&n=-rn&&n<=rn},r.isSet=Fa,r.isString=$u,r.isSymbol=Nu,r.isTypedArray=Ta,r.isUndefined=function(n){return n===Z},r.isWeakMap=function(n){return Pu(n)&&Po(n)==xn},r.isWeakSet=function(n){return Pu(n)&&"[object WeakSet]"==Kt(n)},r.join=function(n,t){return null==n?"":ro.call(n,t)},r.kebabCase=ef,r.last=du,r.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==Z&&(u=(u=Vu(r))<0?uo(e+u,0):io(u,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,u):y(n,w,u,!0)},r.lowerCase=uf,r.lowerFirst=of,r.lt=Da,r.lte=Ma,r.max=function(n){return n&&n.length?Ct(n,fi,Zt):Z},r.maxBy=function(n,t){return n&&n.length?Ct(n,qe(t,2),Zt):Z},r.mean=function(n){return x(n,fi)},r.meanBy=function(n,t){return x(n,qe(t,2))},r.min=function(n){return n&&n.length?Ct(n,fi,xr):Z},r.minBy=function(n,t){return n&&n.length?Ct(n,qe(t,2),xr):Z},r.stubArray=pi,r.stubFalse=vi,r.stubObject=function(){return{}},r.stubString=function(){return""},r.stubTrue=function(){return!0},r.multiply=jf,r.nth=function(n,t){return n&&n.length?Or(n,Vu(t)):Z},r.noConflict=function(){return ur._===this&&(ur._=Li),this},r.noop=si,r.now=ya,r.pad=function(n,t,r){n=Yu(n);var e=(t=Vu(t))?q(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return We(Qi(u),r)+n+We(Yi(u),r)},r.padEnd=function(n,t,r){n=Yu(n);var e=(t=Vu(t))?q(n):0;return t&&et){var e=n;n=t,t=e}if(r||n%1||t%1){var u=fo();return io(n+u*(t-n+nr("1e-"+((u+"").length-1))),t)}return zr(n,t)},r.reduce=function(n,t,r){var e=Ea(n)?p:W,u=arguments.length<3;return e(n,qe(t,4),r,u,Ro)},r.reduceRight=function(n,t,r){var e=Ea(n)?v:W,u=arguments.length<3;return e(n,qe(t,4),r,u,ko)},r.repeat=function(n,t,r){return t=(r?Je(n,t,r):t===Z)?1:Vu(t),Br(Yu(n),t)},r.replace=function(){var n=arguments,t=Yu(n[0]);return n.length<3?t:t.replace(n[1],n[2])},r.result=function(n,t,r){var e=-1,u=(t=te(t,n)).length;for(u||(u=1,n=Z);++ern)return[];var r=un,e=io(n,un);t=qe(t),n-=un;for(var u=O(e,t);++r=i)return n;var a=r-q(e);if(a<1)return e;var f=o?re(o,0,a).join(""):n.slice(0,a);if(u===Z)return f+e;if(o&&(a+=f.length-a),Ca(u)){if(n.slice(a).search(u)){var c,l=f;for(u.global||(u=wi(u.source,Yu(ut.exec(u))+"g")),u.lastIndex=0;c=u.exec(l);)var s=c.index;f=f.slice(0,s===Z?a:s)}}else if(n.indexOf(Kr(u),a)!=a){var h=f.lastIndexOf(u);h>-1&&(f=f.slice(0,h))}return f+e},r.unescape=function(n){return(n=Yu(n))&&Mn.test(n)?n.replace(Tn,mr):n},r.uniqueId=function(n){var t=++Ei;return Yu(n)+t},r.upperCase=cf,r.upperFirst=lf,r.each=Iu,r.eachRight=Wu,r.first=_u,li(r,function(){var n={};return Dt(r,(function(t,e){ki.call(r.prototype,e)||(n[e]=t)})),n}(),{chain:!1}),r.VERSION="4.17.21",i(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){r[n].placeholder=r})),i(["drop","take"],(function(n,t){nt.prototype[n]=function(r){r=r===Z?1:uo(Vu(r),0);var e=this.__filtered__&&!t?new nt(this):this.clone();return e.__filtered__?e.__takeCount__=io(r,e.__takeCount__):e.__views__.push({size:io(r,un),type:n+(e.__dir__<0?"Right":"")}),e},nt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),i(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;nt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:qe(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),i(["head","last"],(function(n,t){var r="take"+(t?"Right":"");nt.prototype[n]=function(){return this[r](1).value()[0]}})),i(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");nt.prototype[n]=function(){return this.__filtered__?new nt(this):this[r](1)}})),nt.prototype.compact=function(){return this.filter(fi)},nt.prototype.find=function(n){return this.filter(n).head()},nt.prototype.findLast=function(n){return this.reverse().find(n)},nt.prototype.invokeMap=Lr((function(n,t){return"function"==typeof n?new nt(this):this.map((function(r){return rr(r,n,t)}))})),nt.prototype.reject=function(n){return this.filter(Su(qe(n)))},nt.prototype.slice=function(n,t){n=Vu(n);var r=this;return r.__filtered__&&(n>0||t<0)?new nt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(r=(t=Vu(t))<0?r.dropRight(-t):r.take(t-n)),r)},nt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},nt.prototype.toArray=function(){return this.take(un)},Dt(nt.prototype,(function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),i=r[u?"take"+("last"==t?"Right":""):t],o=u||/^find/.test(t);i&&(r.prototype[t]=function(){var t=this.__wrapped__,a=u?[1]:arguments,f=t instanceof nt,c=a[0],l=f||Ea(t),s=function(n){var t=i.apply(r,h([n],a));return u&&p?t[0]:t};l&&e&&"function"==typeof c&&1!=c.length&&(f=l=!1);var p=this.__chain__,v=!!this.__actions__.length,g=o&&!p,_=f&&!v;if(!o&&l){t=_?t:new nt(this);var d=n.apply(t,a);return d.__actions__.push({func:Au,args:[s],thisArg:Z}),new Jn(d,p)}return g&&_?n.apply(this,a):(d=this.thru(s),g?u?d.value()[0]:d.value():d)})})),i(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Ii[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",u=/^(?:pop|shift)$/.test(n);r.prototype[n]=function(){var n=arguments;if(u&&!this.__chain__){var r=this.value();return t.apply(Ea(r)?r:[],n)}return this[e]((function(r){return t.apply(Ea(r)?r:[],n)}))}})),Dt(nt.prototype,(function(n,t){var e=r[t];if(e){var u=e.name+"";ki.call(yo,u)||(yo[u]=[]),yo[u].push({name:t,func:e})}})),yo[we(Z,2).name]=[{name:"wrapper",func:Z}],nt.prototype.clone=function(){var n=new nt(this.__wrapped__);return n.__actions__=ce(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=ce(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=ce(this.__views__),n},nt.prototype.reverse=function(){if(this.__filtered__){var n=new nt(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},nt.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Ea(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e=this.__values__.length;return{done:n,value:n?Z:this.__values__[this.__index__++]}},r.prototype.plant=function(n){for(var t,r=this;r instanceof I;){var e=hu(r);e.__index__=0,e.__values__=Z,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t},r.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof nt){var t=n;return this.__actions__.length&&(t=new nt(this)),(t=t.reverse()).__actions__.push({func:Au,args:[mu],thisArg:Z}),new Jn(t,this.__chain__)}return this.thru(mu)},r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=function(){return Jr(this.__wrapped__,this.__actions__)},r.prototype.first=r.prototype.head,Ki&&(r.prototype[Ki]=function(){return this}),r}();or?((or.exports=br)._=br,ir._=br):ur._=br}.call(r);var u={};!function(n){n.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},n.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},n.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},n.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},n.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},n.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},n.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},n.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},n.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=n.aliasToReal,e={};for(var u in r){var i=r[u];t.call(e,i)?e[i].push(u):e[i]=[u]}return e}(),n.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},n.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},n.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}}(u);var i=u,o={},a=Array.prototype.push;function f(n,t){return 2==t?function(t,r){return n(t,r)}:function(t){return n(t)}}function c(n){for(var t=n?n.length:0,r=Array(t);t--;)r[t]=n[t];return r}function l(n,t){return function(){var r=arguments.length;if(r){for(var e=Array(r);r--;)e[r]=arguments[r];var u=e[0]=t.apply(void 0,e);return n.apply(void 0,e),u}}}var s=function n(t,r,e,u){var s="function"==typeof r,h=r===Object(r);if(h&&(u=e,e=r,r=void 0),null==e)throw new TypeError;u||(u={});var p=!("cap"in u)||u.cap,v=!("curry"in u)||u.curry,g=!("fixed"in u)||u.fixed,_=!("immutable"in u)||u.immutable,d=!("rearg"in u)||u.rearg,y=s?e:o,m="curry"in u&&u.curry,b="fixed"in u&&u.fixed,w="rearg"in u&&u.rearg,x=s?e.runInContext():void 0,A=s?e:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},I=A.ary,W=A.assign,j=A.clone,O=A.curry,R=A.forEach,k=A.isArray,E=A.isError,S=A.isFunction,z=A.isWeakMap,B=A.keys,L=A.rearg,C=A.toInteger,F=A.toPath,T=B(i.aryMethod),D={castArray:function(n){return function(){var t=arguments[0];return k(t)?n(c(t)):n.apply(void 0,arguments)}},iteratee:function(n){return function(){var t=arguments[0],r=arguments[1],e=n(t,r),u=e.length;return p&&"number"==typeof r?(r=r>2?r-2:1,u&&u<=r?e:f(e,r)):e}},mixin:function(n){return function(t){var r=this;if(!S(r))return n(r,Object(t));var e=[];return R(B(t),(function(n){S(t[n])&&e.push([n,r.prototype[n]])})),n(r,Object(t)),R(e,(function(n){var t=n[1];S(t)?r.prototype[n[0]]=t:delete r.prototype[n[0]]})),r}},nthArg:function(n){return function(t){var r=t<0?1:C(t)+1;return O(n(t),r)}},rearg:function(n){return function(t,r){var e=r?r.length:0;return O(n(t,r),e)}},runInContext:function(r){return function(e){return n(t,r(e),u)}}};function M(n,t){if(p){var r=i.iterateeRearg[n];if(r)return function(n,t){return N(n,(function(n){var r=t.length;return function(n,t){return 2==t?function(t,r){return n.apply(void 0,arguments)}:function(t){return n.apply(void 0,arguments)}}(L(f(n,r),t),r)}))}(t,r);var e=!s&&i.iterateeAry[n];if(e)return function(n,t){return N(n,(function(n){return"function"==typeof n?f(n,t):n}))}(t,e)}return t}function P(n,t,r){if(g&&(b||!i.skipFixed[n])){var e=i.methodSpread[n],u=e&&e.start;return void 0===u?I(t,r):function(n,t){return function(){for(var r=arguments.length,e=r-1,u=Array(r);r--;)u[r]=arguments[r];var i=u[t],o=u.slice(0,t);return i&&a.apply(o,i),t!=e&&a.apply(o,u.slice(t+1)),n.apply(this,o)}}(t,u)}return t}function U(n,t,r){return d&&r>1&&(w||!i.skipRearg[n])?L(t,i.methodRearg[n]||i.aryRearg[r]):t}function q(n,t){for(var r=-1,e=(t=F(t)).length,u=e-1,i=j(Object(n)),o=i;null!=o&&++r1?O(t,r):t}(0,e=M(u,e),n),!1}})),!e})),e||(e=o),e==t&&(e=m?O(e,1):function(){return t.apply(this,arguments)}),e.convert=$(u,t),e.placeholder=t.placeholder=r,e}if(!h)return K(r,e,y);var Z=e,V=[];return R(T,(function(n){R(i.aryMethod[n],(function(n){var t=Z[i.remap[n]||n];t&&V.push([n,K(n,t,Z)])}))})),R(B(Z),(function(n){var t=Z[n];if("function"==typeof t){for(var r=V.length;r--;)if(V[r][0]==n)return;t.convert=$(n,t),V.push([n,t])}})),R(V,(function(n){Z[n[0]]=n[1]})),Z.convert=function(n){return Z.runInContext.convert(n)(void 0)},Z.placeholder=Z,R(B(Z),(function(n){R(i.realToAlias[n]||[],(function(t){Z[t]=Z[n]}))})),Z},h=e.exports.runInContext(),p=s(h,h);const v=p.flow(p.pickBy((n=>1==("function"==typeof n?n():n))),p.keys,p.join(" ")),g=p.negate((function n(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var e,u,i;if(Array.isArray(t)){if((e=t.length)!=r.length)return!1;for(u=e;0!=u--;)if(!n(t[u],r[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((e=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(u=e;0!=u--;)if(!Object.prototype.hasOwnProperty.call(r,i[u]))return!1;for(u=e;0!=u--;){var o=i[u];if(!n(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}));function _(n){return new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(n)}export{v as classPartMap,r as commonjsGlobal,_ as defaultDateFormatter,g as hasChanged}; diff --git a/packages/c2pa-wc/etc/rollup/plugins/lit-svg.cjs b/packages/c2pa-wc/etc/rollup/plugins/lit-svg.cjs index 0491b046..8a7062ce 100644 --- a/packages/c2pa-wc/etc/rollup/plugins/lit-svg.cjs +++ b/packages/c2pa-wc/etc/rollup/plugins/lit-svg.cjs @@ -80,7 +80,7 @@ function renderElement({ prefix, isMonochrome, name, svg }) { } } - customElements.define('${prefix}-icon-${elementName}', ${className}); + customElements.define('${prefix}-icon-${elementName}-dm-plugin', ${className}); `; return prettier.format(code, { parser: 'typescript' }); } diff --git a/packages/c2pa-wc/src/components/AssetsUsed/AssetsUsed.ts b/packages/c2pa-wc/src/components/AssetsUsed/AssetsUsed.ts index bb071595..c1a77588 100644 --- a/packages/c2pa-wc/src/components/AssetsUsed/AssetsUsed.ts +++ b/packages/c2pa-wc/src/components/AssetsUsed/AssetsUsed.ts @@ -20,12 +20,12 @@ import '../PanelSection'; declare global { interface HTMLElementTagNameMap { - 'cai-assets-used': AssetsUsed; + 'cai-assets-used-dm-plugin': AssetsUsed; } namespace JSX { interface IntrinsicElements { - 'cai-assets-used': any; + 'cai-assets-used-dm-plugin': any; } } } @@ -38,7 +38,7 @@ const defaultConfig: AssetsUsedConfig = { stringMap: defaultStringMap, }; -@customElement('cai-assets-used') +@customElement('cai-assets-used-dm-plugin') export class AssetsUsed extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore.ingredients, isEmpty: (data) => !data.length, @@ -49,7 +49,7 @@ export class AssetsUsed extends ConfigurablePanelSection(LitElement, { defaultStyles, baseSectionStyles, css` - .section-assets-used { + .section-assets-used-dm-plugin { --cai-thumbnail-size: 48px; display: grid; color: blue; @@ -65,21 +65,21 @@ export class AssetsUsed extends ConfigurablePanelSection(LitElement, { } render() { - return this.renderSection(html` -
+
${this._data?.map( (ingredient) => html` - + > `, )}
- `); + `); } } diff --git a/packages/c2pa-wc/src/components/ContentSummary/ContentSummary.ts b/packages/c2pa-wc/src/components/ContentSummary/ContentSummary.ts index f3ac4a38..5b8cb55f 100644 --- a/packages/c2pa-wc/src/components/ContentSummary/ContentSummary.ts +++ b/packages/c2pa-wc/src/components/ContentSummary/ContentSummary.ts @@ -19,12 +19,12 @@ import '../PanelSection'; declare global { interface HTMLElementTagNameMap { - 'cai-content-summary': ContentSummary; + 'cai-content-summary-dm-plugin': ContentSummary; } namespace JSX { interface IntrinsicElements { - 'cai-content-summary': any; + 'cai-content-summary-dm-plugin': any; } } } @@ -37,7 +37,7 @@ const defaultConfig: ContentSummaryConfig = { stringMap: defaultStringMap, }; -@customElement('cai-content-summary') +@customElement('cai-content-summary-dm-plugin') export class ContentSummary extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore?.generativeInfo, config: defaultConfig, @@ -47,11 +47,11 @@ export class ContentSummary extends ConfigurablePanelSection(LitElement, { defaultStyles, baseSectionStyles, css` - .section-process-content { + .section-process-content-dm-plugin { display: flex; align-items: center; } - .section-icon-content { + .section-icon-content-dm-plugin { display: flex; align-items: flex-start; gap: var(--cai-icon-spacing, 8px); @@ -61,16 +61,16 @@ export class ContentSummary extends ConfigurablePanelSection(LitElement, { } render() { - return this.renderSection(html` -
- +
+ ${this._config.stringMap['content-summary.content.aiGenerated']}
- `); + `); } } diff --git a/packages/c2pa-wc/src/components/EditsAndActivity/EditsAndActivity.ts b/packages/c2pa-wc/src/components/EditsAndActivity/EditsAndActivity.ts index ef4042b1..af632573 100644 --- a/packages/c2pa-wc/src/components/EditsAndActivity/EditsAndActivity.ts +++ b/packages/c2pa-wc/src/components/EditsAndActivity/EditsAndActivity.ts @@ -19,12 +19,12 @@ import '../PanelSection'; declare global { interface HTMLElementTagNameMap { - 'cai-edits-and-activity': EditsAndActivity; + 'cai-edits-and-activity-dm-plugin': EditsAndActivity; } namespace JSX { interface IntrinsicElements { - 'cai-edits-and-activity': any; + 'cai-edits-and-activity-dm-plugin': any; } } } @@ -39,7 +39,7 @@ const defaultConfig: EditsAndActivityConfig = { showDescriptions: false, }; -@customElement('cai-edits-and-activity') +@customElement('cai-edits-and-activity-dm-plugin') export class EditsAndActivity extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore.editsAndActivity, isEmpty: (data) => !data?.length, @@ -50,12 +50,12 @@ export class EditsAndActivity extends ConfigurablePanelSection(LitElement, { defaultStyles, baseSectionStyles, css` - .section-edits-and-activity-content { + .section-edits-and-activity-content-dm-plugin { display: flex; flex-direction: column; } - .section-edits-and-activity-list { + .section-edits-and-activity-list-dm-plugin { display: flex; flex-direction: column; gap: var(--cai-edits-and-activity-item-spacing, 6px); @@ -65,28 +65,28 @@ export class EditsAndActivity extends ConfigurablePanelSection(LitElement, { overflow: hidden; } - .section-edits-and-activity-list-item-term { + .section-edits-and-activity-list-item-term-dm-plugin { display: flex; align-items: center; } - .section-edits-and-activity-list-item-icon { + .section-edits-and-activity-list-item-icon-dm-plugin { margin-right: 8px; width: 16px; } - .section-edits-and-activity-list-item-label { + .section-edits-and-activity-list-item-label-dm-plugin { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - .section-edits-and-activity-list-item-description { + .section-edits-and-activity-list-item-description-dm-plugin { color: var(--cai-secondary-color); margin-left: 0px; } - .section-edits-and-activity-list-item-description.has-icon { + .section-edits-and-activity-list-item-description-dm-plugin.has-icon { margin-left: 24px; } `, @@ -95,23 +95,25 @@ export class EditsAndActivity extends ConfigurablePanelSection(LitElement, { render() { return this.renderSection(html` - -
+
${this._data?.map( ({ icon, label, description }) => html` -
-
+
+
${icon ? html`${label}` : null} - + ${label}
@@ -119,7 +121,7 @@ export class EditsAndActivity extends ConfigurablePanelSection(LitElement, { ? html`
- + `); } } diff --git a/packages/c2pa-wc/src/components/Icon/Icon.ts b/packages/c2pa-wc/src/components/Icon/Icon.ts index 913b93d9..528078fe 100644 --- a/packages/c2pa-wc/src/components/Icon/Icon.ts +++ b/packages/c2pa-wc/src/components/Icon/Icon.ts @@ -42,39 +42,39 @@ export class Icon extends LitElement { static readonly matchers = [ { pattern: /photoshop/i, - icon: html``, + icon: html``, }, { pattern: /adobe\sstock/i, - icon: html``, + icon: html``, }, { pattern: /adobe/i, - icon: html``, + icon: html``, }, { pattern: /behance\.net/i, - icon: html``, + icon: html``, }, { pattern: /facebook\.com/i, - icon: html``, + icon: html``, }, { pattern: /instagram\.com/i, - icon: html``, + icon: html``, }, { pattern: /truepic/i, - icon: html``, + icon: html``, }, { pattern: /twitter\.com/i, - icon: html``, + icon: html``, }, { pattern: /lightroom/i, - icon: html``, + icon: html``, }, ]; @@ -96,7 +96,7 @@ export class Icon extends LitElement { :host { max-height: var(--cai-icon-size, 16px); } - #container { + #container-dm-plugin { display: inline-block; width: var(--cai-icon-size, 16px); height: var(--cai-icon-size, 16px); @@ -109,6 +109,8 @@ export class Icon extends LitElement { } render() { - return this.icon ? html`
${this.icon}
` : nothing; + return this.icon + ? html`
${this.icon}
` + : nothing; } } diff --git a/packages/c2pa-wc/src/components/Indicator/Indicator.ts b/packages/c2pa-wc/src/components/Indicator/Indicator.ts index 5ecc417b..2e434e8e 100644 --- a/packages/c2pa-wc/src/components/Indicator/Indicator.ts +++ b/packages/c2pa-wc/src/components/Indicator/Indicator.ts @@ -14,19 +14,19 @@ import { defaultStyles } from '../../styles'; declare global { interface HTMLElementTagNameMap { - 'cai-indicator': Indicator; + 'cai-indicator-dm-plugin': Indicator; } namespace JSX { interface IntrinsicElements { - 'cai-indicator': any; + 'cai-indicator-dm-plugin': any; } } } type Variant = 'info-light' | 'info-dark' | 'warning' | 'error'; -@customElement('cai-indicator') +@customElement('cai-indicator-dm-plugin') export class Indicator extends LitElement { /** * Image source - if set to undefined/null it will show a broken image icon @@ -52,6 +52,12 @@ export class Indicator extends LitElement { } render() { - return html``; + switch (this.variant) { + case 'warning': + return html``; + case 'error': + return html``; + } + return html``; } } diff --git a/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.stories.ts b/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.stories.ts index 432abcc7..717d3dd6 100644 --- a/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.stories.ts +++ b/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.stories.ts @@ -26,7 +26,7 @@ interface ArgTypes { export default { title: 'Components/ManifestSummary', - component: 'cai-manifest-summary', + component: 'cai-manifest-summary-dm-plugin', argTypes: { manifestStore: { control: { @@ -70,12 +70,12 @@ const Base: Story = ({ theme, }: ArgTypes) => { return html` - + > `; }; @@ -97,27 +97,27 @@ export const AppendCustomSection: Story = ({ theme, }: ArgTypes) => { return html` - - Number of ingredients: - ${manifestStore.ingredients?.length} - Number of ingredients: - ${manifestStore.ingredients?.length} - + `; }; AppendCustomSection.args = { diff --git a/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.ts b/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.ts index e2b7d0a3..2e719812 100644 --- a/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.ts +++ b/packages/c2pa-wc/src/components/ManifestSummary/ManifestSummary.ts @@ -27,12 +27,12 @@ import '../MinimumViableProvenance'; declare global { interface HTMLElementTagNameMap { - 'cai-manifest-summary': ManifestSummary; + 'cai-manifest-summary-dm-plugin': ManifestSummary; } namespace JSX { interface IntrinsicElements { - 'cai-manifest-summary': any; + 'cai-manifest-summary-dm-plugin': any; } } } @@ -65,7 +65,7 @@ const defaultConfig: ManifestSummaryConfig = { }, }; -@customElement('cai-manifest-summary') +@customElement('cai-manifest-summary-dm-plugin') export class ManifestSummary extends Configurable(LitElement, defaultConfig) { static readonly cssParts = { viewMore: 'manifest-summary-view-more', @@ -75,11 +75,11 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { return [ defaultStyles, css` - #container { + #container-dm-plugin { width: var(--cai-manifest-summary-width, 320px); } - #content-container { + #content-container-dm-plugin { padding: var(--cai-manifest-summary-content-padding, 20px); max-height: var(--cai-manifest-summary-content-max-height, 550px); border-bottom-width: var( @@ -99,7 +99,7 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { overflow-x: hidden; } - #content-container > *:not(:first-child):not([empty]), + #content-container-dm-plugin > *:not(:first-child):not([empty]), ::slotted(*) { padding-top: var(--cai-manifest-summary-section-spacing, 20px); margin-top: var(--cai-manifest-summary-section-spacing, 20px); @@ -117,11 +117,11 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { ) !important; } - #view-more-container { + #view-more-container-dm-plugin { padding: var(--cai-manifest-summary-view-more-padding, 20px); } - #view-more { + #view-more-dm-plugin { display: block; transition: all 150ms ease-in-out; background-color: transparent; @@ -135,7 +135,7 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { color: var(--cai-primary-color); } - #view-more:hover { + #view-more-dm-plugin:hover { background-color: #eeeeee; } `, @@ -159,12 +159,12 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { return null; } - return html`
-
- +
+ + > ${this.manifestStore.error === 'error' ? html` @@ -173,61 +173,61 @@ export class ManifestSummary extends Configurable(LitElement, defaultConfig) { : html` ${this._config?.sections?.contentSummary ? html` - + > ` : nothing} ${this._config?.sections?.producedBy ? html` - + > ` : nothing} ${this._config?.sections?.producedWith ? html` - + > ` : nothing} ${this._config?.sections?.editsAndActivity ? html` - + > ` : nothing} ${this._config?.sections?.assetsUsed ? html` - + > ` : nothing} ${this._config?.sections?.socialMedia ? html` - + > ` : nothing} `}
-
+
${this.viewMoreUrl ? html` -
- + + >
- + > ${this.manifestStore?.signature?.issuer}
${!hasError ? html` -
+
${isValid(signatureDate) ? html`${this._config?.dateFormatter(signatureDate!)}` : html`${this._config?.stringMap[ @@ -128,6 +128,6 @@ export class MinimumViableProvenance extends Configurable( ` : nothing}
- `; + `; } } diff --git a/packages/c2pa-wc/src/components/PanelSection/PanelSection.ts b/packages/c2pa-wc/src/components/PanelSection/PanelSection.ts index 4e54019b..ae59ecbb 100644 --- a/packages/c2pa-wc/src/components/PanelSection/PanelSection.ts +++ b/packages/c2pa-wc/src/components/PanelSection/PanelSection.ts @@ -16,17 +16,17 @@ import '../Tooltip'; declare global { interface HTMLElementTagNameMap { - 'cai-panel-section': PanelSection; + 'cai-panel-section-dm-plugin': PanelSection; } namespace JSX { interface IntrinsicElements { - 'cai-panel-section': any; + 'cai-panel-section-dm-plugin': any; } } } -@customElement('cai-panel-section') +@customElement('cai-panel-section-dm-plugin') export class PanelSection extends LitElement { @property({ type: String }) header = ''; @@ -68,9 +68,9 @@ export class PanelSection extends LitElement {
${this.header}
${this.helpText - ? html` + ? html`
${this.helpText}
-
` + ` : nothing}
diff --git a/packages/c2pa-wc/src/components/Popover/Popover.ts b/packages/c2pa-wc/src/components/Popover/Popover.ts index 0eeab352..f8a12e50 100644 --- a/packages/c2pa-wc/src/components/Popover/Popover.ts +++ b/packages/c2pa-wc/src/components/Popover/Popover.ts @@ -30,17 +30,17 @@ import { defaultStyles } from '../../styles'; declare global { interface HTMLElementTagNameMap { - 'cai-popover': Popover; + 'cai-popover-dm-plugin': Popover; } namespace JSX { interface IntrinsicElements { - 'cai-popover': any; + 'cai-popover-dm-plugin': any; } } } -@customElement('cai-popover') +@customElement('cai-popover-dm-plugin') export class Popover extends LitElement { private _updateCleanupFn: Function | null = null; @@ -182,7 +182,7 @@ export class Popover extends LitElement { height: 8px; transform: rotate(45deg); } - .hidden-layer { + .hidden-layer-dm-plugin { position: absolute; left: calc(var(--cai-popover-icon-size, 24px) * -1); width: var(--cai-popover-icon-size, 24px); @@ -357,7 +357,7 @@ export class Popover extends LitElement { ${this.arrow ? html`
` : null}
-
+
`; diff --git a/packages/c2pa-wc/src/components/ProducedBy/ProducedBy.ts b/packages/c2pa-wc/src/components/ProducedBy/ProducedBy.ts index 469b8eb9..ffc1567e 100644 --- a/packages/c2pa-wc/src/components/ProducedBy/ProducedBy.ts +++ b/packages/c2pa-wc/src/components/ProducedBy/ProducedBy.ts @@ -18,12 +18,12 @@ import '../PanelSection'; declare global { interface HTMLElementTagNameMap { - 'cai-produced-by': ProducedBy; + 'cai-produced-by-dm-plugin': ProducedBy; } namespace JSX { interface IntrinsicElements { - 'cai-produced-by': any; + 'cai-produced-by-dm-plugin': any; } } } @@ -36,7 +36,7 @@ const defaultConfig: ProducedByConfig = { stringMap: defaultStringMap, }; -@customElement('cai-produced-by') +@customElement('cai-produced-by-dm-plugin') export class ProducedBy extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore.producer?.name, config: defaultConfig, @@ -46,11 +46,11 @@ export class ProducedBy extends ConfigurablePanelSection(LitElement, { } render() { - return this.renderSection(html`
${this._data}
-
`); + `); } } diff --git a/packages/c2pa-wc/src/components/ProducedWith/ProducedWith.ts b/packages/c2pa-wc/src/components/ProducedWith/ProducedWith.ts index 6bbe5cb1..1ddfb266 100644 --- a/packages/c2pa-wc/src/components/ProducedWith/ProducedWith.ts +++ b/packages/c2pa-wc/src/components/ProducedWith/ProducedWith.ts @@ -19,12 +19,12 @@ import '../Icon'; declare global { interface HTMLElementTagNameMap { - 'cai-produced-with': ProducedWith; + 'cai-produced-with-dm-plugin': ProducedWith; } namespace JSX { interface IntrinsicElements { - 'cai-produced-with': any; + 'cai-produced-with-dm-plugin': any; } } } @@ -37,7 +37,7 @@ const defaultConfig: ProducedWithConfig = { stringMap: defaultStringMap, }; -@customElement('cai-produced-with') +@customElement('cai-produced-with-dm-plugin') export class ProducedWith extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore.claimGenerator, config: defaultConfig, @@ -47,12 +47,12 @@ export class ProducedWith extends ConfigurablePanelSection(LitElement, { defaultStyles, baseSectionStyles, css` - .section-produced-with-content { + .section-produced-with-content-dm-plugin { display: flex; align-items: center; } - .section-produced-with-beta { + .section-produced-with-beta-dm-plugin { margin-left: 24px; color: var(--cai-secondary-color); } @@ -61,21 +61,21 @@ export class ProducedWith extends ConfigurablePanelSection(LitElement, { } render() { - return this.renderSection(html`
-
+
${this._data?.product}
${this.manifestStore?.isBeta - ? html`
+ ? html`
${this._config.stringMap['produced-with.beta']}
` : null}
- `); + `); } } diff --git a/packages/c2pa-wc/src/components/SocialMedia/SocialMedia.ts b/packages/c2pa-wc/src/components/SocialMedia/SocialMedia.ts index c28fe087..b7c6ef40 100644 --- a/packages/c2pa-wc/src/components/SocialMedia/SocialMedia.ts +++ b/packages/c2pa-wc/src/components/SocialMedia/SocialMedia.ts @@ -18,12 +18,12 @@ import '../Icon'; declare global { interface HTMLElementTagNameMap { - 'cai-social-media': SocialMedia; + 'cai-social-media-dm-plugin': SocialMedia; } namespace JSX { interface IntrinsicElements { - 'cai-social-media': any; + 'cai-social-media-dm-plugin': any; } } } @@ -36,7 +36,7 @@ const defaultConfig: SocialMediaConfig = { stringMap: defaultStringMap, }; -@customElement('cai-social-media') +@customElement('cai-social-media-dm-plugin') export class SocialMedia extends ConfigurablePanelSection(LitElement, { dataSelector: (manifestStore) => manifestStore?.socialAccounts, isEmpty: (data) => !data?.length, @@ -47,7 +47,7 @@ export class SocialMedia extends ConfigurablePanelSection(LitElement, { defaultStyles, baseSectionStyles, css` - .section-social-media-list { + .section-social-media-list-dm-plugin { display: flex; flex-direction: column; gap: 6px; @@ -57,12 +57,12 @@ export class SocialMedia extends ConfigurablePanelSection(LitElement, { overflow: hidden; } - .section-social-media-list-item { + .section-social-media-list-item-dm-plugin { display: flex; align-items: center; } - .section-social-media-list-item-link { + .section-social-media-list-item-link-dm-plugin { color: var(--cai-social-media-item-color, var(--cai-primary-color)); overflow: hidden; text-overflow: ellipsis; @@ -73,17 +73,19 @@ export class SocialMedia extends ConfigurablePanelSection(LitElement, { } render() { - return this.renderSection(html` -