@claspo/renderer 16.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CompositionRoot.d.ts +38 -0
- package/CompositionRoot.js +1 -0
- package/RouterEvent.d.ts +4 -0
- package/RouterEvent.js +1 -0
- package/StaticEntryModule.d.ts +23 -0
- package/StaticEntryModule.js +1 -0
- package/UpdatingEntryModule.d.ts +27 -0
- package/UpdatingEntryModule.js +1 -0
- package/ViewRouter.d.ts +21 -0
- package/ViewRouter.js +1 -0
- package/action/ActionFactory.d.ts +20 -0
- package/action/ActionFactory.js +1 -0
- package/action/ActionRegister.d.ts +8 -0
- package/action/ActionRegister.js +1 -0
- package/action/InAppActionFactory.d.ts +12 -0
- package/action/InAppActionFactory.js +1 -0
- package/action/SysActionTypes.d.ts +13 -0
- package/action/SysActionTypes.js +1 -0
- package/action/UTMParamsExtractor.d.ts +3 -0
- package/action/UTMParamsExtractor.js +1 -0
- package/action/actions/ActionCategory.d.ts +5 -0
- package/action/actions/ActionCategory.js +1 -0
- package/action/actions/BaseRequestAction.d.ts +43 -0
- package/action/actions/BaseRequestAction.js +1 -0
- package/action/actions/CloseWidgetAction.d.ts +9 -0
- package/action/actions/CloseWidgetAction.js +1 -0
- package/action/actions/DispatchEventAction.d.ts +7 -0
- package/action/actions/DispatchEventAction.js +1 -0
- package/action/actions/GoToNextViewAction.d.ts +9 -0
- package/action/actions/GoToNextViewAction.js +1 -0
- package/action/actions/GoToPreviousViewAction.d.ts +8 -0
- package/action/actions/GoToPreviousViewAction.js +1 -0
- package/action/actions/GoToViewAction.d.ts +12 -0
- package/action/actions/GoToViewAction.js +1 -0
- package/action/actions/InAppOpenLinkAction.d.ts +8 -0
- package/action/actions/InAppOpenLinkAction.js +1 -0
- package/action/actions/OpenLinkAction.d.ts +12 -0
- package/action/actions/OpenLinkAction.js +1 -0
- package/action/actions/RequestAction.d.ts +4 -0
- package/action/actions/RequestAction.js +1 -0
- package/action/actions/ShowWidgetAction.d.ts +8 -0
- package/action/actions/ShowWidgetAction.js +1 -0
- package/action/actions/SubscribeContactAction.d.ts +5 -0
- package/action/actions/SubscribeContactAction.js +1 -0
- package/action/actions/TrackClick.d.ts +5 -0
- package/action/actions/TrackClick.js +1 -0
- package/action/asyncAction.d.ts +2 -0
- package/action/asyncAction.js +1 -0
- package/backward-compatibility/deprecatedCheckboxVariablesMap.d.ts +2 -0
- package/backward-compatibility/deprecatedCheckboxVariablesMap.js +1 -0
- package/color-libs/color-contrast.d.ts +8 -0
- package/color-libs/color-contrast.js +1 -0
- package/color-libs/color-convert.d.ts +2 -0
- package/color-libs/color-convert.js +1 -0
- package/color-libs/color-string.d.ts +15 -0
- package/color-libs/color-string.js +1 -0
- package/color-libs/color.d.ts +14 -0
- package/color-libs/color.js +1 -0
- package/color-libs/conversions.d.ts +9 -0
- package/color-libs/conversions.js +1 -0
- package/color-libs/rgb.d.ts +2 -0
- package/color-libs/rgb.js +1 -0
- package/color-libs/route.d.ts +1 -0
- package/color-libs/route.js +1 -0
- package/color-libs/simple-swizzle.d.ts +5 -0
- package/color-libs/simple-swizzle.js +1 -0
- package/common/ConfigService.d.ts +5 -0
- package/common/ConfigService.js +1 -0
- package/common/DefaultState.d.ts +7 -0
- package/common/DefaultState.js +1 -0
- package/common/SysEventTypes.d.ts +7 -0
- package/common/SysEventTypes.js +1 -0
- package/common/WaitForKeyboardHide.d.ts +1 -0
- package/common/WaitForKeyboardHide.js +1 -0
- package/document-model/ComponentPropsExtractor.d.ts +4 -0
- package/document-model/ComponentPropsExtractor.js +1 -0
- package/document-model/DocumentModel.d.ts +30 -0
- package/document-model/DocumentModel.js +1 -0
- package/document-model/DocumentService.d.ts +8 -0
- package/document-model/DocumentService.js +1 -0
- package/document-model/MergeAdaptiveStylesWithEnvIndependentStyles.d.ts +2 -0
- package/document-model/MergeAdaptiveStylesWithEnvIndependentStyles.js +1 -0
- package/document-model/ModulesComponentExtractor.d.ts +9 -0
- package/document-model/ModulesComponentExtractor.js +1 -0
- package/document-model/ViewEntryType.d.ts +14 -0
- package/document-model/ViewEntryType.js +1 -0
- package/document-model/systemResultStateNames.d.ts +2 -0
- package/document-model/systemResultStateNames.js +1 -0
- package/error/ErrorLogger.d.ts +3 -0
- package/error/ErrorLogger.js +1 -0
- package/form/FormControl.d.ts +42 -0
- package/form/FormControl.js +1 -0
- package/form/FormControlEvents.d.ts +6 -0
- package/form/FormControlEvents.js +1 -0
- package/form/FormControlValidator.d.ts +11 -0
- package/form/FormControlValidator.js +1 -0
- package/form/FormGroup.d.ts +23 -0
- package/form/FormGroup.js +1 -0
- package/form/FormGroupEvents.d.ts +8 -0
- package/form/FormGroupEvents.js +1 -0
- package/generateRandomValue.d.ts +2 -0
- package/generateRandomValue.js +1 -0
- package/handler/ClickHandler.d.ts +17 -0
- package/handler/ClickHandler.js +1 -0
- package/handler/ComponentEventHandler.d.ts +8 -0
- package/handler/ComponentEventHandler.js +1 -0
- package/handler/HandlerFactory.d.ts +8 -0
- package/handler/HandlerFactory.js +1 -0
- package/i18n/TranslateUtils.d.ts +9 -0
- package/i18n/TranslateUtils.js +1 -0
- package/package.json +38 -0
- package/prize-pool/PrizePool.d.ts +19 -0
- package/prize-pool/PrizePool.js +1 -0
- package/prize-pool/PrizePoolEvents.d.ts +5 -0
- package/prize-pool/PrizePoolEvents.js +1 -0
- package/prize-pool/PrizePoolFactory.d.ts +7 -0
- package/prize-pool/PrizePoolFactory.js +1 -0
- package/renderer/DragEventListener.d.ts +9 -0
- package/renderer/DragEventListener.js +1 -0
- package/renderer/RenderConstants.d.ts +6 -0
- package/renderer/RenderConstants.js +1 -0
- package/renderer/ViewRendererActionType.d.ts +15 -0
- package/renderer/ViewRendererActionType.js +1 -0
- package/renderer/style/ClDocumentResizeListener.d.ts +12 -0
- package/renderer/style/ClDocumentResizeListener.js +1 -0
- package/renderer/style/ColorSchemaListener.d.ts +26 -0
- package/renderer/style/ColorSchemaListener.js +1 -0
- package/renderer/style/CommonStylesService.d.ts +6 -0
- package/renderer/style/CommonStylesService.js +1 -0
- package/renderer/style/DefaultMediaQueryListener.d.ts +12 -0
- package/renderer/style/DefaultMediaQueryListener.js +1 -0
- package/renderer/style/LoopAnimationStylesService.d.ts +38 -0
- package/renderer/style/LoopAnimationStylesService.js +1 -0
- package/renderer/style/MobileDeviceOrientationListener.d.ts +12 -0
- package/renderer/style/MobileDeviceOrientationListener.js +1 -0
- package/resource-management/ComponentResourceManager.d.ts +13 -0
- package/resource-management/ComponentResourceManager.js +1 -0
- package/resource-management/Counter.d.ts +8 -0
- package/resource-management/Counter.js +1 -0
- package/resource-management/ViewResourcesManager.d.ts +8 -0
- package/resource-management/ViewResourcesManager.js +1 -0
- package/sdk/ColorUtils.d.ts +7 -0
- package/sdk/ColorUtils.js +1 -0
- package/sdk/ComponentLifeCycleContainerType.d.ts +5 -0
- package/sdk/ComponentLifeCycleContainerType.js +1 -0
- package/sdk/ComponentType.d.ts +10 -0
- package/sdk/ComponentType.js +1 -0
- package/sdk/FormUtils.d.ts +3 -0
- package/sdk/FormUtils.js +1 -0
- package/sdk/HtmlStyleUtils.d.ts +7 -0
- package/sdk/HtmlStyleUtils.js +1 -0
- package/sdk/ModelStyleUtils.d.ts +9 -0
- package/sdk/ModelStyleUtils.js +1 -0
- package/sdk/OverlayUtils.d.ts +28 -0
- package/sdk/OverlayUtils.js +1 -0
- package/sdk/PayloadEvent.d.ts +4 -0
- package/sdk/PayloadEvent.js +1 -0
- package/sdk/PreviewMode.d.ts +5 -0
- package/sdk/PreviewMode.js +1 -0
- package/sdk/TooltipUtils.d.ts +4 -0
- package/sdk/TooltipUtils.js +1 -0
- package/sdk/TranslationUtils.d.ts +4 -0
- package/sdk/TranslationUtils.js +1 -0
- package/sdk/TranslationUtils.spec.d.ts +1 -0
- package/sdk/TranslationUtils.spec.js +1 -0
- package/sdk/WcControlledElement.d.ts +26 -0
- package/sdk/WcControlledElement.js +1 -0
- package/sdk/WcElement.d.ts +68 -0
- package/sdk/WcElement.js +1 -0
- package/sdk/accessor/StyleAttributeAccessor.d.ts +4 -0
- package/sdk/accessor/StyleAttributeAccessor.js +1 -0
- package/sdk/context/ContextData.d.ts +9 -0
- package/sdk/context/ContextData.js +1 -0
- package/sdk/context/ContextEvents.d.ts +5 -0
- package/sdk/context/ContextEvents.js +1 -0
- package/sdk/context/ContextSDK.d.ts +15 -0
- package/sdk/context/ContextSDK.js +1 -0
- package/sdk/context/ContextSDK.spec.d.ts +1 -0
- package/sdk/context/ContextSDK.spec.js +1 -0
- package/sdk/context/Record.d.ts +8 -0
- package/sdk/context/Record.js +1 -0
- package/sdk/getComponentCountOnView.d.ts +1 -0
- package/sdk/getComponentCountOnView.js +1 -0
- package/sdk/getParentHostElement.d.ts +1 -0
- package/sdk/getParentHostElement.js +1 -0
- package/sdk/merge-tags/AbstractMergeTagsProcessor.d.ts +11 -0
- package/sdk/merge-tags/AbstractMergeTagsProcessor.js +1 -0
- package/sdk/merge-tags/MergeTagsProcessorFactory.d.ts +9 -0
- package/sdk/merge-tags/MergeTagsProcessorFactory.js +1 -0
- package/sdk/merge-tags/StaticMergeTagsProcessor.d.ts +3 -0
- package/sdk/merge-tags/StaticMergeTagsProcessor.js +1 -0
- package/sdk/merge-tags/UpdatingMergeTagsProcessor.d.ts +7 -0
- package/sdk/merge-tags/UpdatingMergeTagsProcessor.js +1 -0
- package/sdk/source/Source.d.ts +10 -0
- package/sdk/source/Source.js +1 -0
- package/sdk/source/SourceRegistry.d.ts +10 -0
- package/sdk/source/SourceRegistry.js +1 -0
- package/sdk/source/sources/DataLayerSource.d.ts +11 -0
- package/sdk/source/sources/DataLayerSource.js +1 -0
- package/sdk/source/sources/FormSource.d.ts +6 -0
- package/sdk/source/sources/FormSource.js +1 -0
- package/sdk/source/sources/JSApiVariablesSource.d.ts +12 -0
- package/sdk/source/sources/JSApiVariablesSource.js +1 -0
- package/sdk/source/sources/UrlQueryParamsSource.d.ts +12 -0
- package/sdk/source/sources/UrlQueryParamsSource.js +1 -0
- package/sdk/validators/required.d.ts +5 -0
- package/sdk/validators/required.js +1 -0
- package/sdk.d.ts +11 -0
- package/sdk.js +1 -0
- package/wc-renderer/WcFactory.d.ts +63 -0
- package/wc-renderer/WcFactory.js +1 -0
- package/wc-renderer/WcFactory.spec.d.ts +1 -0
- package/wc-renderer/WcFactory.spec.js +1 -0
- package/wc-renderer/WcRegister.d.ts +11 -0
- package/wc-renderer/WcRegister.js +1 -0
- package/wc-renderer/WcRegister.spec.d.ts +1 -0
- package/wc-renderer/WcRegister.spec.js +1 -0
- package/wc-renderer/WcResolver.d.ts +16 -0
- package/wc-renderer/WcResolver.js +1 -0
- package/wc-renderer/WcViewRenderer.d.ts +15 -0
- package/wc-renderer/WcViewRenderer.js +1 -0
- package/wc-renderer/decorators/wcStaticDecorator.d.ts +7 -0
- package/wc-renderer/decorators/wcStaticDecorator.js +1 -0
- package/wc-renderer/decorators/wcUpdatingDecorator.d.ts +43 -0
- package/wc-renderer/decorators/wcUpdatingDecorator.js +1 -0
- package/wc-renderer/icons/feedbackIcons.d.ts +23 -0
- package/wc-renderer/icons/feedbackIcons.js +1 -0
- package/wc-renderer/icons/promoCodeCopyIcons.d.ts +2 -0
- package/wc-renderer/icons/promoCodeCopyIcons.js +1 -0
- package/wc-renderer/icons/promoCodeStrokeIcons.d.ts +2 -0
- package/wc-renderer/icons/promoCodeStrokeIcons.js +1 -0
- package/wc-renderer/observers/createObservers.d.ts +5 -0
- package/wc-renderer/observers/createObservers.js +1 -0
- package/wc-renderer/observers/observerType.d.ts +6 -0
- package/wc-renderer/observers/observerType.js +1 -0
- package/wc-renderer/subscriptions/createSubscriptions.d.ts +5 -0
- package/wc-renderer/subscriptions/createSubscriptions.js +1 -0
- package/wc-renderer/utils/platforms.d.ts +5 -0
- package/wc-renderer/utils/platforms.js +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import StaticMergeTagsProcessor from"./StaticMergeTagsProcessor";import UpdatingMergeTagsProcessor from"./UpdatingMergeTagsProcessor";export class MergeTagsProcessorFactory{constructor(e,r,t){this.isStaticMode=e,this.context=r,this.configService=t}create(){return this.isStaticMode?new StaticMergeTagsProcessor(this.context,this.configService):new UpdatingMergeTagsProcessor(this.context,this.configService)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import AbstractMergeTagsProcessor from"./AbstractMergeTagsProcessor";import getMostNestedNode from"@claspo/common/dom/getMostNestedNode";import{PreviewMode}from"../PreviewMode";export default class StaticMergeTagsProcessor extends AbstractMergeTagsProcessor{processSingleMergeTag(e,t){const o=this.context.getRecord(t.id),s=this.context.getRegistry().getSource(t.sourceId),i=this.context.getKVMap();let r,c;if(!o&&i[t.id]&&(c=i[t.id]),s){const e=s.getValue((null==o?void 0:o.value.id)||t.id);c=(null==e?void 0:e.value)||c,e&&"function"==typeof e.processor&&(r=e.processor(s,t))}const d=this.configService.getConfig(PreviewMode.CABINET_PREVIEW)||this.configService.getConfig(PreviewMode.EDITOR_PREVIEW)||this.configService.getConfig(PreviewMode.DEMO);let g=r||c||(null==o?void 0:o.value.value)||t.fallbackValue||(d?t.exampleValue:"");o||this.context.addRecord(t.id,Object.assign(Object.assign({recordKey:t.id,id:t.id,sourceId:t.sourceId},s?s.getValue(t.id):{}),{value:g})),e.style.fontFamily="inherit",getMostNestedNode(e).textContent=g}}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default class UpdatingMergeTagsProcessor extends AbstractMergeTagsProcessor {
|
|
2
|
+
constructor(context: any);
|
|
3
|
+
contextSubscriptions: any[];
|
|
4
|
+
_setMergeTagValidity(contextRecord: any, mergeTag: any, tagContainerElement: any): void;
|
|
5
|
+
_handleContextEvents(record: any): void;
|
|
6
|
+
}
|
|
7
|
+
import AbstractMergeTagsProcessor from "./AbstractMergeTagsProcessor";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ContextEvents}from"../context/ContextEvents";import AbstractMergeTagsProcessor from"./AbstractMergeTagsProcessor";import getMostNestedNode from"@claspo/common/dom/getMostNestedNode";import DataLayerSource from"../source/sources/DataLayerSource";import UrlQueryParamsSource from"../source/sources/UrlQueryParamsSource";import JSApiVariablesSource from"../source/sources/JSApiVariablesSource";export default class UpdatingMergeTagsProcessor extends AbstractMergeTagsProcessor{constructor(e){super(e),this.contextSubscriptions=[this.context.on(ContextEvents.RECORD_ADDED,this._handleContextEvents.bind(this)),this.context.on(ContextEvents.RECORD_UPDATED,this._handleContextEvents.bind(this)),this.context.on(ContextEvents.RECORD_DELETED,this._handleContextEvents.bind(this))]}destroy(){super.destroy(),this.contextSubscriptions&&this.contextSubscriptions.forEach(e=>e.off())}processSingleMergeTag(e,t){if(!e)return;const s=this.context.getRecord(t.id);e.style.fontFamily="inherit",getMostNestedNode(e).textContent=t.exampleValue,this._setMergeTagValidity(s,t,e)}_setMergeTagValidity(e,t,s){let r=!1;if(e||t.sourceId===DataLayerSource.sourceId||t.sourceId===UrlQueryParamsSource.sourceId||t.sourceId===JSApiVariablesSource.sourceId||(r=!0),t.sourceId===DataLayerSource.sourceId){const e=t.arguments.find(e=>"dataLayerPropPath"===e.name);e&&e.value||(r=!0)}else{(!t.exampleValue||t.arguments&&!t.arguments.find(e=>e.value))&&(r=!0)}const o="tag-error";r?s.classList.add(o):s.classList.remove(o)}_handleContextEvents(e){var t;const s=null===(t=this.mergeTags)||void 0===t?void 0:t[e.key];s&&this.processSingleMergeTag(this.element.querySelector(`[cl-id="${s.id}"]`),s)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default class Source{constructor(s,i,t={}){this.id=s,this.subscriptionEntry=i,this.config=t,this.subscribed=!1}subscribe(s){this.subscribed=!0,this.subscriptionEntry.subscribe(s)}getValue(s){return this.subscriptionEntry.getValue(s)}isSubscribed(){return this.subscribed}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default class SourceRegistry {
|
|
2
|
+
constructor(form: any, config: any);
|
|
3
|
+
registeredSourcesMap: {};
|
|
4
|
+
sources: Source[];
|
|
5
|
+
registerSource(source: any): any;
|
|
6
|
+
getSource(id: any): any;
|
|
7
|
+
getSources(): any[];
|
|
8
|
+
registerInitialSources(): any[];
|
|
9
|
+
}
|
|
10
|
+
import Source from "./Source";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Source from"./Source";import FormSource from"./sources/FormSource";import UrlQueryParamsSource from"./sources/UrlQueryParamsSource";import DataLayerSource from"./sources/DataLayerSource";import JSApiVariablesSource from"./sources/JSApiVariablesSource";export default class SourceRegistry{constructor(r,e){this.registeredSourcesMap={},this.sources=[new Source("FORM",new FormSource(r)),new Source("DATA_LAYER",new DataLayerSource),new Source("URL_QUERY_PARAMS",new UrlQueryParamsSource(e)),new Source("JS_API_VARIABLE",new JSApiVariablesSource(e))]}registerSource(r){if(this.registeredSourcesMap[r.id])throw new Error(`Source with id ${r.id} already registered`);return this.registeredSourcesMap[r.id]=r}getSource(r){return this.registeredSourcesMap[r]}getSources(){return Object.values(this.registeredSourcesMap)}registerInitialSources(){return this.sources.map(r=>this.registerSource(r))}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class DataLayerSource {
|
|
2
|
+
static sourceId: string;
|
|
3
|
+
static processModel(model: any, returnRawValue: any): any;
|
|
4
|
+
static getValueByPropPath(dataLayerEvent: any, propPathArray: any, model: any, returnRawValue: any): any;
|
|
5
|
+
subscribe(): void;
|
|
6
|
+
getValue(key: any): {
|
|
7
|
+
processor?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
processor: (ctx: any, model: any) => any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import DefaultEventEmitter from"@claspo/common/DefaultEventEmitter";import isDictionary from"@claspo/common/object/isDictionary";import flatMap from"@claspo/common/utils/flatMap";function getPropPathArray(r){return r?flatMap(r.value.split(".").map(r=>r.trim()).map(r=>r.split(/[\[\]]/)),r=>r).filter(r=>!!r):[]}export default class DataLayerSource extends DefaultEventEmitter{constructor(){super()}subscribe(){}getValue(r){return r?{processor:(r,t)=>DataLayerSource.processModel(t)}:{}}static processModel(r,t){if(!r.arguments)return"";const e=r.arguments.find(r=>"dataLayerEventName"===r.name),a=r.arguments.find(r=>"dataLayerPropPath"===r.name),o=!!(null==e?void 0:e.value);if(!window.dataLayer)return"";let n;for(let i=window.dataLayer.length-1;i>=0;i--){const u=window.dataLayer[i];if(o){if((null==u?void 0:u.event)===e.value){n=u;break}if("event"===(null==u?void 0:u[0])&&(null==u?void 0:u[1])===e.value){n=u[2];break}}else{const e=getPropPathArray(a),o=DataLayerSource.getValueByPropPath(u,e,r,t);if(o)return o}}if(!n)return"";const i=getPropPathArray(a);return DataLayerSource.getValueByPropPath(n,i,r,t)}static getValueByPropPath(r,t,e,a){try{const e=t.reduce((r,t)=>{if(isDictionary(r)||Array.isArray(r))return r[t];throw new Error(`Tried to access non object data by propName "${t}". Data: ${r}`)},r);return Array.isArray(e)&&!a?e.join(", "):e}catch(r){return console.error("DataLayerSource: error while getting data by prop path. Model: ",e,"Error: ",r),""}}}DataLayerSource.sourceId="DATA_LAYER";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import FormGroupEvents from"../../../form/FormGroupEvents";export default class FormSource{constructor(e){this.formService=e}subscribe(e){this.formService.on(FormGroupEvents.valueChanged,o=>{e({key:o.getName(),value:o.getValue(),componentId:o.getComponentId()})}),this.formService.on(FormGroupEvents.controlRegistered,o=>{e({key:o.getName(),value:o.getValue()})})}getValue(e){var o;return e?null===(o=this.formService.getControl(e))||void 0===o?void 0:o.getValue():this.formService.getControlsMap()}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class JSApiVariablesSource {
|
|
2
|
+
static sourceId: string;
|
|
3
|
+
static processModel(model: any, instanceName: any): any;
|
|
4
|
+
constructor(config?: {});
|
|
5
|
+
instanceName: any;
|
|
6
|
+
subscribe(): void;
|
|
7
|
+
getValue(key: any): {
|
|
8
|
+
processor?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
processor: (ctx: any, model: any) => any;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import DefaultEventEmitter from"@claspo/common/DefaultEventEmitter";export default class JSApiVariablesSource extends DefaultEventEmitter{constructor(e={}){super(),this.instanceName=e.instanceName}subscribe(){}getValue(e){return e?{processor:(e,r)=>JSApiVariablesSource.processModel(r,this.instanceName)}:{}}static processModel(e,r){var a;if(!e.arguments)return"";const t=e.arguments.find(e=>"JavaScriptVariable"===e.name);if(!(null==t?void 0:t.value)||!(null===(a=window[r])||void 0===a?void 0:a.variables))return"";try{return window[r].variables[t.value]||""}catch(r){return console.error("JSApiVariablesSource: error while getting variable. Model: ",e,"Error: ",r),""}}}JSApiVariablesSource.sourceId="JS_API_VARIABLE";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class UrlQueryParamsSource {
|
|
2
|
+
static sourceId: string;
|
|
3
|
+
static processModel(model: any, sessionUrlSearchParams: any): string;
|
|
4
|
+
constructor(config?: {});
|
|
5
|
+
config: {};
|
|
6
|
+
subscribe(): void;
|
|
7
|
+
getValue(key: any): {
|
|
8
|
+
processor?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
processor: (ctx: any, model: any) => string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import DefaultEventEmitter from"@claspo/common/DefaultEventEmitter";export default class UrlQueryParamsSource extends DefaultEventEmitter{constructor(e={}){super(),this.config=e}subscribe(){}getValue(e){return e?{processor:(e,r)=>UrlQueryParamsSource.processModel(r,this.config.sessionUrlSearchParams)}:{}}static processModel(e,r){if(!e.arguments)return"";const t=e.arguments.find(e=>"urlQueryParamName"===e.name);if(!r){r=[new URL(window.location.href).search]}if(!t||!t.value)return"";let a;for(let e=r.length-1;e>=0;e--){const s=new URLSearchParams(r[e]).getAll(t.value).filter(Boolean);if(s.length){a=s;break}}return a?a.join(", "):""}}UrlQueryParamsSource.sourceId="URL_QUERY_PARAMS";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const REQUIRED_SYMBOL=Symbol("required");export function required(e="REQUIRED"){const r=r=>{let t;switch(typeof r){case"string":t=r&&r.length>0;break;case"boolean":t=r;break;case"number":t=!isNaN(r);break;default:t=!!r}return{isValid:t,errorKey:t?null:e}};return r[REQUIRED_SYMBOL]=!0,r}
|
package/sdk.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import UpdatingEntryModule from "./UpdatingEntryModule";
|
|
2
|
+
import StaticEntryModule from "./StaticEntryModule";
|
|
3
|
+
import ViewRouter from "./ViewRouter";
|
|
4
|
+
import CompositionRoot from "./CompositionRoot";
|
|
5
|
+
import ComponentType from "./sdk/ComponentType";
|
|
6
|
+
import ViewEntryType from "./document-model/ViewEntryType";
|
|
7
|
+
import { DocumentModelUpdateType } from "./document-model/DocumentModel";
|
|
8
|
+
import { RenderConstants } from "./renderer/RenderConstants";
|
|
9
|
+
import { ViewRendererActionType } from "./renderer/ViewRendererActionType";
|
|
10
|
+
import { LoopAnimationStylesService } from "./renderer/style/LoopAnimationStylesService";
|
|
11
|
+
export { UpdatingEntryModule, StaticEntryModule, ViewRouter, CompositionRoot, ComponentType, ViewEntryType, DocumentModelUpdateType, RenderConstants, ViewRendererActionType, LoopAnimationStylesService };
|
package/sdk.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import UpdatingEntryModule from"./UpdatingEntryModule";import StaticEntryModule from"./StaticEntryModule";import CompositionRoot from"./CompositionRoot";import ViewRouter from"./ViewRouter";import ViewEntryType from"./document-model/ViewEntryType";import ComponentType from"./sdk/ComponentType";import{DocumentModelUpdateType}from"./document-model/DocumentModel";import{RenderConstants}from"./renderer/RenderConstants";import{ViewRendererActionType}from"./renderer/ViewRendererActionType";import{LoopAnimationStylesService}from"./renderer/style/LoopAnimationStylesService";export{UpdatingEntryModule,StaticEntryModule,ViewRouter,CompositionRoot,ComponentType,ViewEntryType,DocumentModelUpdateType,RenderConstants,ViewRendererActionType,LoopAnimationStylesService};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default class WcFactory {
|
|
2
|
+
constructor({ state, eventEmitter, form, documentModel, resizeListener, config, commonStylesService, trackingService, layoutType, actionFactory, actionRegister, prizePoolFactory, context, mergeTagsProcessorFactory, mobileDeviceOrientationListener, componentRegister, htmlDocumentObject, }: {
|
|
3
|
+
state: any;
|
|
4
|
+
eventEmitter: any;
|
|
5
|
+
form: any;
|
|
6
|
+
documentModel: any;
|
|
7
|
+
resizeListener: any;
|
|
8
|
+
config: any;
|
|
9
|
+
commonStylesService: any;
|
|
10
|
+
trackingService: any;
|
|
11
|
+
layoutType: any;
|
|
12
|
+
actionFactory: any;
|
|
13
|
+
actionRegister: any;
|
|
14
|
+
prizePoolFactory: any;
|
|
15
|
+
context: any;
|
|
16
|
+
mergeTagsProcessorFactory: any;
|
|
17
|
+
mobileDeviceOrientationListener: any;
|
|
18
|
+
componentRegister: any;
|
|
19
|
+
htmlDocumentObject: any;
|
|
20
|
+
});
|
|
21
|
+
state: any;
|
|
22
|
+
eventEmitter: any;
|
|
23
|
+
form: any;
|
|
24
|
+
documentModel: any;
|
|
25
|
+
resizeListener: any;
|
|
26
|
+
mobileDeviceOrientationListener: any;
|
|
27
|
+
config: any;
|
|
28
|
+
commonStylesService: any;
|
|
29
|
+
trackingService: any;
|
|
30
|
+
layoutType: any;
|
|
31
|
+
actionFactory: any;
|
|
32
|
+
actionRegister: any;
|
|
33
|
+
prizePoolFactory: any;
|
|
34
|
+
context: any;
|
|
35
|
+
mergeTagsProcessorFactory: any;
|
|
36
|
+
componentRegister: any;
|
|
37
|
+
htmlDocumentObject: any;
|
|
38
|
+
create(componentModel: any, rendererType: any): any;
|
|
39
|
+
getComponentClass(componentModel: any, rendererType: any): any;
|
|
40
|
+
constructProps(model: any, viewResourceManager: any): {
|
|
41
|
+
model: any;
|
|
42
|
+
documentModel: any;
|
|
43
|
+
resizeListener: any;
|
|
44
|
+
mobileDeviceOrientationListener: any;
|
|
45
|
+
layoutType: any;
|
|
46
|
+
viewResourceManager: any;
|
|
47
|
+
htmlDocumentObject: any;
|
|
48
|
+
services: {
|
|
49
|
+
state: any;
|
|
50
|
+
eventEmitter: any;
|
|
51
|
+
form: any;
|
|
52
|
+
config: any;
|
|
53
|
+
trackingService: any;
|
|
54
|
+
actionFactory: any;
|
|
55
|
+
actionRegister: any;
|
|
56
|
+
prizePoolFactory: any;
|
|
57
|
+
context: any;
|
|
58
|
+
mergeTagsProcessorFactory: any;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
processStyles(componentHostElement: any, componentRootElement: any, componentModel: any, rendererType: any): void;
|
|
62
|
+
constructAnimationStyles(componentHostElement: any, componentRootElement: any, componentModel: any, rendererType: any): void;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ComponentLifeCycleContainerType from"../sdk/ComponentLifeCycleContainerType";import{ComponentPropsExtractor}from"../document-model/ComponentPropsExtractor";import CommonStylesService from"../renderer/style/CommonStylesService";import{LoopAnimationStylesService}from"../renderer/style/LoopAnimationStylesService";import{applySysAttrPrefix}from"../renderer/RenderConstants";import ViewEntryType from"../document-model/ViewEntryType";export default class WcFactory{constructor({state:t,eventEmitter:e,form:o,documentModel:i,resizeListener:n,config:r,commonStylesService:s,trackingService:c,layoutType:y,actionFactory:m,actionRegister:a,prizePoolFactory:p,context:l,mergeTagsProcessorFactory:h,mobileDeviceOrientationListener:u,componentRegister:S,htmlDocumentObject:C}){this.state=t,this.eventEmitter=e,this.form=o,this.documentModel=i,this.resizeListener=n,this.mobileDeviceOrientationListener=u,this.config=r,this.commonStylesService=s,this.trackingService=c,this.layoutType=y,this.actionFactory=m,this.actionRegister=a,this.prizePoolFactory=p,this.context=l,this.mergeTagsProcessorFactory=h,this.componentRegister=S,this.htmlDocumentObject=C}create(t,e){let o=new(this.getComponentClass(t,e));const i=applySysAttrPrefix("content-container");if(t.type===ViewEntryType.VIEW&&"SysColumnsComponent"!==t.name){const t=document.createElement("div");t.setAttribute(i,""),t.style.display="inherit",t.style.gap="inherit",t.style.justifyContent="inherit",t.style.alignItems="inherit",t.style.flexDirection="inherit",t.style.width="100%",t.style.height="100%",o.getRootElement().appendChild(t),o.contentContainer=t}return o.setAttribute(applySysAttrPrefix("type"),t.type),o.setAttribute(applySysAttrPrefix("id"),t.id),o.setAttribute(applySysAttrPrefix("component"),t.name),o.setAttribute(applySysAttrPrefix("path"),t.path),o.setAttribute(applySysAttrPrefix("element"),"host"),t.props.floating&&o.setAttribute(applySysAttrPrefix("floating"),"true"),e===ComponentLifeCycleContainerType.UPDATING&&this.commonStylesService.setStyles("* {cursor:pointer !important;} *:focus {outline: none !important;}"),this.processStyles(o.getHostElement(),o.getRootElement(),t,e),CommonStylesService.applyHostStyles(t.type,o,t,this.layoutType),o}getComponentClass(t,e){return this.componentRegister.getComponent(t.name,e)}constructProps(t,e){return{model:t,documentModel:this.documentModel,resizeListener:this.resizeListener,mobileDeviceOrientationListener:this.mobileDeviceOrientationListener,layoutType:this.layoutType,viewResourceManager:e,htmlDocumentObject:this.htmlDocumentObject,services:{state:this.state,eventEmitter:this.eventEmitter,form:this.form,config:this.config,trackingService:this.trackingService,actionFactory:this.actionFactory,actionRegister:this.actionRegister,prizePoolFactory:this.prizePoolFactory,context:this.context,mergeTagsProcessorFactory:this.mergeTagsProcessorFactory}}}processStyles(t,e,o,i){const n=this.commonStylesService.getStyles(),r=document.createElement("style");this.constructAnimationStyles(t,e,o,i),r.textContent=n,e.appendChild(r)}constructAnimationStyles(t,e,o,i){if(i===ComponentLifeCycleContainerType.UPDATING)return;const n=LoopAnimationStylesService.constructAnimationStylesByTypes(ComponentPropsExtractor.extractLoopAnimationsFromStylesClasses(o));if(n){const i=document.createElement("style");i.textContent=n;[ViewEntryType.VIEW,ViewEntryType.CONTAINER,ViewEntryType.COLUMN,ViewEntryType.COLUMNS].includes(o.type)?t.appendChild(i):e.appendChild(i)}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import WcFactory from"./WcFactory";import WcRegister from"./WcRegister";import WcElement from"../sdk/WcElement";import wcStaticDecorator from"./decorators/wcStaticDecorator";import{applySysAttrPrefix}from"../renderer/RenderConstants";import ComponentLifeCycleContainerType from"../sdk/ComponentLifeCycleContainerType";describe("WcFactory",()=>{let e,t,o,s,n,r,i,c,a,l,m;beforeEach(()=>{t={},o={},s={},n={},r={},i={},c={setStyles:jest.fn(),getStyles:()=>"/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }"},a={},l="some-layout-type",m=new WcRegister,m.register(wcStaticDecorator,"STATIC"),e=new WcFactory({state:t,eventEmitter:o,form:s,documentModel:n,resizeListener:r,config:i,commonStylesService:c,trackingService:a,layoutType:l,componentRegister:m})}),afterEach(()=>{jest.restoreAllMocks()}),describe("create",()=>{test("should create a component and append content container if type is VIEW",()=>{var t;const o={name:"TestOne",type:"VIEW",id:"test-id",path:"test-path",props:{adaptiveStyles:{desktop:[],mobile:[]}}},s="STATIC",n=((t=class extends WcElement{}).define={manifest:{name:"TestOne"}},t);m.registerComponent(n,s);const r=e.create(o,s);expect(r.nodeName.toLowerCase()).toBe("test-one-static"),expect(r.getAttribute(applySysAttrPrefix("type"))).toBe(o.type),expect(r.getAttribute(applySysAttrPrefix("id"))).toBe(o.id),expect(r.getAttribute(applySysAttrPrefix("path"))).toBe(o.path),expect(r.getAttribute(applySysAttrPrefix("component"))).toBe(o.name),expect(r.getAttribute(applySysAttrPrefix("element"))).toBe("host"),expect(Array.from(r.getRootElement().children)[0].style.display).toBe("inherit")})}),describe("constructProps",()=>{test("should construct props with provided model and services",()=>{const c={some:"model"},m={some:"resource"},p=e.constructProps(c,m);expect(p).toEqual(expect.objectContaining({model:c,documentModel:n,resizeListener:r,layoutType:l,viewResourceManager:m,services:expect.objectContaining({state:t,eventEmitter:o,form:s,trackingService:a,config:i})}))})}),describe("constructAnimationStyles",()=>{it("constructAnimationStyles",function(){const t=document.createElement("div");t.id="view",document.body.appendChild(t);let o=document.querySelector("#view");o.attachShadow({mode:"open"}),e.constructAnimationStyles(o,o.shadowRoot,{props:{adaptiveStyles:{desktop:[{element:"host",styleAttributes:{},hoverStyleAttributes:{},classes:"class1 class2 cl-loop-animation-BLINK"},{element:"button",styleAttributes:{},hoverStyleAttributes:{},classes:"class3 cl-loop-animation-BLINK"}],mobile:[{element:"host",styleAttributes:{},hoverStyleAttributes:{},classes:""},{element:"button",styleAttributes:{},hoverStyleAttributes:{},classes:"class4 cl-loop-animation-PULSE"}]}}},ComponentLifeCycleContainerType.STATIC),expect(o.shadowRoot.innerHTML.includes(".cl-loop-animation-PULSE")).toBeTruthy(),expect(o.shadowRoot.innerHTML.includes("@keyframes pulse-animation")).toBeTruthy(),expect(o.shadowRoot.innerHTML.includes(".cl-loop-animation-BLINK")).toBeTruthy(),expect(o.shadowRoot.innerHTML.match(/.cl-loop-animation-BLINK/g).length).toEqual(1),expect(o.shadowRoot.innerHTML.includes("@keyframes blink-animation")).toBeTruthy(),expect(o.shadowRoot.innerHTML.match(/@keyframes blink-animation/g).length).toEqual(1),expect(o.shadowRoot.innerHTML.includes(".cl-loop-animation-FLICKER")).toBeFalsy(),document.querySelector("#view").remove()})}),describe("processStyles",()=>{it("processStyles",function(){let t=document.createElement("div");t.attachShadow({mode:"open"}),e.processStyles(t,t.shadowRoot,{name:"cmpName",props:{adaptiveStyles:{desktop:[{element:"host",styleAttributes:{},hoverStyleAttributes:{},classes:"class1 class2"},{element:"button",styleAttributes:{},hoverStyleAttributes:{},classes:"class3"}],mobile:[{element:"host",styleAttributes:{},hoverStyleAttributes:{},classes:""},{element:"button",styleAttributes:{},hoverStyleAttributes:{},classes:"class4"}]}}});const o=document.createElement("div");expect(t.shadowRoot.innerHTML).toEqual(`<style>/* common styles */ *, *:before, *:after { box-sizing: border-box; font-family: inherit; }</style>${o.innerHTML}`)})})});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class WcRegister {
|
|
2
|
+
constructor(bundledComponentClasses: any);
|
|
3
|
+
classes: any;
|
|
4
|
+
modelNameToTagMap: any;
|
|
5
|
+
register(decorator: any, entryModuleType: any): void;
|
|
6
|
+
decorator: any;
|
|
7
|
+
registerComponent(clazz: any, entryModuleType: any): void;
|
|
8
|
+
getComponent(name: any, entryModuleType: any): CustomElementConstructor;
|
|
9
|
+
getComponentTagName(tagName: any, entryModuleType: any): string;
|
|
10
|
+
}
|
|
11
|
+
export default WcRegister;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import wcStaticDecorator from"./decorators/wcStaticDecorator";import wcUpdatingDecorator from"./decorators/wcUpdatingDecorator";import ComponentLifeCycleContainerType from"../sdk/ComponentLifeCycleContainerType";function getModelNameFromClass(e){return e.define.manifest.name}function getTagNameFromClass(e){const o=getModelNameFromClass(e);return(t=o,t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,o)=>(o?"-":"")+e.toLowerCase())).replace("-component","");var t}export class WcRegister{constructor(e){this.classes=e||[],this.modelNameToTagMap=this.classes.reduce((e,o)=>Object.assign(Object.assign({},e),{[getModelNameFromClass(o)]:getTagNameFromClass(o)}),{})}register(e,o){this.decorator=e,this.classes.forEach(e=>this.registerComponent(e,o))}registerComponent(e,o){const t=this.getComponentTagName(getTagNameFromClass(e),o),a=o===ComponentLifeCycleContainerType.STATIC?wcStaticDecorator(e):wcUpdatingDecorator(e);customElements.get(t)||customElements.define(t,a),this.modelNameToTagMap[getModelNameFromClass(a)]||(this.modelNameToTagMap[getModelNameFromClass(a)]=getTagNameFromClass(a))}getComponent(e,o){const t=(a=e,a.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,o)=>(o?"-":"")+e.toLowerCase())).replace("-component","");var a;const s=this.getComponentTagName(t,o),n=customElements.get(s);if(!n){const t=`Claspo: the component named "${e}" was found in the document model, but the component class was not found.`,a=o===ComponentLifeCycleContainerType.STATIC?'Check if the component can be downloaded from the server, or pass the class to "bundledComponentClasses".':'Add the component to the "availableComponentsPanel", or pass the class to the "bundledComponentClasses".';throw new Error(`${t} ${a}`)}return n}getComponentTagName(e,o){return`${e}-${o.toLowerCase()}`}}export default WcRegister;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import WcRegister from"./WcRegister";describe("WcRegister",()=>{let e;const t=jest.fn();beforeEach(()=>{e=new WcRegister}),test("constructor should populate modelNameToTagMap",()=>{expect(e.modelNameToTagMap).toBeDefined(),expect(e.modelNameToTagMap).toEqual(expect.any(Object))}),describe("register",()=>{test("should call registerComponent for each class",()=>{const o=jest.spyOn(e,"registerComponent");e.register(t,"STATIC"),expect(o).toHaveBeenCalledTimes(e.classes.length)}),test("should set decorator",()=>{e.register(t,"STATIC"),expect(e.decorator).toBe(t)})}),describe("registerComponent",()=>{test("should define custom element if not already defined",()=>{var t;const o=((t=class{}).define={manifest:{name:"TestCmpOne"}},t);e.registerComponent(o,"STATIC"),expect(customElements.get("test-cmp-one-static")).toBeDefined()})}),describe("getComponent",()=>{test("should return the correct class",()=>{var t;const o="STATIC",s=((t=class{}).define={manifest:{name:"TestCmpThree"}},t);e.registerComponent(s,o);const n=e.getComponent("TestCmpThree",o);expect(n.define.manifest.name).toBe("TestCmpThree")}),test("should throw for unsupported component",()=>{expect(()=>{e.getComponent("UnknownComponent","STATIC")}).toThrow()})}),describe("getComponentTagName",()=>{test("should return the correct tag name",()=>{const t=e.getComponentTagName("test-component","STATIC");expect(t).toBe("test-component-static")})})});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default class WcResolver {
|
|
2
|
+
constructor(entryModuleType: string | undefined, wcRegister: any);
|
|
3
|
+
entryModuleType: string;
|
|
4
|
+
wcRegister: any;
|
|
5
|
+
getComponentManifests(): any[];
|
|
6
|
+
getAllComponents(): (CustomElementConstructor | undefined)[];
|
|
7
|
+
loadComponentsIfNecessary(documentModel: any, staticResourcesUrl: any): Promise<{
|
|
8
|
+
manifests: any[];
|
|
9
|
+
}>;
|
|
10
|
+
loadComponents(componentNames: any, staticResourcesUrl: any): Promise<any[]>;
|
|
11
|
+
getComponentNamesToLoad(componentNames: any): any;
|
|
12
|
+
buildComponentFilePaths(componentNames: any, staticResourcesUrl: any): any;
|
|
13
|
+
loadComponentClasses(modulePaths: any, componentNamesToLoad: any): Promise<any[]>;
|
|
14
|
+
getWindowKeyForComponentClass(componentName: any): string;
|
|
15
|
+
registerModules(modules: any): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import DocumentUtils from"@claspo/common/document/DocumentUtils";import ComponentLifeCycleContainerType from"../sdk/ComponentLifeCycleContainerType";export default class WcResolver{constructor(e=ComponentLifeCycleContainerType.STATIC,t){this.entryModuleType=e,this.wcRegister=t}getComponentManifests(){return this.getAllComponents().map(e=>{var t;return null===(t=e.define)||void 0===t?void 0:t.manifest})}getAllComponents(){return Object.values(this.wcRegister.modelNameToTagMap).map(e=>this.wcRegister.getComponentTagName(e,this.entryModuleType)).map(e=>customElements.get(e)).filter(e=>!!e)}async loadComponentsIfNecessary(e,t){let o=new Set;e.views.forEach(e=>{DocumentUtils.iterateDepthFirst(e,e=>{o.add(e.name)})});const n=this.getComponentManifests();let s=n.map(e=>e.name),i=[...o].filter(e=>!s.includes(e));if(!i.length)return{manifests:n};await this.loadComponents(i,t);return{manifests:this.getComponentManifests()}}async loadComponents(e,t){const o=this.getComponentNamesToLoad(e),n=this.buildComponentFilePaths(o,t),s=await this.loadComponentClasses(n,o);return this.registerModules(s),s}getComponentNamesToLoad(e){return e||[]}buildComponentFilePaths(e,t){return e.map(e=>`${t.replace(/\/$/,"")}/${e}/${e}.js`)}loadComponentClasses(e,t){return Promise.all(e.map((e,o)=>new Promise((n,s)=>{const i=document.createElement("script");i.type="module",i.onload=()=>{const e=t[o];n(window[this.getWindowKeyForComponentClass(e)])},i.onerror=s,i.src=e,document.body.appendChild(i)})))}getWindowKeyForComponentClass(e){return`clComponentClass_${e}`}registerModules(e){e.forEach(e=>{this.wcRegister.registerComponent(e,this.entryModuleType)})}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default class WcViewRenderer {
|
|
2
|
+
constructor(documentModel: any, resizeListener: any, configService: any, factory: any, eventEmitter: any);
|
|
3
|
+
isMobile: any;
|
|
4
|
+
resizeListener: any;
|
|
5
|
+
documentModel: any;
|
|
6
|
+
factory: any;
|
|
7
|
+
eventEmitter: any;
|
|
8
|
+
viewResourceManager: ViewResourcesManager;
|
|
9
|
+
destroy(viewComponentRef: any): void;
|
|
10
|
+
render(viewModel: any, index: any, type?: string): any;
|
|
11
|
+
renderComponent(containerModel: any, model: any, rendererType: any, insertPosition?: any): any;
|
|
12
|
+
selectElementToAppendTo(element: any): any;
|
|
13
|
+
getRenderOutlet(element: any): any;
|
|
14
|
+
}
|
|
15
|
+
import ViewResourcesManager from "../resource-management/ViewResourcesManager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ComponentInsertType from"@claspo/common/document/ComponentInsertType";import ViewEntryType from"../document-model/ViewEntryType";import{ViewRendererActionType}from"../renderer/ViewRendererActionType";import{applySysAttrPrefix}from"../renderer/RenderConstants";import ViewResourcesManager from"../resource-management/ViewResourcesManager";import ComponentLifeCycleContainerType from"../sdk/ComponentLifeCycleContainerType";export default class WcViewRenderer{constructor(e,t,n,o,r){this.isMobile=null,this.resizeListener=t,this.documentModel=e,this.factory=o,this.eventEmitter=r,this.viewResourceManager=new ViewResourcesManager(this.eventEmitter),this.destroy=this.destroy.bind(this)}render(e,t,n=ComponentLifeCycleContainerType.STATIC){const o=this.factory.create(e,n,this.viewResourceManager);if(this.documentModel.setComponentRef(e.id,o),e.componentRef=o,e.type===ViewEntryType.VIEW&&"SysColumnsComponent"===e.name){const t=applySysAttrPrefix("content-container"),n=this.getRenderOutlet(e.componentRef.getRootElement());null==n||n.setAttribute(t,"")}return e.children.forEach(t=>{this.renderComponent(e,t,n)}),setTimeout(()=>{this.viewResourceManager.viewHasPendingResources()||this.eventEmitter.emit(ViewRendererActionType.VIEW_COMPONENT_RESOURCES_LOADED)},5),o}destroy(e){var t;if(!(null===(t=e.model)||void 0===t?void 0:t.path))return;const n=e.model.path[0];this.documentModel.destroyView(n)}renderComponent(e,t,n,o=ComponentInsertType.INSIDE){var r;const i=this.factory.create(t,n,this.viewResourceManager);this.documentModel.setComponentRef(t.id,i);const s=e.componentRef.getRootElement();let p=t.props.floating||"FLOATING_IMAGE"===t.type?s:this.selectElementToAppendTo(e.componentRef.contentContainer)||this.selectElementToAppendTo(s);if(o===ComponentInsertType.INSIDE)i.connect(o,p,i);else if(o===ComponentInsertType.INSTEAD){const n=(null===(r=t.prevPath)||void 0===r?void 0:r.at(-1))<t.path.at(-1)?ComponentInsertType.AFTER:ComponentInsertType.BEFORE;i.connect(n,e.componentRef,t.componentRef)}else i.connect(o,e.componentRef,t.componentRef);return t.children&&t.children.forEach(e=>this.renderComponent(t,e,n)),t}selectElementToAppendTo(e){return e?this.getRenderOutlet(e)||e:null}getRenderOutlet(e){return e.querySelector(`[${applySysAttrPrefix("render-outlet")}]`)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ComponentInsertType from"@claspo/common/document/ComponentInsertType";export default function wcStaticDecorator(e){return class extends e{connect(e,n,t){switch(e){case ComponentInsertType.INSIDE:return void n.appendChild(t);case ComponentInsertType.BEFORE:case ComponentInsertType.AFTER:{let o=e===ComponentInsertType.BEFORE?"beforebegin":"afterend";return void n.insertAdjacentElement(o,t)}}}}}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default function wcUpdatingDecorator(clazz: any): {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
eventListeners: any[];
|
|
5
|
+
lastDragOverEvent: any;
|
|
6
|
+
focusedElements: any[];
|
|
7
|
+
observer: MutationObserver | null;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
_addAllListeners(): void;
|
|
11
|
+
removeFocusSubscription: any;
|
|
12
|
+
setFocusSubscription: any;
|
|
13
|
+
componentFocusedSubscription: any;
|
|
14
|
+
_observeChanges(): void;
|
|
15
|
+
_setEventListeners(): void;
|
|
16
|
+
_removeListenersForDisconnectedNodes(): void;
|
|
17
|
+
_setGlobalListeners(): void;
|
|
18
|
+
_isEventListenerPresent(element: any): boolean;
|
|
19
|
+
_setElementListeners(element: any, inlineEdit: any): void;
|
|
20
|
+
_elementClickListener(event: any, inlineEdit: any): void;
|
|
21
|
+
_elementDoubleClickListener(event: any): void;
|
|
22
|
+
_elementDragStartListener(event: any): void;
|
|
23
|
+
_createDragPreviewPlaceholder(hostElementCoords: any): HTMLDivElement;
|
|
24
|
+
_isWidgetRotated(sharedModel: any, isDesktop: any): boolean;
|
|
25
|
+
_getFloatingBoxParams(sharedModel: any, isDesktop: any): any;
|
|
26
|
+
_elementDragEndListener(event: any): void;
|
|
27
|
+
_elementDragOverListener(event: any): void;
|
|
28
|
+
_documentDropListener(event: any): void;
|
|
29
|
+
_mouseMoveEventListener(event: any): void;
|
|
30
|
+
preHoveredElement: any;
|
|
31
|
+
_mouseOutEventListener(event: any): void;
|
|
32
|
+
_blurEventListener(event: any): void;
|
|
33
|
+
_removeFocus(): void;
|
|
34
|
+
_setFocus(targetElementName: any): void;
|
|
35
|
+
_findClosestHostElement(path: any): any;
|
|
36
|
+
_activateEventListeners(): void;
|
|
37
|
+
_deactivateEventListeners(): void;
|
|
38
|
+
_getElementNameByNode(node: any): any;
|
|
39
|
+
_setFocusableElementsAttribute(): void;
|
|
40
|
+
_updateFocusedElementClasses(): void;
|
|
41
|
+
connect(insertType: any, targetElement: any, instance: any): void;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ViewEntryType from"../../document-model/ViewEntryType";import{ViewRendererActionType}from"../../renderer/ViewRendererActionType";import ComponentType from"../../sdk/ComponentType";import{applySysAttrPrefix,applySysClassPrefix}from"../../renderer/RenderConstants";import getParentHostElement from"../../sdk/getParentHostElement";import debounce from"@claspo/common/async/debounce";import wcStaticDecorator from"./wcStaticDecorator";export default function wcUpdatingDecorator(e){return class extends(wcStaticDecorator(e)){constructor(){super(),this.eventListeners=[],this.lastDragOverEvent=null,this.focusedElements=[],this.observer=null,this._observeChanges()}connectedCallback(){super.connectedCallback(),this._addAllListeners()}disconnectedCallback(){var e,t,s;super.disconnectedCallback(),this._deactivateEventListeners(),null===(e=this.removeFocusSubscription)||void 0===e||e.off(),null===(t=this.setFocusSubscription)||void 0===t||t.off(),null===(s=this.componentFocusedSubscription)||void 0===s||s.off(),this.observer.disconnect()}_addAllListeners(){this.observer.observe(this.getRootElement(),{childList:!0,subtree:!0}),this.model.type===ViewEntryType.VIEW&&(this.eventListeners.push({eventName:"mousemove",callback:this._mouseMoveEventListener.bind(this),element:this}),this.eventListeners.push({eventName:"mouseout",callback:this._mouseOutEventListener.bind(this),element:this})),this.removeFocusSubscription=this.services.eventEmitter.on(ViewRendererActionType.REMOVE_FOCUS,()=>{this._removeFocus()}),this.setFocusSubscription=this.services.eventEmitter.on(ViewRendererActionType.SET_FOCUS,e=>{this._removeFocus(),this.model.id===e&&this._setFocus("host")}),this.componentFocusedSubscription=this.services.eventEmitter.on(ViewRendererActionType.COMPONENT_FOCUSED,({id:e,targetElementName:t})=>{this._removeFocus(),this.model.id===e&&this._setFocus(t)}),this.manifest.preventDraggable||this.getHostElement().setAttribute("draggable","true"),this._setElementListeners(this.getHostElement()),this._setGlobalListeners(),this._setEventListeners(),this._activateEventListeners(),this._setFocusableElementsAttribute()}_observeChanges(){let e={addded:!1,removed:!1};const t=debounce(()=>{e.removed&&this._removeListenersForDisconnectedNodes(),e.addded&&(this._setEventListeners(),this._activateEventListeners(),this._setFocusableElementsAttribute(),this._updateFocusedElementClasses()),e={addded:!1,removed:!1}},500);this.observer=new MutationObserver(function(s){for(let i of s){for(let t of i.addedNodes)t instanceof HTMLElement&&"STYLE"!==t.nodeName&&!e.addded&&(e=Object.assign(Object.assign({},e),{addded:!0}));for(let t of i.removedNodes)t instanceof HTMLElement&&"STYLE"!==t.nodeName&&!e.removed&&(e=Object.assign(Object.assign({},e),{removed:!0}));t()}})}_setEventListeners(){this.getRootElement().querySelectorAll("[cl-inline-edit], [cl-inline-edit] *").forEach(e=>{this._isEventListenerPresent(e)||"STYLE"!==e.tagName&&(e.getAttribute("draggable")||e.setAttribute("draggable","true"),this._setElementListeners(e,!0))}),this.getRootElement().querySelectorAll(":not([cl-inline-edit]):not([cl-type]):not([cl-inline-edit] *)").forEach(e=>{if(!this._isEventListenerPresent(e)&&"STYLE"!==e.tagName){if(e.getAttribute("draggable")||e.setAttribute("draggable","true"),e instanceof HTMLElement){const t=e.tagName.toLowerCase();"input"!==t&&"textarea"!==t||"readonly"===!e.getAttribute("readonly")||e.setAttribute("readonly","readonly"),this.manifest.componentType===ComponentType.VIDEO&&e.classList.contains("video-overlay")&&(e.style.visibility="visible")}this._setElementListeners(e)}})}_removeListenersForDisconnectedNodes(){this.eventListeners=this.eventListeners.filter(e=>(e.element.isConnected||e.element.removeEventListener(e.eventName,e.callback),e.element.isConnected))}_setGlobalListeners(){this.eventListeners.push({eventName:"drop",callback:e=>this._documentDropListener(e),element:document})}_isEventListenerPresent(e){return!!this.eventListeners.find(t=>t.element===e)}_setElementListeners(e,t){[{eventName:"click",callback:e=>this._elementClickListener(e,t),element:e},{eventName:"dblclick",callback:this._elementDoubleClickListener.bind(this),element:e},{eventName:"dragstart",callback:this._elementDragStartListener.bind(this),element:e},{eventName:"dragend",callback:this._elementDragEndListener.bind(this),element:e},{eventName:"dragover",callback:this._elementDragOverListener.bind(this),element:e},{eventName:"blur",callback:this._blurEventListener.bind(this),element:e,useCapture:!0}].forEach(e=>this.eventListeners.push(e))}_elementClickListener(e,t){e.preventDefault(),e.stopImmediatePropagation();const s=e.composedPath()[0],i=this.getHostElement();if(t&&this.services.eventEmitter.emit(ViewRendererActionType.SHOW_INLINE_EDIT,{id:this.model.id,hostElement:i,targetElement:s}),this.model.focusParentOnClick){const e=getParentHostElement(i);this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_FOCUSED,{id:e.getAttribute(applySysAttrPrefix("id")),hostElement:e,targetElement:e,targetElementName:"host"})}else this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_FOCUSED,{id:this.model.id,hostElement:i,targetElement:s,targetElementName:this._getElementNameByNode(s)});this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_CLICKED,e)}_elementDoubleClickListener(e){e.preventDefault(),e.stopImmediatePropagation(),this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_DOUBLE_CLICKED,{id:this.model.id,hostElement:this.getHostElement(),targetElement:e.composedPath()[0]})}_elementDragStartListener(e){e.stopPropagation();const t=e.composedPath().find(e=>{var t;return null===(t=e.hasAttribute)||void 0===t?void 0:t.call(e,applySysAttrPrefix("type"))}),s=t.getAttribute(applySysAttrPrefix("type"));this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_DRAGSTART,{id:this.model.id,path:this.model.path,hostElement:this.getHostElement(),targetElement:e.composedPath()[0],event:e,checkIfAllowed:i=>{if(i){const i=t.getBoundingClientRect();if(this._isWidgetRotated(this.documentModel.getShared(),!this.resizeListener.isMobile())){const s=e.pageX-i.left-window.pageXOffset,n=e.pageY-i.top-window.pageYOffset;if(navigator.userAgent.match(/Firefox/i)){const i=t.style.transform,r=t.style.transformOrigin;t.style.transform="rotate(-90deg)",t.style.transformOrigin="left top",e.dataTransfer.setDragImage(t,s,n),requestAnimationFrame(()=>{t.style.transform=i,t.style.transformOrigin=r})}else{const t=this._createDragPreviewPlaceholder(i);document.body.appendChild(t),e.dataTransfer.setDragImage(t,s,n),setTimeout(()=>{t.remove()})}}else e.dataTransfer.setDragImage(t,e.pageX-i.left-window.pageXOffset,e.pageY-i.top-window.pageYOffset);if(s===ViewEntryType.SLIDER){const s=t.shadowRoot.querySelector(".slides-container"),n=new WebKitCSSMatrix(getComputedStyle(s).transform).m41;e.dataTransfer.setDragImage(t,e.pageX-i.left-n-window.pageXOffset,e.pageY-i.top-window.pageYOffset)}}else e.preventDefault(),this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_DRAGEND)}})}_createDragPreviewPlaceholder(e){const t=document.createElement("div");return t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.background="rgba(159, 41, 176, 0.3)",t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.innerHTML='<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g opacity="0.6" clip-path="url(#clip0_43446_120564)">\n<path d="M26.5566 11.7573L30.7993 16L26.5566 20.2426" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M20.2422 26.5564L15.9995 30.799L11.7569 26.5564" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M5.44336 20.2426L1.20072 16L5.44336 11.7573" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M11.7569 5.4436L15.9995 1.20096L20.2422 5.4436" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M30.7994 16H20.8999" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M15.9995 30.7989L15.9995 20.8994" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M1.20064 16H11.1001" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M15.9995 1.20113L15.9995 11.1006" stroke="#50005B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n</g>\n<defs>\n<clipPath id="clip0_43446_120564">\n<rect width="32" height="32" fill="white"/>\n</clipPath>\n</defs>\n</svg>',t.firstChild.style.width=.4*e.width+"px",t.firstChild.style.height=.4*e.height+"px",t}_isWidgetRotated(e,t){const s=this._getFloatingBoxParams(e,t);return!!s&&"CENTER"===s.verticalPosition}_getFloatingBoxParams(e,t){return e&&e.floatingBox?t?e.floatingBox:e.floatingBox.mobile:null}_elementDragEndListener(e){e.stopPropagation(),this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_DRAGEND,{id:this.model.id,path:this.model.path,hostElement:this.getHostElement(),targetElement:e.composedPath()[0],event:e})}_elementDragOverListener(e){e.preventDefault(),e.stopPropagation();const t=this.lastDragOverEvent;this.lastDragOverEvent=e,e.pageX&&e.pageY&&(t&&t.clientY===e.clientY&&t.clientX===e.clientX||this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_DRAGOVER,{id:this.model.id,hostElement:this.getHostElement(),targetElement:e.composedPath()[0],event:e}))}_documentDropListener(e){this.services.eventEmitter.emit(ViewRendererActionType.DOCUMENT_DROP,{id:this.model.id,hostElement:this.getHostElement(),targetElement:e.composedPath()[0],event:e})}_mouseMoveEventListener(e){const t=this._findClosestHostElement(e.composedPath());if(this.preHoveredElement&&this.preHoveredElement!==t&&this.preHoveredElement.classList.remove(applySysClassPrefix("hovered")),this.preHoveredElement=t,t){t.classList.add(applySysClassPrefix("hovered"));const s={id:t.getAttribute(applySysAttrPrefix("id")),hostElement:t,targetElement:e.composedPath()[0],event:e};this.services.eventEmitter.emit(ViewRendererActionType.COMPONENT_MOUSE_MOVE,s)}}_mouseOutEventListener(e){e.stopPropagation();const t=this._findClosestHostElement(e.composedPath());t&&t.classList.remove(applySysClassPrefix("hovered"))}_blurEventListener(e){e.stopImmediatePropagation()}_removeFocus(){this.focusedElements.length&&this.focusedElements.forEach(e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.remove(applySysClassPrefix("focused"))}),this.focusedElements=[]}_setFocus(e){const t=this.getHostElement();if(this.focusedElements=[t],t.classList.add(applySysClassPrefix("focused")),"host"!==e){const t=this.getElements().filter(t=>t.getAttribute(applySysAttrPrefix("element"))===e);t.forEach(e=>e.classList.add(applySysClassPrefix("focused"))),this.focusedElements=this.focusedElements.concat(t)}}_findClosestHostElement(e){const t=e.filter(e=>e instanceof HTMLElement).filter(e=>!!e.getAttribute(applySysAttrPrefix("component")));return t.length?t[0]:null}_activateEventListeners(){this.eventListeners.forEach(e=>{e.activated||(e.element.addEventListener(e.eventName,e.callback,e.useCapture),e.activated=!0)})}_deactivateEventListeners(){this.eventListeners.forEach(e=>{e.element.removeEventListener(e.eventName,e.callback)}),this.eventListeners=[]}_getElementNameByNode(e){var t;const s="host";if(!e)return s;const i=e.closest(`[${applySysAttrPrefix("element")}]`);if(!i)return s;const n=i.getAttribute(applySysAttrPrefix("element"));return"host"===n||(null===(t=this.manifest.focusableElements)||void 0===t?void 0:t.includes(n))?n:s}_setFocusableElementsAttribute(){this.getElements().forEach(e=>{var t;(null===(t=this.manifest.focusableElements)||void 0===t?void 0:t.includes(e.getAttribute(applySysAttrPrefix("element"))))&&e.setAttribute(applySysAttrPrefix("focusable-element"),"")})}_updateFocusedElementClasses(){if(this.focusedElements.length<2)return;const e=this.focusedElements.find(e=>e.hasAttribute(applySysAttrPrefix("focusable-element")));e&&this._setFocus(e.getAttribute(applySysAttrPrefix("element")))}}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function getPredefinedIconsByType(type: any): any;
|
|
2
|
+
export function getPredefinedIcons(): {
|
|
3
|
+
STAR_5: {
|
|
4
|
+
selected: string[];
|
|
5
|
+
unselected: string[];
|
|
6
|
+
};
|
|
7
|
+
EMOJI_3: {
|
|
8
|
+
dissatisfied: string[];
|
|
9
|
+
neutral: string[];
|
|
10
|
+
satisfied: string[];
|
|
11
|
+
};
|
|
12
|
+
LIKE_DISLIKE: {
|
|
13
|
+
satisfied: string[];
|
|
14
|
+
dissatisfied: string[];
|
|
15
|
+
};
|
|
16
|
+
RATING_1_5: {
|
|
17
|
+
verySatisfied: string[];
|
|
18
|
+
satisfied: string[];
|
|
19
|
+
neutral: string[];
|
|
20
|
+
dissatisfied: string[];
|
|
21
|
+
veryDissatisfied: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getPredefinedIconsByType(C){return getPredefinedIcons()[C]}export function getPredefinedIcons(){return{STAR_5:{selected:['\n <svg viewBox="0 0 40 40" fill="none">\n <g clip-path="url(#clip0_40480_197489)">\n <path d="M19.5887 2.61646C20.1169 1.54618 21.6431 1.54619 22.1713 2.61646L26.6814 11.755C26.8912 12.18 27.2966 12.4746 27.7657 12.5427L37.8506 14.0082C39.0317 14.1798 39.5034 15.6313 38.6487 16.4644L31.3511 23.5777C31.0118 23.9085 30.8569 24.3852 30.937 24.8523L32.6597 34.8965C32.8615 36.0729 31.6268 36.9699 30.5704 36.4145L21.5501 31.6723C21.1306 31.4517 20.6294 31.4517 20.2099 31.6723L11.1896 36.4145C10.1332 36.9699 8.89852 36.0729 9.10028 34.8965L10.823 24.8523C10.9031 24.3852 10.7482 23.9085 10.4089 23.5777L3.11131 16.4644C2.25664 15.6313 2.72826 14.1798 3.90937 14.0082L13.9943 12.5427C14.4634 12.4746 14.8688 12.18 15.0786 11.755L19.5887 2.61646Z" fill="#FFBB00"/>\n </g>\n <defs>\n <clipPath id="clip0_40480_197489">\n <rect width="40" height="40" rx="0.85" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '],unselected:['\n <svg viewBox="0 0 40 40" fill="none">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21.7904 9.31021C21.2622 8.23994 19.736 8.23994 19.2078 9.31021L17.2802 13.2158C16.651 14.4908 15.4346 15.3746 14.0276 15.579L9.71746 16.2053C8.53634 16.377 8.06473 17.8284 8.91939 18.6615L12.0382 21.7016C13.0564 22.6941 13.521 24.124 13.2806 25.5254L12.5444 29.8181C12.3426 30.9944 13.5773 31.8915 14.6337 31.3361L18.4888 29.3094C19.7473 28.6477 21.2508 28.6477 22.5093 29.3094L26.3644 31.3361C27.4208 31.8915 28.6555 30.9944 28.4538 29.8181L27.7175 25.5254C27.4772 24.124 27.9418 22.6941 28.9599 21.7016L32.0788 18.6615C32.9334 17.8284 32.4618 16.377 31.2807 16.2053L26.9706 15.579C25.5635 15.3746 24.3472 14.4908 23.7179 13.2158L21.7904 9.31021ZM21.7904 2.80271C21.2622 1.73243 19.736 1.73243 19.2078 2.8027L14.6976 11.9412C14.4879 12.3662 14.0824 12.6608 13.6134 12.729L3.52845 14.1944C2.34733 14.366 1.87572 15.8175 2.73038 16.6506L10.0279 23.764C10.3673 24.0948 10.5222 24.5714 10.4421 25.0385L8.71935 35.0828C8.51759 36.2591 9.75229 37.1562 10.8087 36.6008L19.829 31.8585C20.2485 31.638 20.7497 31.638 21.1692 31.8585L30.1894 36.6008C31.2459 37.1562 32.4806 36.2591 32.2788 35.0828L30.5561 25.0385C30.476 24.5714 30.6308 24.0948 30.9702 23.764L38.2678 16.6506C39.1224 15.8175 38.6508 14.366 37.4697 14.1944L27.3847 12.729C26.9157 12.6608 26.5103 12.3662 26.3005 11.9412L21.7904 2.80271Z" fill="#FFBB00"/>\n </svg>\n ']},EMOJI_3:{dissatisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M19.6348 39.0785C10.4951 39.0785 0.634766 33.0441 0.634766 19.8029C0.634766 6.56174 10.4951 0.527344 19.6348 0.527344C24.7124 0.527344 29.3968 2.28594 32.8692 5.49279C36.6365 9.00998 38.6348 13.9754 38.6348 19.8029C38.6348 25.6304 36.6365 30.5614 32.8692 34.0786C29.3968 37.2855 24.6796 39.0785 19.6348 39.0785Z" fill="#F9801F"/>\n <path d="M26.3 33.6787C26.1886 33.6339 26.087 33.5615 26.0084 33.4649C22.821 29.9788 17.5501 29.8719 14.2382 33.227C14.1629 33.3063 14.0843 33.3856 14.0122 33.4649C13.9336 33.5615 13.832 33.6339 13.7206 33.6787C13.475 33.7753 13.1965 33.7201 13 33.5373C12.8067 33.358 12.7412 33.0718 12.8394 32.8201C13.8156 30.1822 16.7181 28.1133 20.0103 28.1133C23.3025 28.1133 26.205 30.1822 27.1812 32.8167C27.2794 33.0684 27.2139 33.3546 27.0206 33.5339C26.8241 33.7167 26.5456 33.7718 26.3 33.6787Z" fill="#422B0D"/>\n <path d="M17.848 21.8423C17.1142 20.8699 14.0905 19.0009 12.9997 18.4561C12.5935 18.2596 12.1709 18.1009 11.7385 17.9837C11.6599 17.9596 11.5747 17.9492 11.4928 17.9492C11.0571 17.9596 10.6837 18.2871 10.5952 18.7389C10.4937 19.2078 10.723 19.6906 11.1423 19.8837C11.6566 20.1492 12.5542 20.6526 13.4845 21.2078C12.7081 21.694 12.2331 22.5767 12.2331 23.5285V24.0319C12.2331 25.4595 13.3338 26.6181 14.69 26.6181C16.0462 26.6181 17.1469 25.4595 17.1469 24.0319V23.5285C17.1469 23.5078 17.1469 23.4905 17.1469 23.4698C17.4974 23.4457 17.8119 23.225 17.9659 22.894C18.1264 22.5492 18.0805 22.1388 17.848 21.8423Z" fill="#422B0D"/>\n <path d="M29.4374 18.7398C29.3457 18.2846 28.9657 17.9605 28.5234 17.957C28.4416 17.957 28.3564 17.9674 28.2778 17.9915C27.8453 18.1053 27.4228 18.2639 27.0165 18.457C25.9257 18.9949 22.9021 20.8708 22.1683 21.8363C21.9357 22.1363 21.8964 22.5501 22.0602 22.8949C22.2174 23.2294 22.5286 23.4466 22.8824 23.4707V23.5294V24.0328C22.8824 25.4604 23.9831 26.619 25.3393 26.619C26.6955 26.619 27.7962 25.4604 27.7962 24.0328V23.5294C27.7962 22.5811 27.3212 21.7018 26.5481 21.2156C27.4784 20.6604 28.376 20.157 28.8903 19.8915C29.3129 19.6984 29.5455 19.2122 29.4374 18.7398Z" fill="#422B0D"/>\n <path d="M14.5622 21.7177C14.097 21.4832 13.5368 21.6901 13.3108 22.1798C13.1372 22.5625 13.2158 23.0212 13.5073 23.3177C13.9725 23.5522 14.5327 23.3453 14.7587 22.8556C14.9323 22.4729 14.8537 22.0143 14.5622 21.7177Z" fill="#896024"/>\n <path d="M25.2145 21.7177C24.7493 21.4832 24.1892 21.6901 23.9631 22.1798C23.7895 22.5625 23.8681 23.0212 24.1597 23.3177C24.6249 23.5522 25.185 23.3453 25.4111 22.8556C25.5847 22.4729 25.5061 22.0143 25.2145 21.7177Z" fill="#896024"/>\n </svg>\n '],neutral:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M20.1826 39.0785C11.043 39.0785 1.18262 33.0441 1.18262 19.8029C1.18262 6.56174 11.043 0.527344 20.1826 0.527344C25.2602 0.527344 29.9447 2.28594 33.4171 5.49279C37.1843 9.00998 39.1826 13.9754 39.1826 19.8029C39.1826 25.6304 37.1843 30.5614 33.4171 34.0786C29.9447 37.2855 25.2274 39.0785 20.1826 39.0785Z" fill="#FDE030"/>\n <path d="M28.5041 28.4578H12.1248C11.4008 28.4578 10.8145 27.8406 10.8145 27.0785C10.8145 26.3165 11.4008 25.6992 12.1248 25.6992H28.5041C29.2281 25.6992 29.8145 26.3165 29.8145 27.0785C29.8145 27.8406 29.2281 28.4578 28.5041 28.4578Z" fill="#422B0D"/>\n <path d="M13.9818 13.957C12.6092 13.957 11.3611 15.1777 11.3611 17.2053C11.3611 19.2328 12.6092 20.45 13.9818 20.45C15.3544 20.45 16.6025 19.2294 16.6025 17.2053C16.6025 15.1812 15.3544 13.957 13.9818 13.957Z" fill="#422B0D"/>\n <path d="M13.8537 15.3115C13.3885 15.077 12.8283 15.2839 12.6023 15.7735C12.4287 16.1563 12.5073 16.6149 12.7988 16.9115C13.264 17.1459 13.8242 16.939 14.0502 16.4494C14.2238 16.0666 14.1452 15.608 13.8537 15.3115Z" fill="#896024"/>\n <path d="M26.5377 13.957C25.1651 13.957 23.917 15.1777 23.917 17.2053C23.917 19.2328 25.1651 20.45 26.5377 20.45C27.9103 20.45 29.1584 19.2294 29.1584 17.2053C29.1584 15.1812 27.9168 13.957 26.5377 13.957Z" fill="#422B0D"/>\n <path d="M26.4169 15.3115C25.9517 15.077 25.3916 15.2839 25.1655 15.7735C24.9919 16.1563 25.0705 16.6149 25.3621 16.9115C25.8272 17.1459 26.3874 16.939 26.6135 16.4494C26.7871 16.0666 26.7084 15.608 26.4169 15.3115Z" fill="#896024"/>\n </svg>\n '],satisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M19.7314 39.0785C10.5918 39.0785 0.731445 33.0441 0.731445 19.8029C0.731445 6.56174 10.5918 0.527344 19.7314 0.527344C24.809 0.527344 29.4935 2.28594 32.9659 5.49279C36.7332 9.00998 38.7314 13.9754 38.7314 19.8029C38.7314 25.6304 36.7332 30.5614 32.9659 34.0786C29.4935 37.2855 24.7763 39.0785 19.7314 39.0785Z" fill="#FDE030"/>\n <path d="M19.9936 26.8375C18.8209 26.8375 17.6579 26.6306 16.554 26.2168C15.1945 25.7237 13.7171 26.4858 13.2486 27.9134C12.9833 28.7202 13.0914 29.6099 13.5402 30.3202C14.9488 32.5961 17.1764 33.8374 19.9936 33.8374C22.8109 33.8374 25.0384 32.5961 26.4471 30.3202C27.2431 29.0616 26.9155 27.3616 25.7198 26.5237C25.045 26.0513 24.1998 25.9375 23.4333 26.2168C22.3293 26.6306 21.1664 26.8375 19.9936 26.8375Z" fill="#422B0D"/>\n <path d="M34.1426 9.96198C31.4531 9.16544 29.4778 11.4792 29.4778 11.4792C29.4778 11.4792 29.2485 8.8551 26.9488 8.03097C24.1905 7.03443 21.2783 8.62062 21.1047 12.7344C20.9081 17.4205 26.7981 23.5721 26.7981 23.5721C26.7981 23.5721 34.1098 21.5032 36.5045 17.117C38.4536 13.5481 36.1769 10.562 34.1426 9.96198Z" fill="#F44336"/>\n <path d="M34.142 9.96817C33.8112 9.87506 33.4705 9.83368 33.1298 9.84058C34.0929 10.5199 34.8562 11.4681 35.3312 12.5785C35.7931 13.7474 35.9143 15.2577 35.0363 17.0612C33.1331 20.9818 27.2725 23.4094 26.8467 23.5783C27.3806 23.4197 34.2141 21.3508 36.517 17.1336C38.4531 13.5543 36.1763 10.5682 34.142 9.96817Z" fill="#C62828"/>\n <path d="M29.4742 11.9051C29.4545 11.5465 29.4021 11.1879 29.3235 10.8362C29.1335 9.82239 28.5373 8.94309 27.6855 8.4224C27.1024 8.06379 26.4571 7.83621 25.7888 7.75C25.7888 7.75 26.7716 8.06379 27.4726 9.4948C27.8297 10.2465 28.0426 11.0672 28.095 11.9051C28.0917 12.212 28.1442 12.512 28.249 12.7982C28.3669 13.0844 28.6552 13.2534 28.95 13.2051C29.3988 13.0844 29.4971 12.4948 29.4742 11.9051Z" fill="#C62828"/>\n <path d="M23.1062 10.2573C23.7188 9.45727 24.7245 8.69522 25.6876 9.39866C26.1986 9.77451 26.2052 10.84 25.5795 11.3193C24.5247 12.1331 24.4755 12.6676 24.3576 13.1158C24.2134 13.6503 24.1217 14.2882 23.6598 14.5572C23.1979 14.8262 22.7917 14.5572 22.5493 13.7882C22.1365 12.5883 22.3462 11.2504 23.1062 10.2573Z" fill="#FF847A"/>\n <path d="M12.2365 7.96248C9.57977 8.86936 9.15391 11.9486 9.15391 11.9486C9.15391 11.9486 7.58149 9.87969 5.22287 10.5486C2.40891 11.3279 0.820115 14.3486 2.82822 17.8692C5.15408 21.9037 13.2913 23.576 13.2913 23.576C13.2913 23.576 18.287 17.5899 17.9725 12.5417C17.7137 8.43143 14.2446 7.27628 12.2365 7.96248Z" fill="#F44336"/>\n <path d="M12.2369 7.96249C11.9126 8.07284 11.6014 8.23146 11.3164 8.43145C12.4761 8.4349 13.6095 8.77972 14.5923 9.42799C15.5947 10.1176 16.489 11.3176 16.7118 13.3348C17.1933 17.7106 13.5899 23.1485 13.3114 23.545C13.675 23.1037 18.2711 17.3934 17.9697 12.5383C17.7142 8.43145 14.245 7.2763 12.2369 7.96249Z" fill="#C62828"/>\n <path d="M9.38005 12.3102C9.17695 12.0171 8.94764 11.7481 8.69212 11.5067C8.00419 10.7688 7.05091 10.3757 6.07143 10.4309C5.39988 10.4723 4.74143 10.655 4.13867 10.9757C4.13867 10.9757 5.12143 10.6619 6.45798 11.4481C7.15574 11.8723 7.76177 12.4412 8.2466 13.1171C8.40384 13.3757 8.60695 13.5964 8.84609 13.7722C9.09505 13.9412 9.42264 13.9102 9.64212 13.6998C9.93367 13.3274 9.70764 12.7826 9.38005 12.3102Z" fill="#C62828"/>\n <path d="M3.22072 14.6642C3.23382 14.3746 3.28296 14.0884 3.36485 13.8125C3.49916 13.2332 3.88899 12.7539 4.40985 12.5229C4.91106 12.3574 5.60554 12.4746 5.87416 13.0022C6.1133 13.4711 5.93968 14.0366 5.80865 14.5539C5.69072 15.147 5.6252 15.7539 5.61209 16.3607C5.61537 16.8573 5.23865 17.2607 4.76692 17.2676C4.32141 17.2676 3.97416 16.8607 3.7252 16.4711C3.37796 15.9401 3.20106 15.309 3.22072 14.6642Z" fill="#FF847A"/>\n </svg>\n ']},LIKE_DISLIKE:{satisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M26.4077 36.8093C23.8565 36.7886 20.0282 36.6881 16.262 36.3334C13.6693 36.088 10.991 35.7007 8.95714 34.5478C8.38363 34.2226 7.75691 34.1428 7.20114 34.0748C6.96465 34.0453 6.74293 34.0187 6.55373 33.9743C5.1111 33.6344 4.10303 32.3868 4.09712 30.9412L4.07642 21.2596C4.07347 19.9205 5.02833 18.8001 6.34975 18.5931C6.3734 18.5902 6.3941 18.5842 6.41775 18.5783C6.58034 18.5251 10.4648 17.2599 13.3915 14.9717C14.7691 13.8957 15.9486 12.2372 16.5487 10.5374C17.1459 8.84351 17.1429 6.99588 17.1399 5.51185C17.1399 4.55404 17.137 3.36268 17.3971 3.18827C18.0298 2.77144 18.7274 2.55859 19.4694 2.55859C21.7516 2.55859 24.0811 4.64273 24.1728 6.76529C24.2378 8.23749 23.7441 9.97574 23.2682 11.6549C22.7065 13.6444 22.2187 15.362 22.6592 16.5297C22.7242 16.7041 22.8898 16.8164 23.0731 16.8164C23.079 16.8164 25.2282 16.7425 25.2282 16.7425H25.2489C27.6611 16.7425 29.6241 18.7055 29.627 21.1148L29.6418 33.593C29.6418 34.4532 29.3107 35.2603 28.7017 35.8663C28.0957 36.4723 27.2886 36.8093 26.4284 36.8093H26.4077Z" fill="#FFCA29"/>\n <path d="M19.4693 3.00015C21.4972 3.00015 23.6464 4.90986 23.7292 6.78115C23.7913 8.18239 23.3094 9.88518 22.8423 11.5318C22.257 13.5952 21.7544 15.3778 22.2452 16.6815C22.3752 17.0274 22.7063 17.255 23.0759 17.255H23.1084L25.2369 17.1811H25.2546C27.4215 17.1811 29.1864 18.943 29.1893 21.1129L29.2041 33.5911C29.2041 34.3301 28.9173 35.0278 28.3941 35.5511C27.8708 36.0743 27.1761 36.364 26.4341 36.364H26.4105C23.8681 36.3433 20.0516 36.2428 16.3032 35.891C13.7608 35.6516 11.1357 35.2732 9.17573 34.1616C8.52536 33.7921 7.82178 33.7064 7.25714 33.6354C7.03247 33.6088 6.82258 33.5822 6.65703 33.5408C5.41542 33.2482 4.54629 32.178 4.54333 30.9394L4.51968 21.2577C4.51673 20.1403 5.31491 19.2032 6.41758 19.0317C6.46192 19.0258 6.50922 19.014 6.55061 18.9992C6.71615 18.946 10.6716 17.6541 13.6603 15.3187C15.1 14.1924 16.3357 12.46 16.9624 10.6834C17.5862 8.91849 17.5832 7.02947 17.5803 5.50997C17.5803 4.78866 17.5773 3.81311 17.7015 3.51748C18.2454 3.17161 18.8396 3.00015 19.4693 3.00015ZM19.4693 2.11328C18.6859 2.11328 17.8936 2.32613 17.1516 2.81686C16.1938 3.44949 17.2314 7.2571 16.1287 10.3848C15.4666 12.262 14.2043 13.7696 13.1164 14.6181C10.2193 16.8825 6.28159 18.1537 6.28159 18.1537C4.75323 18.3932 3.62986 19.7116 3.63282 21.2607L3.65647 30.9423C3.66238 32.6096 4.83009 34.0197 6.45305 34.404C7.10933 34.5578 8.00506 34.5164 8.73821 34.9332C10.6982 36.0447 13.211 36.4882 16.2204 36.772C19.9452 37.1238 23.7292 37.2272 26.4046 37.2509H26.4341C28.4532 37.2509 30.0939 35.6131 30.091 33.5911L30.0762 21.1129C30.0732 18.4493 27.9122 16.2972 25.2546 16.2972H25.2191L23.0788 16.3711C22.3398 14.4082 24.7609 9.9916 24.619 6.74272C24.5155 4.43391 22.053 2.11328 19.4693 2.11328Z" fill="#EDA600"/>\n <path d="M20.6726 19.3134C21.2284 20.7915 21.2343 23.0974 20.6726 24.5223C19.8596 26.5798 17.8701 28.3801 15.5731 28.6965C15.0114 28.7733 15.3455 29.2907 15.9042 29.2138C18.3904 28.8709 21.7546 27.8628 22.6296 25.6309C25.0301 19.4967 22.2217 16.2833 20.9682 17.2411C20.3652 17.7082 20.3592 18.4768 20.6726 19.3134Z" fill="#EDA600"/>\n <path d="M26.6325 21.5098C24.1611 21.5098 21.1902 21.0516 21.063 18.861C21.0276 18.2343 21.2168 17.7081 21.6425 17.2558C22.7629 16.0674 25.5151 15.4141 29.3937 15.4141C30.8008 15.4141 31.8266 15.5057 31.8384 15.5057C31.8503 15.5057 31.865 15.5087 31.8769 15.5087H31.9035C31.9449 15.5057 31.9833 15.5057 32.0247 15.5057C33.2811 15.5057 34.3305 16.6379 34.4163 18.0835C34.505 19.5794 33.5205 20.8565 32.2228 20.9304C32.2021 20.9304 32.1784 20.9333 32.1577 20.9392C32.1311 20.9422 29.3937 21.5098 26.6325 21.5098Z" fill="#FFCA29"/>\n <path d="M29.3959 15.8595C30.7794 15.8595 31.7904 15.9482 31.7993 15.9482C31.8259 15.9512 31.8525 15.9512 31.8791 15.9512C31.8969 15.9512 31.9146 15.9512 31.9294 15.9482C31.9619 15.9453 31.9944 15.9453 32.024 15.9453C33.0439 15.9453 33.9012 16.8942 33.9721 18.1033C34.0076 18.73 33.8302 19.3242 33.4725 19.7795C33.1385 20.2052 32.6832 20.4535 32.1954 20.483C32.1511 20.486 32.1067 20.4919 32.0654 20.5008C32.0388 20.5067 29.3397 21.0654 26.6318 21.0654C25.0591 21.0654 23.8116 20.8821 22.9277 20.5215C21.7127 20.0248 21.5324 19.3213 21.5058 18.8364C21.4762 18.3309 21.624 17.9259 21.9669 17.5593C22.9868 16.4803 25.6947 15.8595 29.3959 15.8595ZM29.3959 14.9727C26.0199 14.9727 20.4208 15.4841 20.6189 18.8896C20.7637 21.3492 23.7318 21.9552 26.6318 21.9552C29.4728 21.9552 32.2486 21.3729 32.2486 21.3729C33.7918 21.2812 34.9625 19.7972 34.859 18.056C34.7614 16.3709 33.508 15.0613 32.0269 15.0613C31.9767 15.0613 31.9294 15.0613 31.8791 15.0643C31.8791 15.0643 30.8415 14.9727 29.3959 14.9727Z" fill="#EDA600"/>\n <path d="M28.486 27.1362C25.2608 27.1362 21.4177 26.5952 21.4177 24.0114C21.4177 21.4277 25.2608 20.8867 28.486 20.8867C31.2205 20.8867 33.7126 21.2858 33.7363 21.2888C33.7599 21.2917 33.7836 21.2947 33.8072 21.2947C35.1109 21.2947 36.0185 22.6723 36.0185 23.908C36.0185 25.2117 35.0518 26.7252 33.8072 26.7252C33.7836 26.7252 33.7599 26.7282 33.7363 26.7312C33.7097 26.7371 31.2176 27.1362 28.486 27.1362Z" fill="#FFCA29"/>\n <path d="M28.4859 21.3322C31.1819 21.3322 33.6415 21.7254 33.6652 21.7283C33.7125 21.7372 33.7598 21.7401 33.8071 21.7401C34.8181 21.7401 35.5749 22.8871 35.5749 23.91C35.5749 24.9772 34.759 26.2838 33.8071 26.2838C33.7598 26.2838 33.7125 26.2868 33.6652 26.2957C33.6415 26.2986 31.179 26.6918 28.4859 26.6918C26.4668 26.6918 24.8615 26.479 23.7116 26.0562C22.0531 25.4472 21.861 24.5958 21.861 24.0105C21.861 23.4222 22.0531 22.5738 23.7116 21.9648C24.8586 21.545 26.4668 21.3322 28.4859 21.3322ZM28.4859 20.4453C24.9591 20.4453 20.9741 21.0927 20.9741 24.0135C20.9741 26.9342 24.9561 27.5816 28.4859 27.5816C31.2913 27.5816 33.8071 27.1737 33.8071 27.1737C35.3325 27.1737 36.4617 25.4265 36.4617 23.913C36.4617 22.3994 35.3325 20.8562 33.8071 20.8562C33.8071 20.8533 31.2884 20.4453 28.4859 20.4453Z" fill="#EDA600"/>\n <path d="M30.9419 36.961C29.6973 36.961 23.3917 36.8634 21.482 34.9508C21.1479 34.6167 20.9883 34.256 20.9883 33.8481C20.9942 32.2961 23.6518 31.4062 28.2783 31.4062C29.9279 31.4062 31.205 31.5245 31.2197 31.5245C31.2316 31.5245 31.2464 31.5275 31.2582 31.5275C31.9499 31.5304 32.6033 31.8113 33.091 32.3227C33.5847 32.8371 33.8537 33.5229 33.8537 34.2501C33.8478 35.743 32.6801 36.9551 31.2493 36.9551C31.2286 36.961 31.1251 36.961 30.9419 36.961Z" fill="#FFCA29"/>\n <path d="M28.2813 31.8556C29.9043 31.8556 31.1666 31.9709 31.1784 31.9739C31.205 31.9768 31.2316 31.9768 31.2582 31.9768C31.8288 31.9798 32.3668 32.2133 32.7718 32.6361C33.1857 33.0677 33.4133 33.6441 33.4104 34.2561C33.4074 35.5036 32.4378 36.5205 31.2405 36.5205H31.2375H31.2198C31.2139 36.5205 31.1134 36.5235 30.939 36.5235C25.5734 36.5235 22.6586 35.5095 21.7924 34.6433C21.4643 34.3152 21.4288 34.0373 21.4288 33.857C21.4377 32.6213 24.0599 31.8556 28.2813 31.8556ZM28.2813 30.9688C25.1123 30.9688 20.5538 31.3944 20.5479 33.8511C20.536 37.2389 29.2096 37.4074 30.9419 37.4074C31.1341 37.4074 31.2405 37.4044 31.2405 37.4044H31.2494C32.9285 37.4044 34.2913 35.9973 34.2972 34.2561C34.3031 32.5119 32.9433 31.0929 31.2612 31.087C31.2612 31.09 29.9693 30.9688 28.2813 30.9688Z" fill="#EDA600"/>\n <path d="M29.8366 32.2717C27.179 32.2717 21.0005 31.9702 21.0005 29.1765C21.0005 26.8293 25.4555 26.4805 28.1131 26.4805C30.4633 26.4805 32.4883 26.7406 32.509 26.7436C32.5268 26.7465 32.5475 26.7465 32.5652 26.7465C33.798 26.7465 35.2347 27.3555 35.2347 29.0731C35.2347 30.699 33.9635 32.1771 32.5652 32.1771H32.5297C32.5179 32.1801 31.3798 32.2717 29.8366 32.2717Z" fill="#FFCA29"/>\n <path d="M28.1135 26.0352V26.922C30.4282 26.922 32.4325 27.1792 32.4502 27.1822C32.4887 27.1881 32.5271 27.1881 32.5655 27.1881C33.6416 27.1881 34.7916 27.6818 34.7916 29.0712C34.7916 30.4399 33.7096 31.7318 32.5655 31.7318C32.5419 31.7318 32.5182 31.7318 32.4916 31.7347C32.4798 31.7347 31.3594 31.8264 29.834 31.8264C28.2228 31.8264 25.9199 31.7229 24.096 31.2381C22.337 30.7681 21.4442 30.0734 21.4442 29.1776C21.4442 28.9027 21.4442 28.0661 23.3185 27.4778C24.4862 27.1112 26.0973 26.925 28.1105 26.925L28.1135 26.0352ZM28.1135 26.0352C24.6961 26.0352 20.5574 26.5732 20.5574 29.1747C20.5574 32.2403 26.2924 32.7133 29.8369 32.7133C31.4215 32.7133 32.5655 32.6187 32.5655 32.6187C34.2328 32.6187 35.6784 30.8952 35.6784 29.0712C35.6784 27.2472 34.2328 26.3012 32.5655 26.3012C32.5655 26.3012 30.5169 26.0352 28.1135 26.0352Z" fill="#EDA600"/>\n <path d="M9.34126 34.806L7.92523 29.2188L7.33398 34.2443L9.34126 34.806Z" fill="#EDA600"/>\n </svg>\n '],dissatisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M19.3662 36.9587C18.6242 36.9587 17.9265 36.7458 17.2939 36.329C17.0337 36.1576 17.0337 34.9633 17.0367 34.0054C17.0396 32.5214 17.0426 30.6738 16.4454 28.9828C15.8453 27.283 14.6628 25.6246 13.2882 24.5485C10.3616 22.2604 6.48004 20.9951 6.31449 20.9419C6.2938 20.936 6.27015 20.9301 6.2465 20.9271C4.92507 20.7202 3.96726 19.5968 3.97317 18.2606L3.99682 8.57903C3.99978 7.13344 5.0108 5.88887 6.45344 5.54595C6.63968 5.50161 6.86435 5.475 7.10085 5.44544C7.65366 5.37744 8.28038 5.29763 8.85684 4.97244C10.8907 3.81952 13.569 3.43225 16.1616 3.18689C19.9279 2.83214 23.7562 2.73163 26.3074 2.71094C27.1942 2.71094 28.0013 3.04499 28.6073 3.65397C29.2133 4.25999 29.5474 5.07 29.5474 5.9273L29.5326 18.4055C29.5297 20.8178 27.5638 22.7777 25.1545 22.7777H25.116C25.116 22.7777 22.9757 22.7038 22.9728 22.7038C22.7895 22.7038 22.6239 22.8191 22.5589 22.9906C22.1184 24.1583 22.6062 25.8758 23.1679 27.8654C23.6438 29.5475 24.1346 31.2857 24.0725 32.755C23.9779 34.8775 21.6484 36.9587 19.3662 36.9587Z" fill="#FFCA29"/>\n <path d="M26.3309 3.1564C27.0729 3.1564 27.7676 3.44611 28.2908 3.96936C28.8141 4.49261 29.1008 5.18732 29.1008 5.92933L29.086 18.4075C29.0831 20.5744 27.3182 22.3393 25.1513 22.3393H25.1336L23.0051 22.2654H22.9726C22.606 22.2654 22.272 22.493 22.1419 22.8389C21.6512 24.1426 22.1537 25.9252 22.7391 27.9886C23.2061 29.6352 23.688 31.341 23.6259 32.7392C23.5431 34.6135 21.394 36.5203 19.366 36.5203C18.7363 36.5203 18.1421 36.3458 17.6012 36.0029C17.477 35.7073 17.4799 34.7317 17.4799 34.0104C17.4829 32.4939 17.4859 30.6049 16.8621 28.837C16.2354 27.0604 14.9997 25.3251 13.56 24.2017C10.5713 21.8663 6.61585 20.5744 6.45031 20.5212C6.40596 20.5064 6.36162 20.4976 6.31728 20.4887C5.21461 20.3143 4.41347 19.3772 4.41939 18.2597L4.44303 8.5781C4.44599 7.33944 5.31512 6.26929 6.55673 5.97663C6.72228 5.9382 6.93217 5.91159 7.15684 5.88203C7.72148 5.81108 8.42506 5.72239 9.07542 5.35582C11.0384 4.24428 13.6605 3.86884 16.2029 3.62643C19.9513 3.27169 23.7678 3.17413 26.3102 3.15344L26.3309 3.1564ZM26.3309 2.26953H26.3013C23.6289 2.29022 19.842 2.39665 16.1171 2.74844C13.1077 3.03223 10.5949 3.47862 8.63495 4.5872C7.90181 5.00403 7.00607 4.95969 6.34979 5.11637C4.72683 5.50068 3.55913 6.91079 3.55321 8.5781L3.52956 18.2627C3.52365 19.8088 4.64997 21.1302 6.17833 21.3696C6.17833 21.3696 10.116 22.6379 13.0131 24.9053C14.101 25.7537 15.3633 27.2614 16.0255 29.1386C17.1311 32.2663 16.0935 36.0739 17.0483 36.7065C17.7903 37.1972 18.5826 37.4101 19.366 37.4101C21.9497 37.4101 24.4123 35.0865 24.5128 32.7806C24.6547 29.5318 22.2335 25.1152 22.9726 23.1522L25.1129 23.2261H25.1484C27.806 23.2261 29.967 21.0711 29.97 18.4105L29.9847 5.93228C29.9907 3.90727 28.35 2.26953 26.3309 2.26953Z" fill="#EDA600"/>\n <path d="M20.5693 20.205C21.1251 18.7269 21.131 16.4211 20.5693 14.9962C19.7564 12.9386 17.7668 11.1383 15.4699 10.822C14.9082 10.7451 15.2422 10.2278 15.801 10.3046C18.2871 10.6476 21.6513 11.6556 22.5263 13.8876C24.9268 20.0217 22.1184 23.2351 20.8649 22.2773C20.2619 21.8102 20.256 21.0416 20.5693 20.205Z" fill="#EDA600"/>\n <path d="M29.2932 24.1074C25.4147 24.1074 22.6595 23.4541 21.542 22.2657C21.1134 21.8134 20.9242 21.2872 20.9626 20.6605C21.0897 18.4699 24.0637 18.0117 26.5321 18.0117C29.2932 18.0117 32.0307 18.5793 32.0573 18.5852C32.078 18.5911 32.1016 18.5941 32.1223 18.5941C33.4201 18.671 34.4045 19.948 34.3158 21.4409C34.2301 22.8865 33.1807 24.0187 31.9243 24.0187C31.8829 24.0187 31.8445 24.0187 31.8031 24.0158H31.7765C31.7646 24.0158 31.7499 24.0158 31.738 24.0187C31.7262 24.0158 30.7004 24.1074 29.2932 24.1074Z" fill="#FFCA29"/>\n <path d="M26.5286 18.4533C29.2364 18.4533 31.9355 19.012 31.9621 19.0179C32.0035 19.0268 32.0478 19.0327 32.0922 19.0356C32.5829 19.0652 33.0352 19.3135 33.3692 19.7392C33.7269 20.1945 33.9043 20.7916 33.8688 21.4154C33.7979 22.6245 32.9435 23.5734 31.9207 23.5734C31.8882 23.5734 31.8557 23.5734 31.8261 23.5705C31.8084 23.5705 31.7906 23.5675 31.7758 23.5675C31.7492 23.5675 31.7226 23.5675 31.696 23.5705C31.6872 23.5705 30.6761 23.6592 29.2926 23.6592C25.5914 23.6592 22.8835 23.0384 21.8636 21.9564C21.5207 21.5928 21.3729 21.1848 21.4025 20.6793C21.432 20.1945 21.6094 19.4909 22.8244 18.9943C23.7113 18.6366 24.9558 18.4533 26.5286 18.4533ZM26.5286 17.5664C23.6285 17.5664 20.6605 18.1754 20.5156 20.632C20.3175 24.0376 25.9166 24.549 29.2926 24.549C30.7382 24.549 31.7758 24.4544 31.7758 24.4544C31.8261 24.4573 31.8734 24.4573 31.9236 24.4573C33.4047 24.4573 34.6581 23.1507 34.7557 21.4627C34.8562 19.7215 33.6885 18.2375 32.1454 18.1458C32.1454 18.1488 29.3695 17.5664 26.5286 17.5664Z" fill="#EDA600"/>\n <path d="M28.3828 18.6323C25.1575 18.6323 21.3145 18.0913 21.3145 15.5075C21.3145 12.9268 25.1575 12.3828 28.3828 12.3828C31.1202 12.3828 33.6094 12.7819 33.633 12.7849C33.6567 12.7878 33.6803 12.7908 33.704 12.7908C34.9485 12.7908 35.9152 14.3044 35.9152 15.608C35.9152 16.8437 35.0076 18.2213 33.704 18.2213C33.6803 18.2213 33.6567 18.2243 33.633 18.2273C33.6064 18.2332 31.1173 18.6323 28.3828 18.6323Z" fill="#FFCA29"/>\n <path d="M28.3826 12.8244C31.0787 12.8244 33.5382 13.2175 33.5619 13.2205C33.6092 13.2294 33.6565 13.2323 33.7038 13.2323C34.6557 13.2323 35.4716 14.536 35.4716 15.6062C35.4716 16.632 34.7148 17.776 33.7038 17.776C33.6565 17.776 33.6092 17.779 33.5619 17.7879C33.5382 17.7908 31.0846 18.184 28.3826 18.184C26.3635 18.184 24.7583 17.9711 23.6083 17.5484C21.9499 16.9394 21.7577 16.088 21.7577 15.5027C21.7577 14.9144 21.9499 14.066 23.6083 13.457C24.7553 13.0372 26.3635 12.8244 28.3826 12.8244ZM28.3826 11.9375C24.8558 11.9375 20.8708 12.5849 20.8708 15.5057C20.8708 18.4264 24.8529 19.0738 28.3826 19.0738C31.188 19.0738 33.7038 18.6658 33.7038 18.6658C35.2292 18.6658 36.3585 17.1197 36.3585 15.6091C36.3585 14.0985 35.2292 12.3484 33.7038 12.3484C33.7038 12.3455 31.1851 11.9375 28.3826 11.9375Z" fill="#EDA600"/>\n <path d="M28.175 8.10551C23.5456 8.10551 20.8909 7.21569 20.885 5.66368C20.885 5.25572 21.0446 4.89506 21.3787 4.56101C23.2855 2.64834 29.594 2.55078 30.8386 2.55078C31.0219 2.55078 31.1283 2.55374 31.1283 2.55374C32.5798 2.55374 33.7475 3.76874 33.7534 5.25867C33.7564 5.9859 33.4844 6.67175 32.9907 7.18613C32.5 7.69755 31.8496 7.97839 31.1579 7.98135C31.146 7.98135 31.1313 7.98135 31.1194 7.98431C31.1046 7.98726 29.8216 8.10551 28.175 8.10551Z" fill="#FFCA29"/>\n <path d="M30.8386 3.00015C31.016 3.00015 31.1165 3.0031 31.1195 3.0031H31.1461C32.3345 3.0031 33.3041 4.02004 33.3071 5.26756C33.31 5.8795 33.0824 6.45596 32.6685 6.88757C32.2635 7.31031 31.7255 7.54385 31.155 7.54681C31.1284 7.54681 31.1018 7.54681 31.0751 7.54976C31.0633 7.54976 29.804 7.66801 28.1781 7.66801C23.9595 7.66801 21.3344 6.90235 21.3315 5.66961C21.3315 5.48928 21.3669 5.2114 21.6951 4.88326C22.5583 4.01117 25.4702 3.00015 30.8386 3.00015ZM30.8386 2.11328C29.1063 2.11328 20.4328 2.28179 20.4446 5.66961C20.4535 8.12622 25.0119 8.55192 28.1781 8.55192C29.8661 8.55192 31.1579 8.43071 31.1579 8.43071C32.84 8.4248 34.1999 7.00582 34.194 5.26165C34.188 3.52044 32.8252 2.11328 31.1461 2.11328H31.1372H30.8386Z" fill="#EDA600"/>\n <path d="M28.0099 13.0373C25.3552 13.0373 20.8972 12.6855 20.8972 10.3413C20.8972 7.54763 27.0757 7.24609 29.7333 7.24609C31.2794 7.24609 32.4146 7.33774 32.4265 7.33774H32.4619C33.8602 7.33774 35.1314 8.81584 35.1314 10.4418C35.1314 12.1593 33.6917 12.7683 32.4619 12.7683C32.4442 12.7683 32.4235 12.7683 32.4058 12.7713C32.3851 12.7801 30.3541 13.0373 28.0099 13.0373Z" fill="#FFCA29"/>\n <path d="M29.7339 7.69546C31.2564 7.69546 32.3797 7.7871 32.3915 7.7871C32.4152 7.79006 32.4388 7.79006 32.4654 7.79006C33.6095 7.79006 34.6915 9.08192 34.6915 10.4507C34.6915 11.8401 33.5415 12.3338 32.4654 12.3338C32.427 12.3338 32.3886 12.3367 32.3502 12.3397C32.3295 12.3426 30.3251 12.5998 28.0104 12.5998C25.9972 12.5998 24.3832 12.4136 23.2184 12.047C21.3442 11.4558 21.3442 10.6221 21.3442 10.3472C21.3442 9.44849 22.2369 8.75674 23.9959 8.2867C25.8169 7.79597 28.1228 7.69546 29.7339 7.69546ZM29.7339 6.80859C26.1894 6.80859 20.4543 7.28159 20.4543 10.3472C20.4543 12.9487 24.593 13.4867 28.0104 13.4867C30.4138 13.4867 32.4625 13.2206 32.4625 13.2206C34.1298 13.2206 35.5754 12.2746 35.5754 10.4507C35.5754 8.62667 34.1298 6.90319 32.4625 6.90319C32.4625 6.90319 31.3155 6.80859 29.7339 6.80859Z" fill="#EDA600"/>\n <path d="M9.23823 4.71484L7.8222 10.3021L7.23096 5.27652L9.23823 4.71484Z" fill="#EDA600"/>\n </svg>\n ']},RATING_1_5:{verySatisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <rect width="40" height="40" rx="20" fill="#11CE00"/>\n <path d="M17.623 20.5254L15.377 19.9883L16.1875 12.7812H24.1758V15.0566H18.502L18.1504 18.2109C18.3392 18.1003 18.6257 17.9831 19.0098 17.8594C19.3939 17.7292 19.8236 17.6641 20.2988 17.6641C20.9889 17.6641 21.6009 17.7715 22.1348 17.9863C22.6686 18.2012 23.1211 18.5137 23.4922 18.9238C23.8698 19.334 24.1562 19.8353 24.3516 20.4277C24.5469 21.0202 24.6445 21.6908 24.6445 22.4395C24.6445 23.071 24.5469 23.6732 24.3516 24.2461C24.1562 24.8125 23.86 25.3203 23.4629 25.7695C23.0658 26.2122 22.5677 26.5605 21.9688 26.8145C21.3698 27.0684 20.6602 27.1953 19.8398 27.1953C19.2279 27.1953 18.6354 27.1042 18.0625 26.9219C17.4961 26.7396 16.985 26.4694 16.5293 26.1113C16.0801 25.7533 15.7188 25.3203 15.4453 24.8125C15.1784 24.2982 15.0384 23.7122 15.0254 23.0547H17.8184C17.8574 23.4583 17.9616 23.8066 18.1309 24.0996C18.3066 24.3861 18.5378 24.6074 18.8242 24.7637C19.1107 24.9199 19.446 24.998 19.8301 24.998C20.1882 24.998 20.4941 24.9297 20.748 24.793C21.002 24.6562 21.207 24.4674 21.3633 24.2266C21.5195 23.9792 21.6335 23.6927 21.7051 23.3672C21.7832 23.0352 21.8223 22.6771 21.8223 22.293C21.8223 21.9089 21.7767 21.5605 21.6855 21.248C21.5944 20.9355 21.4544 20.6654 21.2656 20.4375C21.0768 20.2096 20.8359 20.0339 20.543 19.9102C20.2565 19.7865 19.9212 19.7246 19.5371 19.7246C19.0163 19.7246 18.6126 19.806 18.3262 19.9688C18.0462 20.1315 17.8118 20.3171 17.623 20.5254Z" fill="white"/>\n </svg>\n '],satisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M0 20C0 8.95431 8.95431 0 20 0V0C31.0457 0 40 8.95431 40 20V20C40 31.0457 31.0457 40 20 40V40C8.95431 40 0 31.0457 0 20V20Z" fill="#82DA00"/>\n <path d="M24.9375 21.6875V23.8945H14.6934L14.5566 22.1855L20.4844 12.7812H22.7207L20.2988 16.834L17.3496 21.6875H24.9375ZM23.3262 12.7812V27H20.5137V12.7812H23.3262Z" fill="white"/>\n </svg>\n '],neutral:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M0 20C0 8.95431 8.95431 0 20 0V0C31.0457 0 40 8.95431 40 20V20C40 31.0457 31.0457 40 20 40V40C8.95431 40 0 31.0457 0 20V20Z" fill="#E8C502"/>\n <path d="M17.8574 18.6699H19.3613C19.8431 18.6699 20.2402 18.5885 20.5527 18.4258C20.8652 18.2565 21.0964 18.0221 21.2461 17.7227C21.4023 17.4167 21.4805 17.0618 21.4805 16.6582C21.4805 16.2936 21.4089 15.9714 21.2656 15.6914C21.1289 15.4049 20.9173 15.1836 20.6309 15.0273C20.3444 14.8646 19.9831 14.7832 19.5469 14.7832C19.2018 14.7832 18.8828 14.8516 18.5898 14.9883C18.2969 15.125 18.0625 15.3171 17.8867 15.5645C17.7109 15.8118 17.623 16.1113 17.623 16.4629H14.8008C14.8008 15.6816 15.0091 15.0013 15.4258 14.4219C15.849 13.8424 16.4154 13.39 17.125 13.0645C17.8346 12.7389 18.6159 12.5762 19.4688 12.5762C20.4323 12.5762 21.2754 12.7324 21.998 13.0449C22.7207 13.3509 23.2839 13.8034 23.6875 14.4023C24.0911 15.0013 24.293 15.7435 24.293 16.6289C24.293 17.0781 24.1888 17.5143 23.9805 17.9375C23.7721 18.3542 23.4727 18.7318 23.082 19.0703C22.6979 19.4023 22.2292 19.6693 21.6758 19.8711C21.1224 20.0664 20.5007 20.1641 19.8105 20.1641H17.8574V18.6699ZM17.8574 20.8086V19.3535H19.8105C20.5853 19.3535 21.2656 19.4414 21.8516 19.6172C22.4375 19.793 22.929 20.0469 23.3262 20.3789C23.7233 20.7044 24.0228 21.0918 24.2246 21.541C24.4264 21.9837 24.5273 22.4753 24.5273 23.0156C24.5273 23.6797 24.4004 24.2721 24.1465 24.793C23.8926 25.3073 23.5345 25.7435 23.0723 26.1016C22.6165 26.4596 22.0827 26.7331 21.4707 26.9219C20.8587 27.1042 20.1914 27.1953 19.4688 27.1953C18.8698 27.1953 18.2806 27.1139 17.7012 26.9512C17.1283 26.7819 16.6074 26.5312 16.1387 26.1992C15.6764 25.8607 15.3053 25.4375 15.0254 24.9297C14.752 24.4154 14.6152 23.8066 14.6152 23.1035H17.4375C17.4375 23.4681 17.5286 23.7936 17.7109 24.0801C17.8932 24.3665 18.1439 24.5911 18.4629 24.7539C18.7884 24.9167 19.1497 24.998 19.5469 24.998C19.9961 24.998 20.3802 24.9167 20.6992 24.7539C21.0247 24.5846 21.2721 24.3503 21.4414 24.0508C21.6172 23.7448 21.7051 23.39 21.7051 22.9863C21.7051 22.4655 21.6107 22.0488 21.4219 21.7363C21.2331 21.4173 20.9629 21.1829 20.6113 21.0332C20.2598 20.8835 19.8431 20.8086 19.3613 20.8086H17.8574Z" fill="white"/>\n </svg>\n '],dissatisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <rect width="40" height="40" rx="20" fill="#FA9600"/>\n <path d="M24.7031 24.8027V27H14.9766V25.125L19.5762 20.1934C20.0384 19.679 20.403 19.2266 20.6699 18.8359C20.9368 18.4388 21.1289 18.084 21.2461 17.7715C21.3698 17.4525 21.4316 17.1497 21.4316 16.8633C21.4316 16.4336 21.36 16.0658 21.2168 15.7598C21.0736 15.4473 20.862 15.2064 20.582 15.0371C20.3086 14.8678 19.9701 14.7832 19.5664 14.7832C19.1367 14.7832 18.7656 14.8874 18.4531 15.0957C18.1471 15.304 17.9128 15.5938 17.75 15.9648C17.5938 16.3359 17.5156 16.7559 17.5156 17.2246H14.6934C14.6934 16.3783 14.8952 15.6035 15.2988 14.9004C15.7025 14.1908 16.2721 13.6276 17.0078 13.2109C17.7435 12.7878 18.6159 12.5762 19.625 12.5762C20.6211 12.5762 21.4609 12.7389 22.1445 13.0645C22.8346 13.3835 23.3555 13.8457 23.707 14.4512C24.0651 15.0501 24.2441 15.7663 24.2441 16.5996C24.2441 17.0684 24.1693 17.5273 24.0195 17.9766C23.8698 18.4193 23.6549 18.862 23.375 19.3047C23.1016 19.7409 22.7695 20.1836 22.3789 20.6328C21.9883 21.082 21.5553 21.5475 21.0801 22.0293L18.6094 24.8027H24.7031Z" fill="white"/>\n </svg>\n '],veryDissatisfied:['\n <svg viewBox="0 0 40 40" fill="none">\n <path d="M0 20C0 8.95431 8.95431 0 20 0V0C31.0457 0 40 8.95431 40 20V20C40 31.0457 31.0457 40 20 40V40C8.95431 40 0 31.0457 0 20V20Z" fill="#FF2115"/>\n <path d="M21.832 12.752V27H19.0195V15.9941L15.6406 17.0684V14.8516L21.5293 12.752H21.832Z" fill="white"/>\n </svg>\n ']}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const copyIcons=['\n <svg width="16" height="18" viewBox="0 0 16 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3 0H10C11.6569 0 13 1.34315 13 3V12C13 13.6569 11.6569 15 10 15H3C1.34315 15 0 13.6569 0 12V3C0 1.34314 1.34315 0 3 0ZM3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H10C10.5523 13 11 12.5523 11 12V3C11 2.44772 10.5523 2 10 2H3Z" fill="currentColor"/>\n <path d="M3 15C3 16.6569 4.34315 18 6 18H13C14.6569 18 16 16.6569 16 15V6C16 4.34315 14.6569 3 13 3V5C13.5523 5 14 5.44772 14 6V15C14 15.5523 13.5523 16 13 16H6C5.44772 16 5 15.5523 5 15H3Z" fill="currentColor"/>\n </svg>\n ','\n <svg width="17" height="18" viewBox="0 0 17 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.8 1H2.2C1.53726 1 1 1.53726 1 2.2V12.8C1 13.4627 1.53726 14 2.2 14H10.8C11.4627 14 12 13.4627 12 12.8V2.2C12 1.53726 11.4627 1 10.8 1ZM2.2 0C0.984974 0 0 0.984973 0 2.2V12.8C0 14.015 0.984973 15 2.2 15H10.8C12.015 15 13 14.015 13 12.8V2.2C13 0.984974 12.015 0 10.8 0H2.2Z" fill="currentColor"/>\n <path d="M4 15V15.8C4 16.4627 4.53726 17 5.2 17H13.8C14.4627 17 15 16.4627 15 15.8V5.2C15 4.53726 14.4627 4 13.8 4H12.9492V3H13.8C15.015 3 16 3.98497 16 5.2V15.8C16 17.015 15.015 18 13.8 18H5.2C3.98497 18 3 17.015 3 15.8V15H4Z" fill="currentColor"/>\n </svg>\n ','\n <svg width="17" height="18" viewBox="0 0 17 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M2.2 0C0.984974 0 0 0.984973 0 2.2V12.8C0 14.015 0.984973 15 2.2 15H10.8C12.015 15 13 14.015 13 12.8V2.2C13 0.984974 12.015 0 10.8 0H2.2Z" fill="currentColor"/>\n <path d="M4 15V15.8C4 16.4627 4.53726 17 5.2 17H13.8C14.4627 17 15 16.4627 15 15.8V5.2C15 4.53726 14.4627 4 13.8 4H12.9492V3H13.8C15.015 3 16 3.98497 16 5.2V15.8C16 17.015 15.015 18 13.8 18H5.2C3.98497 18 3 17.015 3 15.8V15H4Z" fill="currentColor"/>\n </svg>\n ','\n <svg width="17" height="18" viewBox="0 0 17 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 2C0 0.89543 0.895431 0 2 0H11C12.1046 0 13 0.895431 13 2V13C13 14.1046 12.1046 15 11 15H2C0.89543 15 0 14.1046 0 13V2Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3 16C3 17.1046 3.89543 18 5 18H14C15.1046 18 16 17.1046 16 16V5C16 3.89543 15.1046 3 14 3V13C14 14.6569 12.6569 16 11 16H3ZM3 15V5C3 3.89543 3.89543 3 5 3H13V13C13 14.1046 12.1046 15 11 15H3Z" fill="currentColor"/>\n </svg>\n '];export default copyIcons;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const strokeIcons=['\n <svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24">\n <path d="M7.9,9.5L0,3.8c1.2-1.6,3.4-2,5.1-0.9l8.5,6l3.1-2.2c-1.2-2-0.6-4.6,1.3-5.9c2-1.4,4.8-0.9,6.2,1.1 c1.4,2,0.9,4.8-1.1,6.3c-1.4,1-3.1,1.1-4.6,0.3l-3.8,2.7l3.8,2.7c1.4-0.7,3.2-0.6,4.6,0.3c2,1.4,2.5,4.2,1.1,6.3 c-1.4,2-4.2,2.5-6.2,1.1c-1.9-1.4-2.5-3.9-1.3-5.9l-4-2.7H7.4l3-1.7L7.9,9.5z M22.8,17.9c0-1.3-1-2.3-2.3-2.3c-1.3,0-2.3,1-2.3,2.3 c0,1.3,1,2.3,2.3,2.3C21.8,20.2,22.8,19.2,22.8,17.9z M22.8,4.5c0-1.3-1-2.3-2.3-2.3c-1.3,0-2.3,1-2.3,2.3s1,2.3,2.3,2.3 C21.8,6.8,22.8,5.8,22.8,4.5z" fill="currentColor"/>\n </svg>\n ','\n <svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none">\n <path d="M10.5278 12.0003L0.0870176 20.5846C0.0276258 20.6336 0.021828 20.72 0.0784574 20.7716C0.735083 21.3673 4.70771 24.1658 13.7643 14.862L15.2546 16.1708C15.0272 16.728 14.9013 17.3393 14.9013 17.9815C14.9013 20.571 16.9449 22.667 19.47 22.667C21.9952 22.667 24.0391 20.571 24.0391 17.9815C24.0391 15.392 21.9952 13.2961 19.47 13.2961C18.5938 13.2961 17.7758 13.5487 17.0811 13.9867L14.8192 12.0003L17.0811 10.0137C17.7761 10.4516 18.5941 10.7043 19.47 10.7043C21.9952 10.7043 24.0391 8.60803 24.0391 6.01913C24.0391 3.43022 21.9952 1.33366 19.47 1.33366C16.9449 1.33366 14.9013 3.42965 14.9013 6.01913C14.9013 6.66132 15.0272 7.27265 15.2546 7.82986L13.764 9.13947C4.70771 -0.164618 0.735083 2.63335 0.0784574 3.22909C0.021828 3.28093 0.0276258 3.36677 0.0870176 3.41606L10.5278 12.0003ZM19.47 15.7884C20.6518 15.7886 21.6087 16.7696 21.6087 17.9815C21.6087 19.1934 20.6518 20.1747 19.47 20.1747C18.2885 20.1747 17.3317 19.1934 17.3317 17.9815C17.3317 16.7696 18.2885 15.7884 19.47 15.7884ZM19.47 3.82625C20.6518 3.82625 21.6087 4.80725 21.6087 6.01913C21.6087 7.231 20.6518 8.21229 19.47 8.21229C18.2885 8.21229 17.3317 7.231 17.3317 6.01913C17.3317 4.80725 18.2885 3.82625 19.47 3.82625Z" fill="currentColor"/>\n </svg>\n '];export default strokeIcons;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const createObservers=(...e)=>{let r=e.reduce((e,r)=>Object.assign(Object.assign({},e),{[r]:[]}),{});return{get:e=>r[e],clear:()=>createObservers(...e)}};export default createObservers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const observerType={PROPS:"props",SHARED:"shared",ENVIRONMENT:"environment"};export default observerType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function createSubscriptions(){return new class{constructor(){this.subscriptions=[]}push(s){this.subscriptions.push(s)}off(){this.subscriptions.forEach(s=>null==s?void 0:s.off())}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PLATFORMS={DESKTOP:"desktop",MOBILE:"mobile"};export const PRIMARY_PLATFORM=PLATFORMS.MOBILE;
|