vviinn-widgets 2.22.0 → 2.22.2
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/dist/cjs/highlight-box_22.cjs.entry.js +2 -1
- package/dist/cjs/{package-ed8d3d75.js → package-8a334970.js} +1 -1
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
- package/dist/collection/filters/parseFilters.js +2 -1
- package/dist/esm/highlight-box_22.entry.js +2 -1
- package/dist/esm/{package-f7dbfcbb.js → package-e5b8c7da.js} +1 -1
- package/dist/esm/vviinn-carousel_3.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +1 -1
- package/dist/vviinn-widgets/{p-b2deb9ee.entry.js → p-06f95934.entry.js} +1 -1
- package/dist/vviinn-widgets/p-1f0e1f36.entry.js +1 -0
- package/{www/build/p-29cafef6.entry.js → dist/vviinn-widgets/p-22b5e568.entry.js} +1 -1
- package/dist/vviinn-widgets/p-5d8fcf51.js +1 -0
- package/dist/vviinn-widgets/{p-6a9c61fb.entry.js → p-72ceedfc.entry.js} +1 -1
- package/{www/build/p-07f9596f.entry.js → dist/vviinn-widgets/p-bd5ff73d.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-b2deb9ee.entry.js → p-06f95934.entry.js} +1 -1
- package/www/build/p-1f0e1f36.entry.js +1 -0
- package/{dist/vviinn-widgets/p-29cafef6.entry.js → www/build/p-22b5e568.entry.js} +1 -1
- package/www/build/{p-36566668.js → p-2cae34e6.js} +2 -2
- package/www/build/p-5d8fcf51.js +1 -0
- package/www/build/{p-6a9c61fb.entry.js → p-72ceedfc.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-07f9596f.entry.js → www/build/p-bd5ff73d.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/vviinn-widgets/p-758d5fcd.entry.js +0 -1
- package/dist/vviinn-widgets/p-ff00ff4d.js +0 -1
- package/www/build/p-758d5fcd.entry.js +0 -1
- package/www/build/p-ff00ff4d.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,c as s,g as n}from"./p-fa17e81f.js";import{O as o,o as r,i as a,a as l,t as h,q as c,r as d,u as p,v as g,w as v,x as m,y as u,z as b,B as x,E as f,C as y,D as w,F as k,G as z,N as C}from"./p-d41891f6.js";import{p as _,q as j,u as F}from"./p-3b99c62d.js";import{i as L}from"./p-2e76a5c3.js";import{s as W}from"./p-53eacbe3.js";import{c as D}from"./p-badde98c.js";import{O as E,c as M,d as S,A as T}from"./p-60ea7665.js";const I=class{constructor(i){t(this,i)}getInsetValue(){return _(r(a.searchArea,a.imageBounds),o.map((([t,i])=>{return`inset(${(e=t,s=i,n={top:`${e.y}px`,right:s.width-(e.x+e.width)+"px",bottom:s.height-(e.y+e.height)+"px",left:`${e.x}px`}).top} ${n.right} ${n.bottom} ${n.left})`;var e,s,n})),o.getOrElse((()=>"")))}renderImage(){return _(r(a.imageUrl,a.imageBounds),o.map((([t,e])=>i("img",{src:t,width:e.width,height:e.height,style:{"clip-path":`${this.getInsetValue()}`}}))),o.getOrElse((()=>"")))}render(){return i(e,null,this.renderImage())}};I.style=':host{display:grid;position:absolute;box-sizing:border-box;border:none;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--size:10px;--x-position:0;--y-position:0}img{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pointer{position:absolute;width:var(--size);height:var(--size);background:black;border-radius:50%;z-index:2;cursor:pointer;transform:translate(var(--x-position), var(--y-position)) scale(0);animation:0.25s linear fadein;animation-fill-mode:forwards}.pointer::after{content:"";cursor:pointer;border:5px solid black;border-radius:50%;width:var(--size);height:var(--size);display:block;transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));padding:calc(var(--size) * 0.5);opacity:.75}@keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}';const B=class{constructor(i){t(this,i),this.vviinnImageCrop=s(this,"vviinnImageCrop",7),this.mouseStartPoint=void 0,this.bounds=void 0,this.resizeObserver=new ResizeObserver((()=>{this.bounds=this.el.getBoundingClientRect()})),this.disabled=!1,this.basicEventData=void 0,this.handleMove=!1}componentDidLoad(){this.resizeObserver.observe(this.el)}disconnectedCallback(){this.resizeObserver.disconnect()}handleHandlerMove(t){t.preventDefault(),t.stopPropagation();const i=F(t),e={position:j.concat(i,this.mouseStartPoint),direction:this.handlerMoveDirection};l.pipe(a.searchArea,o.map((t=>{const s=h(t,e);this.outOfBounds(s)||(a.searchArea=o.some(s),this.mouseStartPoint=i,a.detectedObject=void 0)})))}outOfBounds(t){return t.width<40||t.height<40||t.x<0||t.y<0||this.bounds.height-(t.y+t.height)<0||this.bounds.width-(t.x+t.width)<0}handleCropperMove(t){t.preventDefault(),t.stopPropagation();const i=F(t),e=j.concat(i,this.mouseStartPoint);l.pipe(a.searchArea,o.map((t=>{const s=c(t,e);s.x<0||s.y<0||this.bounds.height-(s.y+s.height)<0||this.bounds.width-(s.x+s.width)<0||(a.detectedObject=void 0,a.searchArea=o.some(s),this.mouseStartPoint=i)})))}handlePointerDown(t){t.stopPropagation(),this.mouseStartPoint=F(t);const i=t.target;"cropper-handler"===i.localName?(this.handlerMoveDirection=i.handler.direction,this.pointerMoveListener=this.handleHandlerMove.bind(this)):this.pointerMoveListener=this.handleCropperMove.bind(this),this.pointerReleaseListener=this.handleSearchAreaRelease.bind(this),this.el.addEventListener("pointermove",this.pointerMoveListener),window.addEventListener("pointerup",this.pointerReleaseListener,{once:!0})}handleSearchAreaRelease(){this.el.removeEventListener("pointermove",this.pointerMoveListener),document.removeEventListener("pointerup",this.pointerReleaseListener),this.mouseStartPoint=void 0,d(),this.vviinnImageCrop.emit(this.basicEventData)}getStyleMap(){return l.pipe(a.searchArea,o.map((t=>({width:`${t.width}px`,height:`${t.height}px`,transform:`translate3d(${t.x}px, ${t.y}px, 0)`,cursor:this.handleMove?"move":"default"}))),o.getOrElse((()=>({}))))}render(){return i(e,{exportparts:"handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize"},i("div",{class:{"crop-area":!0,active:this.handleMove,disabled:this.disabled},draggable:!1,style:this.getStyleMap(),onContextMenu:()=>!1,onPointerDown:t=>this.handlePointerDown(t)},a.cropperHandlers.map((t=>i("cropper-handler",{disabled:this.disabled,handler:t,onPointerDown:t=>this.handlePointerDown(t)})))))}get el(){return n(this)}};B.style=":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";const A=(t,i)=>{if(!t)return"";const e={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,s]=t.split("%3A");e[i]=s})),"categories"===i?e.product_type:e[i]},G=class{constructor(i){t(this,i),this.vviinnSelectFilter=s(this,"vviinnSelectFilter",7),this.filterType=this.filter.name,this.filter=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){a.activeIonLink=t,this.selectedFilter=A(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",filterName:t.name}))}clearSelectedFilter(t){a.activeIonLink=t.clear,this.selectedFilter=A(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect"}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return"categories"===this.filterType?this.selectedFilter===A(t,"categories"):this.selectedFilter===t.name}render(){if(!this.filter)return null;const{name:t,filters:s}=this.filter;return i(e,{exportparts:"filter, show-more-filters"},i("div",{class:{filters:!0,"no-scrollbar-mobile":"categories"===this.filterType,"no-scrollbar":"categories"!==this.filterType}},s.filter(((t,i)=>!this.hideFilters||i<5)).map(((e,s)=>{const n="categories"===t?this.selectedFilter===A(e,"categories"):this.selectedFilter===e.name;return i("div",{role:"button",tabindex:"0",key:s,part:n?"filter active":"filter",class:{filter:!0,active:n},style:{"animation-delay":10*s+"ms"},onPointerUp:t=>{a.loading||(t.stopPropagation(),this.handleFilterSelection(e))},onKeyPress:t=>{a.loading||this.handleEnter(t,e)}},e.name)})),this.hideFilters&&i("div",{class:{"show-more":!0,hidden:s.length<=5,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>{setTimeout((()=>this.toggleFilters()),300)},onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"})))}get el(){return n(this)}};G.style=".filters{display:flex;flex-direction:row;overflow-x:auto;padding-left:24px;padding-right:12px;margin-bottom:12px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";const O=class{constructor(i){t(this,i),this.vviinnSelectObject=s(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return l.pipe(a.imageBounds,o.map((t=>{const i=p(g(this.detectedObject).rectangle),{x:e,y:s}=l.pipe(i,v(t),m);return[`${e}px`,`${s}px`]})),o.getOrElse((()=>["0","0"])))}selectDetectedObject(){l.pipe(a.imageBounds,o.map((t=>{const i=g(this.detectedObject).rectangle,e=p(i),s=v(t)(e);a.detectedObject=this.detectedObject,a.searchArea=o.some(s)}))),d(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!a.detectedObject)return!1;const t=g(this.detectedObject),i=g(a.detectedObject);return u.equals(t,i)}render(){return i(e,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};O.style=':host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:"";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}';const $=class{constructor(i){t(this,i)}render(){return i(e,null,i("vviinn-error",null,i("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),i("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),i("h4",{slot:"title"},L.t("emptyResultsBlock.title")),i("span",{slot:"text"},L.t("emptyResultsBlock.text"))))}};$.style=":host{display:grid}vviinn-error{justify-items:center}";const P=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=s(this,"vviinnImageUploadFinished",7),this.src="",this.width=0,this.height=0,this.basicEventData=void 0,this.selected=!1}async selectImage(){this.selected=!0,this.vviinnImageUpload.emit(this.basicEventData);const t=await b(this.src),i=await x(t);l.pipe(i,f.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),this.selected=!1}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}showPreloader(){return(a.objectDetectionInProgress||a.loading)&&this.selected}render(){return i(e,{onClick:()=>this.selectImage(),onKeyUp:t=>this.handleKeyPress(t)},this.showPreloader()?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("img",{src:this.src,width:this.width,height:this.height,tabindex:1}))}};P.style=":host{display:block;margin-bottom:8px;position:relative}:host(:focus){border:2px solid var(--color-primary)}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";const U=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=s(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.exampleImagesTitle=void 0}componentWillLoad(){W(this,this.el)}delegateFocus(){this.imagesBlock.childNodes[0].childNodes[0].focus()}render(){return i(e,{onFocus:()=>this.delegateFocus()},i("slot",{name:"vviinn-example-images-title"},i("h3",null,this.exampleImagesTitle)),i("div",{class:"images",ref:t=>this.imagesBlock=t},i("slot",{name:"vviinn-example-images-1"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-2"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-3"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-4"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=",basicEventData:this.basicEventData}))))}get el(){return n(this)}};U.style="h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}.images{display:block;-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px}";const R=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=s(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.startUpload=void 0,this.resetVpsButton=void 0}async handleInputChange(t){this.vviinnImageUpload.emit(this.basicEventData);const i=t.target,e=await x(i.files[0]);l.pipe(e,y((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),i.value=null}isLoading(){return a.loading}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return i(e,{exportparts:"button"},this.isLoading()?i("vviinn-preloader",null):null,this.isLoading()?null:i("label",{htmlFor:"fileInput",part:"button"},i("slot",{name:"upload-button-text"},"Upload image")),i("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image/*",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};R.style=":host{display:block}:host(::hover){background:whitesmoke}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}label{cursor:pointer;display:grid;width:100%;height:100%;transition:background 0.1s ease-in-out}";const V=class{constructor(i){t(this,i),this.basicEventData=void 0}handleInitialImageLoad(t){const i=w(t.target),{x:e,y:s}=c(i,{x:12,y:12}),n={x:e,y:s,width:i.width-24,height:i.height-24};a.imageBounds=o.some(i),a.searchArea=o.some(n)}renderDetectedObject(t){return i("vviinn-detected-object",{detectedObject:t,basicEventData:this.basicEventData})}renderImage(){return l.pipe(r(a.imageUrl,a.image),o.map((([t,e])=>{const[s,n]=(t=>{const i=k(t),e=z(288)(i).map((t=>t.size));return[e[0],e[1]]})(e);return i("img",{decoding:"async",width:s,height:n,src:t,onLoad:t=>this.handleInitialImageLoad(t),draggable:!1})})),o.getOrElse((()=>null)))}renderCropper(){return l.pipe(a.imageUrl,o.map((()=>i("image-cropper",{basicEventData:this.basicEventData}))),o.getOrElse((()=>null)))}render(){return i(e,null,a.loading||a.objectDetectionInProgress?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("highlight-box",null),this.renderImage(),this.renderCropper(),a.detectedObjects.map((t=>this.renderDetectedObject(t))))}};V.style=":host{display:grid;position:relative;justify-self:center;direction:ltr}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:18px;padding:4px 6px;pointer-events:none;position:absolute;right:18px;z-index:4}vviinn-preloader{--preloader-size:12px}";const K=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.secondaryActionClicked=s(this,"secondaryActionClicked",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.widgetVersion=void 0,this.hideBackButton=!1,this.slider=!1}componentWillLoad(){W(this,this.el)}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:D.VPS,widgetId:this.buttonElementId,widgetVersion:this.widgetVersion})}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}renderImage(){return l.pipe(r(a.imageUrl,a.image),o.map((([t])=>i("img",{width:"32",height:"32",src:t,class:"title-image"}))),o.getOrElse((()=>null)))}render(){return i(e,{exportparts:"secondary-action, title, close-button",class:{closed:!this.active},onAnimationEnd:t=>this.handleAnimationEnd(t)},i("div",{class:"head"},!this.hideBackButton&&i("button",{part:"secondary-action",onClick:()=>{this.resetState(),this.secondaryActionClicked.emit()}},i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M20.25 12H3.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M10.5 5.25L3.75 12L10.5 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{class:"title",part:"title"},this.renderImage(),i("slot",{name:"vviinn-image-search-modal-title"},L.t("imageSearchModalTitle"))),i("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z",fill:"currentColor"})))),i("div",{class:"body"},i("slot",null)))}get el(){return n(this)}};K.style=":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 768px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{display:flex;align-items:center;border-bottom:1px solid #f4f4f4;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:4px;color:#c6c6c6}button:hover{color:#000}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";const H=class{constructor(i){t(this,i)}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",{name:"vviinn-onboarding-title"},i("h3",null,L.t("onboardingBlock.onboardingTitleText"))),i("vviinn-slider",{showArrows:!0},i("vviinn-slide",null,i("vviinn-onboarding-card-1",{cardTitle:L.t("onboardingBlock.onboardingCard1.title"),cardText:L.t("onboardingBlock.onboardingCard1.text")})),i("vviinn-slide",null,i("vviinn-onboarding-card-2",{cardTitle:L.t("onboardingBlock.onboardingCard2.title"),cardText:L.t("onboardingBlock.onboardingCard2.text")})),i("vviinn-slide",null,i("vviinn-onboarding-card-3",{cardTitle:L.t("onboardingBlock.onboardingCard3.title"),cardText:L.t("onboardingBlock.onboardingCard3.text")}))))}get el(){return n(this)}};H.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}::host{display:block}h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}vviinn-slide{background:#f4f4f4;padding:24px}svg{padding:16px 0}.text{display:grid;grid-gap:8px}.text>h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}.text>p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}";const N=class{constructor(i){t(this,i),this.cardTitle=void 0,this.cardText=void 0}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-1-icon"},i(E,null)),i("slot",{name:"onboarding-card-1-text"},i("div",{class:"text"},i("h4",null,this.cardTitle),i("p",null,this.cardText))))}get el(){return n(this)}};N.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Y=class{constructor(i){t(this,i),this.cardTitle=void 0,this.cardText=void 0}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-2-icon"},i(M,null)),i("slot",{name:"onboarding-card-2-text"},i("div",{class:"text"},i("h4",null,this.cardTitle),i("p",null,this.cardText))))}get el(){return n(this)}};Y.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Z=class{constructor(i){t(this,i),this.cardTitle=void 0,this.cardText=void 0}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-3-icon"},i(S,null)),i("slot",{name:"onboarding-card-3-text"},i("div",{class:"text"},i("h4",null,this.cardTitle),i("p",null,this.cardText))))}get el(){return n(this)}};Z.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const q=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};q.style=":host{animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";const X=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.hideBackButton=!1,this.widgetVersion=void 0}render(){return i(e,{class:{active:this.active}},i("vviinn-overlay",null,i("vviinn-modal",{resetState:this.resetState,active:this.active,buttonElementId:this.buttonElementId,hideBackButton:this.hideBackButton,widgetVersion:this.widgetVersion},i("slot",null,"CONTENT"))))}};X.style=":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}vviinn-modal{margin-left:24px;margin-right:24px}@media (max-width: 768px){vviinn-modal{border-radius:4px 4px 0 0;height:100vh;margin-top:32px;transform:translateY(100%);width:100vw;margin-left:0;margin-right:0}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";const Q=class{constructor(i){t(this,i),this.privacyBadgeText=void 0}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",null,i("div",{class:"content"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},i("defs",null),i("path",{fill:"#525252",d:"M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z"}),i("path",{fill:"#525252",d:"M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z"})),i("slot",{name:"vviinn-privacy-badge-text"},i("p",null,this.privacyBadgeText)))))}get el(){return n(this)}};Q.style=":host{display:block;background:#F4F4F4;padding:17px}.content{display:grid;grid-template-columns:min-content auto;grid-gap:9px}.content p{color:#525252;font-size:12px;line-height:16px;margin:unset}";const J=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Keine Verbindung"),i("span",{slot:"text"},"Etwas hat leider nicht funktioniert. Bitte prüfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."),i("button",{slot:"action",onClick:this.handler},"Erneut versuchen")))}};J.style=":host{display:block}";const tt=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};tt.style=":host{display:grid;justify-items:center}";const it=({kind:t,tabindex:e,disabled:s,onClick:n,onKeyDown:o})=>{return i("div",{class:(r={kind:t,disabled:s},{"arrow-wrapper":!0,[r.kind]:!0,disabled:r.disabled}),onClick:n,tabindex:e,onKeyDown:o},i(T,null));var r},et=class{constructor(i){t(this,i),this.elementsCount=0,this.internalPosition=0,this.swipeStartPosition=o.none,this.isRTL=!1,this.showBullets=!0,this.position=0,this.showArrows=!1}positionWatchHandler(t){this.internalPosition=t,this.el.style.setProperty("--position",`${this.calculatePosition(t)}`),this.setActiveCssClassToSlide(t)}componentWillLoad(){this.isRTL="rtl"===document.dir}connectedCallback(){this.handleDomContentChanges()}handleDomContentChanges(){const t=this.el.querySelectorAll("vviinn-slide");this.elementsCount=t.length,this.el.style.setProperty("--num-items",`${this.elementsCount}`),this.setActiveCssClassToSlide(0)}setActiveCssClassToSlide(t){const i=this.el.querySelectorAll("vviinn-slide");i.forEach((t=>t.classList.remove("active"))),i[t].classList.add("active")}goToSlide(t){this.internalPosition=t,this.el.style.setProperty("--position",`${t}`),this.setActiveCssClassToSlide(t)}renderBullets(){return this.showBullets?i("div",{class:"controls"},C.range(0,this.elementsCount-1).map((t=>i("div",{class:{bullet:!0,active:t==Math.abs(this.internalPosition)%this.elementsCount},onClick:()=>this.goToSlide(t)})))):null}nextSlide(){this.internalPosition++,this.renderSlidePosition()}prevSlide(){const t=this.internalPosition-1;this.internalPosition=t>-1?t:this.elementsCount-1,this.renderSlidePosition()}renderSlidePosition(){const t=this.internalPosition%this.elementsCount;requestAnimationFrame((()=>{this.el.style.setProperty("--position",`${this.calculatePosition(t)}`)}))}calculatePosition(t){return this.isRTL?-1*t:t}handleKeyDown(t){if("Space"===t.key||"Enter"===t.key)switch(t.target.className.includes("prev")?"prev":"next"){case"prev":this.prevSlide();break;case"next":this.nextSlide()}}handleTouchStart(t){this.showBullets&&(this.swipeStartPosition=l.pipe(t.touches[0],o.fromNullable,o.map((t=>t.clientX))))}handleTouchEnd(t){if(!this.showBullets)return;const i=l.pipe(t.changedTouches[0],o.fromNullable,o.map((t=>t.clientX)));l.pipe(r(this.swipeStartPosition,i),o.map((([t,i])=>{return(e=t)<(s=i)?-1:e>s?1:0;var e,s})),o.map((t=>{switch(t){case 1:return this.nextSlide();case-1:return this.prevSlide()}})))}render(){return i(e,null,i("div",{class:"items-wrapper"},i("div",{class:"items",onTouchStart:t=>this.handleTouchStart(t),onTouchEnd:t=>this.handleTouchEnd(t)},i("slot",null))),this.showArrows?[i(it,{kind:"prev",onClick:()=>this.isRTL?this.nextSlide():this.prevSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:1,disabled:!1}),i(it,{kind:"next",onClick:()=>this.isRTL?this.prevSlide():this.nextSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:0,disabled:!1})]:null,this.renderBullets())}get el(){return n(this)}static get watchers(){return{position:["positionWatchHandler"]}}};et.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#e0e0e0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#c6c6c6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;cursor:pointer;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#a8a8a8}.arrow-wrapper:hover>svg{fill:#8d8d8d}";const st=class{constructor(i){t(this,i)}componentWillLoad(){W(this,this.el)}render(){return i(e,null,i("slot",null,i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none"},i("defs",null),i("path",{fill:"#C6C6C6",d:"M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z"}),i("path",{fill:"#C6C6C6",d:"M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z"})),i("span",{class:"vviinn-teaser-text"},i("slot",{name:"vviinn-teaser-text"},L.t("teaserText_1"),i("br",null),L.t("teaserText_2")))))}get el(){return n(this)}};st.style=":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";const nt=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Dateityp wird nicht unterstützt"),i("span",{slot:"text"},"Leider unterstützen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),i("button",{slot:"action",onClick:this.handler},"Neues Bild hochladen")))}};nt.style=":host{display:block}";export{I as highlight_box,B as image_cropper,G as search_filters,O as vviinn_detected_object,$ as vviinn_empty_results,P as vviinn_example_image,U as vviinn_example_images,R as vviinn_image_selector,V as vviinn_image_view,K as vviinn_modal,H as vviinn_onboarding,N as vviinn_onboarding_card_1,Y as vviinn_onboarding_card_2,Z as vviinn_onboarding_card_3,q as vviinn_overlay,X as vviinn_overlayed_modal,Q as vviinn_privacy_badge,J as vviinn_server_error,tt as vviinn_slide,et as vviinn_slider,st as vviinn_teaser,nt as vviinn_wrong_format}
|
package/www/build/p-ff00ff4d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const o="2.22.0";export{o as v}
|