legalesign-document-viewer 0.3.3 → 0.3.4
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/ls-document-options_40.cjs.entry.js +167 -173
- package/dist/cjs/ls-document-options_40.cjs.entry.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/editorUtils.js +8 -3
- package/dist/collection/components/ls-document-viewer/editorUtils.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +10 -3
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-document-viewer.js +71 -136
- package/dist/components/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-editor-field.js +1 -1
- package/dist/components/ls-field-content.js +1 -1
- package/dist/components/ls-field-distribute.js +1 -1
- package/dist/components/ls-field-properties-date.js +1 -1
- package/dist/components/ls-field-properties-dropdown.js +1 -1
- package/dist/components/ls-field-properties-email.js +1 -1
- package/dist/components/ls-field-properties-file.js +1 -1
- package/dist/components/ls-field-properties-general.js +1 -1
- package/dist/components/ls-field-properties-image.js +1 -1
- package/dist/components/ls-field-properties-multiple.js +1 -1
- package/dist/components/ls-field-properties-number.js +1 -1
- package/dist/components/ls-field-properties-signature.js +1 -1
- package/dist/components/ls-field-properties-text.js +1 -1
- package/dist/components/ls-field-properties.js +1 -1
- package/dist/components/ls-statusbar.js +1 -1
- package/dist/components/{p-C4dJ_NrC.js → p-1wdCYLqw.js} +3 -3
- package/dist/components/{p-C4dJ_NrC.js.map → p-1wdCYLqw.js.map} +1 -1
- package/dist/components/{p-tfo7xItm.js → p-B0uVP8it.js} +3 -3
- package/dist/components/{p-tfo7xItm.js.map → p-B0uVP8it.js.map} +1 -1
- package/dist/components/{p-DE2r5IdM.js → p-BBuk6A32.js} +3 -3
- package/dist/components/{p-DE2r5IdM.js.map → p-BBuk6A32.js.map} +1 -1
- package/dist/components/{p-Ovur85Of.js → p-BMpnAxqv.js} +114 -55
- package/dist/components/p-BMpnAxqv.js.map +1 -0
- package/dist/components/{p-C45TaVTh.js → p-BOKGHQS9.js} +3 -3
- package/dist/components/{p-C45TaVTh.js.map → p-BOKGHQS9.js.map} +1 -1
- package/dist/components/{p-CCE9t160.js → p-BOz4DYOB.js} +3 -3
- package/dist/components/{p-CCE9t160.js.map → p-BOz4DYOB.js.map} +1 -1
- package/dist/components/{p-DY8RJZmx.js → p-C0t7MuwE.js} +3 -3
- package/dist/components/{p-DY8RJZmx.js.map → p-C0t7MuwE.js.map} +1 -1
- package/dist/components/{p-Da83lhqi.js → p-CktqjOO6.js} +3 -3
- package/dist/components/{p-Da83lhqi.js.map → p-CktqjOO6.js.map} +1 -1
- package/dist/components/{p-CZkgAbFI.js → p-CpYbd6qt.js} +3 -3
- package/dist/components/{p-CZkgAbFI.js.map → p-CpYbd6qt.js.map} +1 -1
- package/dist/components/{p-23iaNjGp.js → p-CvqT5MA7.js} +3 -3
- package/dist/components/{p-23iaNjGp.js.map → p-CvqT5MA7.js.map} +1 -1
- package/dist/components/{p-BKNIuWRw.js → p-DDWmD8TQ.js} +3 -3
- package/dist/components/{p-BKNIuWRw.js.map → p-DDWmD8TQ.js.map} +1 -1
- package/dist/components/{p-gEso0FtC.js → p-JFkSKN19.js} +3 -3
- package/dist/components/{p-gEso0FtC.js.map → p-JFkSKN19.js.map} +1 -1
- package/dist/components/{p-CHN41h9u.js → p-bNVYQ-ag.js} +3 -3
- package/dist/components/{p-CHN41h9u.js.map → p-bNVYQ-ag.js.map} +1 -1
- package/dist/components/{p-B-K24bnx.js → p-hUeqWmAs.js} +13 -13
- package/dist/components/{p-B-K24bnx.js.map → p-hUeqWmAs.js.map} +1 -1
- package/dist/components/{p-DqW1sDWy.js → p-ji6hTzlP.js} +3 -3
- package/dist/components/{p-DqW1sDWy.js.map → p-ji6hTzlP.js.map} +1 -1
- package/dist/esm/ls-document-options_40.entry.js +167 -173
- package/dist/esm/ls-document-options_40.entry.js.map +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/{p-e45016a5.entry.js → p-5c27684b.entry.js} +3 -3
- package/dist/ls-document-viewer/p-5c27684b.entry.js.map +1 -0
- package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-Ovur85Of.js.map +0 -1
- package/dist/ls-document-viewer/p-e45016a5.entry.js.map +0 -1
|
@@ -40,8 +40,8 @@ import{r as registerInstance,c as createEvent,a as getElement,h,H as Host}from".
|
|
|
40
40
|
*
|
|
41
41
|
* @licend The above is the entire license notice for the
|
|
42
42
|
* Javascript code in this page
|
|
43
|
-
*/var pdf_viewer=pdf_viewer$1.exports;var hasRequiredPdf_viewer;function requirePdf_viewer(){if(hasRequiredPdf_viewer)return pdf_viewer$1.exports;hasRequiredPdf_viewer=1;(function(e,t){(function t(r,i){e.exports=i()})(pdf_viewer,(function(){return function(e){var t={};function r(i){if(t[i]){return t[i].exports}var o=t[i]={i,l:false,exports:{}};e[i].call(o.exports,o,o.exports,r);o.l=true;return o.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var o in e)r.d(i,o,function(t){return e[t]}.bind(null,o));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=0)}([function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:true,get:function(){return i.AnnotationLayerBuilder}});Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:true,get:function(){return i.DefaultAnnotationLayerFactory}});Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:true,get:function(){return o.DefaultTextLayerFactory}});Object.defineProperty(t,"TextLayerBuilder",{enumerable:true,get:function(){return o.TextLayerBuilder}});Object.defineProperty(t,"EventBus",{enumerable:true,get:function(){return n.EventBus}});Object.defineProperty(t,"NullL10n",{enumerable:true,get:function(){return n.NullL10n}});Object.defineProperty(t,"ProgressBar",{enumerable:true,get:function(){return n.ProgressBar}});Object.defineProperty(t,"PDFLinkService",{enumerable:true,get:function(){return s.PDFLinkService}});Object.defineProperty(t,"SimpleLinkService",{enumerable:true,get:function(){return s.SimpleLinkService}});Object.defineProperty(t,"DownloadManager",{enumerable:true,get:function(){return l.DownloadManager}});Object.defineProperty(t,"GenericL10n",{enumerable:true,get:function(){return a.GenericL10n}});Object.defineProperty(t,"PDFFindController",{enumerable:true,get:function(){return d.PDFFindController}});Object.defineProperty(t,"PDFHistory",{enumerable:true,get:function(){return c.PDFHistory}});Object.defineProperty(t,"PDFPageView",{enumerable:true,get:function(){return h.PDFPageView}});Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:true,get:function(){return u.PDFSinglePageViewer}});Object.defineProperty(t,"PDFViewer",{enumerable:true,get:function(){return f.PDFViewer}});var i=r(1);var o=r(5);var n=r(3);var s=r(4);var l=r(6);var a=r(8);var d=r(10);var c=r(12);var h=r(13);var u=r(15);var f=r(17)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var i=r(2);var o=r(3);var n=r(4);class s{constructor({pageDiv:e,pdfPage:t,linkService:r,downloadManager:i,imageResourcesPath:n="",renderInteractiveForms:s=false,l10n:l=o.NullL10n}){this.pageDiv=e;this.pdfPage=t;this.linkService=r;this.downloadManager=i;this.imageResourcesPath=n;this.renderInteractiveForms=s;this.l10n=l;this.div=null;this._cancelled=false}render(e,t="display"){this.pdfPage.getAnnotations({intent:t}).then((t=>{if(this._cancelled){return}const r={viewport:e.clone({dontFlip:true}),div:this.div,annotations:t,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div){i.AnnotationLayer.update(r)}else{if(t.length===0){return}this.div=document.createElement("div");this.div.className="annotationLayer";this.pageDiv.appendChild(this.div);r.div=this.div;i.AnnotationLayer.render(r);this.l10n.translate(this.div)}}))}cancel(){this._cancelled=true}hide(){if(!this.div){return}this.div.setAttribute("hidden","true")}}t.AnnotationLayerBuilder=s;class l{createAnnotationLayerBuilder(e,t,r="",i=false,l=o.NullL10n){return new s({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:i,linkService:new n.SimpleLinkService,l10n:l})}}t.DefaultAnnotationLayerFactory=l},function(e,t,r){let i;if(typeof window!=="undefined"&&window["pdfjs-dist/build/pdf"]){i=window["pdfjs-dist/build/pdf"]}else{i=requirePdf()}e.exports=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.isValidRotation=P;t.isValidScrollMode=_;t.isValidSpreadMode=j;t.isPortraitOrientation=E;t.clamp=N;t.getPDFFileNameFromURL=T;t.noContextMenuHandler=S;t.parseQueryString=k;t.backtrackBeforeAllVisibleElements=A;t.getVisibleElements=Z;t.roundToDivide=H;t.getPageSizeInches=V;t.approximateFraction=L;t.getOutputScale=b;t.scrollIntoView=y;t.watchScroll=x;t.binarySearchFirstItem=M;t.normalizeWheelEventDelta=B;t.waitOnEventOrTimeout=D;t.moveToEndOfArray=$;t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;const i=96/72;t.CSS_UNITS=i;const o="auto";t.DEFAULT_SCALE_VALUE=o;const n=1;t.DEFAULT_SCALE=n;const s=.1;t.MIN_SCALE=s;const l=10;t.MAX_SCALE=l;const a=0;t.UNKNOWN_SCALE=a;const d=1.25;t.MAX_AUTO_SCALE=d;const c=40;t.SCROLLBAR_PADDING=c;const h=5;t.VERTICAL_PADDING=h;const u={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.PresentationModeState=u;const f={CANVAS:"canvas",SVG:"svg"};t.RendererType=f;const p={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};t.TextLayerMode=p;const g={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=g;const v={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=v;const C=/\bprint\s*\(/;t.AutoPrintRegExp=C;function m(e,t){if(!t){return e}return e.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,r)=>r in t?t[r]:"{{"+r+"}}"))}const w={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e,t,r){return m(r,t)},async translate(e){}};t.NullL10n=w;function b(e){const t=window.devicePixelRatio||1;const r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;const i=t/r;return{sx:i,sy:i,scaled:i!==1}}function y(e,t,r=false){let i=e.offsetParent;if(!i){console.error("offsetParent is not set -- cannot scroll");return}let o=e.offsetTop+e.clientTop;let n=e.offsetLeft+e.clientLeft;while(i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||r&&getComputedStyle(i).overflow==="hidden"){if(i.dataset._scaleY){o/=i.dataset._scaleY;n/=i.dataset._scaleX}o+=i.offsetTop;n+=i.offsetLeft;i=i.offsetParent;if(!i){return}}if(t){if(t.top!==undefined){o+=t.top}if(t.left!==undefined){n+=t.left;i.scrollLeft=n}}i.scrollTop=o}function x(e,t){const r=function(r){if(o){return}o=window.requestAnimationFrame((function r(){o=null;const n=e.scrollLeft;const s=i.lastX;if(n!==s){i.right=n>s}i.lastX=n;const l=e.scrollTop;const a=i.lastY;if(l!==a){i.down=l>a}i.lastY=l;t(i)}))};const i={right:true,down:true,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r};let o=null;e.addEventListener("scroll",r,true);return i}function k(e){const t=e.split("&");const r=Object.create(null);for(let e=0,i=t.length;e<i;++e){const i=t[e].split("=");const o=i[0].toLowerCase();const n=i.length>1?i[1]:null;r[decodeURIComponent(o)]=decodeURIComponent(n)}return r}function M(e,t){let r=0;let i=e.length-1;if(i<0||!t(e[i])){return e.length}if(t(e[r])){return r}while(r<i){const o=r+i>>1;const n=e[o];if(t(n)){i=o}else{r=o+1}}return r}function L(e){if(Math.floor(e)===e){return[e,1]}const t=1/e;const r=8;if(t>r){return[1,r]}else if(Math.floor(t)===t){return[1,t]}const i=e>1?t:e;let o=0,n=1,s=1,l=1;while(true){const e=o+s,t=n+l;if(t>r){break}if(i<=e/t){s=e;l=t}else{o=e;n=t}}let a;if(i-o/n<s/l-i){a=i===e?[o,n]:[n,o]}else{a=i===e?[s,l]:[l,s]}return a}function H(e,t){const r=e%t;return r===0?e:Math.round(e-r+t)}function V({view:e,userUnit:t,rotate:r}){const[i,o,n,s]=e;const l=r%180!==0;const a=(n-i)/72*t;const d=(s-o)/72*t;return{width:l?d:a,height:l?a:d}}function A(e,t,r){if(e<2){return e}let i=t[e].div;let o=i.offsetTop+i.clientTop;if(o>=r){i=t[e-1].div;o=i.offsetTop+i.clientTop}for(let r=e-2;r>=0;--r){i=t[r].div;if(i.offsetTop+i.clientTop+i.clientHeight<=o){break}e=r}return e}function Z(e,t,r=false,i=false){const o=e.scrollTop,n=o+e.clientHeight;const s=e.scrollLeft,l=s+e.clientWidth;function a(e){const t=e.div;const r=t.offsetTop+t.clientTop+t.clientHeight;return r>o}function d(e){const t=e.div;const r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>s}const c=[],h=t.length;let u=h===0?0:M(t,i?d:a);if(u>0&&u<h&&!i){u=A(u,t,o)}let f=i?l:-1;for(let e=u;e<h;e++){const r=t[e],a=r.div;const d=a.offsetLeft+a.clientLeft;const h=a.offsetTop+a.clientTop;const u=a.clientWidth,p=a.clientHeight;const g=d+u;const v=h+p;if(f===-1){if(v>=n){f=v}}else if((i?d:h)>f){break}if(v<=o||h>=n||g<=s||d>=l){continue}const C=Math.max(0,o-h)+Math.max(0,v-n);const m=Math.max(0,s-d)+Math.max(0,g-l);const w=(p-C)*(u-m)*100/p/u|0;c.push({id:r.id,x:d,y:h,view:r,percent:w})}const p=c[0],g=c[c.length-1];if(r){c.sort((function(e,t){const r=e.percent-t.percent;if(Math.abs(r)>.001){return-r}return e.id-t.id}))}return{first:p,last:g,views:c}}function S(e){e.preventDefault()}function O(e){let t=0;const r=e.length;while(t<r&&e[t].trim()===""){t++}return e.substring(t,t+5).toLowerCase()==="data:"}function T(e,t="document.pdf"){if(typeof e!=="string"){return t}if(O(e)){console.warn("getPDFFileNameFromURL: "+'ignoring "data:" URL for performance reasons.');return t}const r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/;const i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i;const o=r.exec(e);let n=i.exec(o[1])||i.exec(o[2])||i.exec(o[3]);if(n){n=n[0];if(n.includes("%")){try{n=i.exec(decodeURIComponent(n))[0]}catch(e){}}}return n||t}function B(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const r=Math.atan2(e.deltaY,e.deltaX);if(-.25*Math.PI<r&&r<.75*Math.PI){t=-t}const i=0;const o=1;const n=30;const s=30;if(e.deltaMode===i){t/=n*s}else if(e.deltaMode===o){t/=s}return t}function P(e){return Number.isInteger(e)&&e%90===0}function _(e){return Number.isInteger(e)&&Object.values(g).includes(e)&&e!==g.UNKNOWN}function j(e){return Number.isInteger(e)&&Object.values(v).includes(e)&&e!==v.UNKNOWN}function E(e){return e.width<=e.height}const R={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=R;function D({target:e,name:t,delay:r=0}){return new Promise((function(i,o){if(typeof e!=="object"||!(t&&typeof t==="string")||!(Number.isInteger(r)&&r>=0)){throw new Error("waitOnEventOrTimeout - invalid parameters.")}function n(r){if(e instanceof F){e._off(t,s)}else{e.removeEventListener(t,s)}if(a){clearTimeout(a)}i(r)}const s=n.bind(null,R.EVENT);if(e instanceof F){e._on(t,s)}else{e.addEventListener(t,s)}const l=n.bind(null,R.TIMEOUT);const a=setTimeout(l,r)}))}const I=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=I;class F{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:true})}off(e,t){this._off(e,t,{external:true})}dispatch(e){const t=this._listeners[e];if(!t||t.length===0){return}const r=Array.prototype.slice.call(arguments,1);let i;t.slice(0).forEach((function({listener:e,external:t}){if(t){if(!i){i=[]}i.push(e);return}e.apply(null,r)}));if(i){i.forEach((function(e){e.apply(null,r)}));i=null}}_on(e,t,r=null){let i=this._listeners[e];if(!i){this._listeners[e]=i=[]}i.push({listener:t,external:(r&&r.external)===true})}_off(e,t,r=null){const i=this._listeners[e];if(!i){return}for(let e=0,r=i.length;e<r;e++){if(i[e].listener===t){i.splice(e,1);return}}}}t.EventBus=F;function N(e,t,r){return Math.min(Math.max(e,t),r)}class z{constructor(e,{height:t,width:r,units:i}={}){this.visible=true;this.div=document.querySelector(e+" .progress");this.bar=this.div.parentNode;this.height=t||100;this.width=r||100;this.units=i||"%";this.div.style.height=this.height+this.units;this.percent=0}_updateBar(){if(this._indeterminate){this.div.classList.add("indeterminate");this.div.style.width=this.width+this.units;return}this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e);this._percent=N(e,0,100);this._updateBar()}setWidth(e){if(!e){return}const t=e.parentNode;const r=t.offsetWidth-e.offsetWidth;if(r>0){this.bar.style.width=`calc(100% - ${r}px)`}}hide(){if(!this.visible){return}this.visible=false;this.bar.classList.add("hidden");document.body.classList.remove("loadingInProgress")}show(){if(this.visible){return}this.visible=true;document.body.classList.add("loadingInProgress");this.bar.classList.remove("hidden")}}t.ProgressBar=z;function $(e,t){const r=[],i=e.length;let o=0;for(let n=0;n<i;++n){if(t(e[n])){r.push(e[n])}else{e[o]=e[n];++o}}for(let t=0;o<i;++t,++o){e[o]=r[t]}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.SimpleLinkService=t.PDFLinkService=void 0;var i=r(3);class o{constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:r=null,externalLinkEnabled:i=true,ignoreDestinationZoom:o=false}={}){this.eventBus=e;this.externalLinkTarget=t;this.externalLinkRel=r;this.externalLinkEnabled=i;this._ignoreDestinationZoom=o;this.baseUrl=null;this.pdfDocument=null;this.pdfViewer=null;this.pdfHistory=null;this._pagesRefCache=null}setDocument(e,t=null){this.baseUrl=t;this.pdfDocument=e;this._pagesRefCache=Object.create(null)}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}navigateTo(e){const t=({namedDest:r,explicitDest:i})=>{const o=i[0];let n;if(o instanceof Object){n=this._cachedPageNumber(o);if(n===null){this.pdfDocument.getPageIndex(o).then((e=>{this.cachePageRef(e+1,o);t({namedDest:r,explicitDest:i})})).catch((()=>{console.error(`PDFLinkService.navigateTo: "${o}" is not `+`a valid page reference, for dest="${e}".`)}));return}}else if(Number.isInteger(o)){n=o+1}else{console.error(`PDFLinkService.navigateTo: "${o}" is not `+`a valid destination reference, for dest="${e}".`);return}if(!n||n<1||n>this.pagesCount){console.error(`PDFLinkService.navigateTo: "${n}" is not `+`a valid page number, for dest="${e}".`);return}if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.push({namedDest:r,explicitDest:i,pageNumber:n})}this.pdfViewer.scrollPageIntoView({pageNumber:n,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom})};new Promise(((t,r)=>{if(typeof e==="string"){this.pdfDocument.getDestination(e).then((r=>{t({namedDest:e,explicitDest:r})}));return}t({namedDest:"",explicitDest:e})})).then((r=>{if(!Array.isArray(r.explicitDest)){console.error(`PDFLinkService.navigateTo: "${r.explicitDest}" is`+` not a valid destination array, for dest="${e}".`);return}t(r)}))}getDestinationHash(e){if(typeof e==="string"){return this.getAnchorUrl("#"+escape(e))}if(Array.isArray(e)){const t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(e){let t,r;if(e.includes("=")){const o=(0,i.parseQueryString)(e);if("search"in o){this.eventBus.dispatch("findfromurlhash",{source:this,query:o.search.replace(/"/g,""),phraseSearch:o.phrase==="true"})}if("page"in o){t=o.page|0||1}if("zoom"in o){const e=o.zoom.split(",");const t=e[0];const i=parseFloat(t);if(!t.includes("Fit")){r=[null,{name:"XYZ"},e.length>1?e[1]|0:null,e.length>2?e[2]|0:null,i?i/100:t]}else{if(t==="Fit"||t==="FitB"){r=[null,{name:t}]}else if(t==="FitH"||t==="FitBH"||t==="FitV"||t==="FitBV"){r=[null,{name:t},e.length>1?e[1]|0:null]}else if(t==="FitR"){if(e.length!==5){console.error('PDFLinkService.setHash: Not enough parameters for "FitR".')}else{r=[null,{name:t},e[1]|0,e[2]|0,e[3]|0,e[4]|0]}}else{console.error(`PDFLinkService.setHash: "${t}" is not `+"a valid zoom value.")}}}if(r){this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:r,allowNegativeOffset:true})}else if(t){this.page=t}if("pagemode"in o){this.eventBus.dispatch("pagemode",{source:this,mode:o.pagemode})}if("nameddest"in o){this.navigateTo(o.nameddest)}}else{r=unescape(e);try{r=JSON.parse(r);if(!Array.isArray(r)){r=r.toString()}}catch(e){}if(typeof r==="string"||n(r)){this.navigateTo(r);return}console.error(`PDFLinkService.setHash: "${unescape(e)}" is not `+"a valid destination.")}}executeNamedAction(e){switch(e){case"GoBack":if(this.pdfHistory){this.pdfHistory.back()}break;case"GoForward":if(this.pdfHistory){this.pdfHistory.forward()}break;case"NextPage":if(this.page<this.pagesCount){this.page++}break;case"PrevPage":if(this.page>1){this.page--}break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break}this.eventBus.dispatch("namedaction",{source:this,action:e})}cachePageRef(e,t){if(!t){return}const r=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;this._pagesRefCache[r]=e}_cachedPageNumber(e){const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return this._pagesRefCache&&this._pagesRefCache[t]||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}}t.PDFLinkService=o;function n(e){if(!Array.isArray(e)){return false}const t=e.length;if(t<2){return false}const r=e[0];if(!(typeof r==="object"&&Number.isInteger(r.num)&&Number.isInteger(r.gen))&&!(Number.isInteger(r)&&r>=0)){return false}const i=e[1];if(!(typeof i==="object"&&typeof i.name==="string")){return false}let o=true;switch(i.name){case"XYZ":if(t!==5){return false}break;case"Fit":case"FitB":return t===2;case"FitH":case"FitBH":case"FitV":case"FitBV":if(t!==3){return false}break;case"FitR":if(t!==6){return false}o=false;break;default:return false}for(let r=2;r<t;r++){const t=e[r];if(!(typeof t==="number"||o&&t===null)){return false}}return true}class s{constructor(){this.externalLinkTarget=null;this.externalLinkRel=null;this.externalLinkEnabled=true;this._ignoreDestinationZoom=false}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}navigateTo(e){}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}cachePageRef(e,t){}isPageVisible(e){return true}}t.SimpleLinkService=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DefaultTextLayerFactory=t.TextLayerBuilder=void 0;var i=r(2);const o=300;class n{constructor({textLayerDiv:e,eventBus:t,pageIndex:r,viewport:i,findController:o=null,enhanceTextSelection:n=false}){this.textLayerDiv=e;this.eventBus=t;this.textContent=null;this.textContentItemsStr=[];this.textContentStream=null;this.renderingDone=false;this.pageIdx=r;this.pageNumber=this.pageIdx+1;this.matches=[];this.viewport=i;this.textDivs=[];this.findController=o;this.textLayerRenderTask=null;this.enhanceTextSelection=n;this._onUpdateTextLayerMatches=null;this._bindMouse()}_finishRendering(){this.renderingDone=true;if(!this.enhanceTextSelection){const e=document.createElement("div");e.className="endOfContent";this.textLayerDiv.appendChild(e)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(e=0){if(!(this.textContent||this.textContentStream)||this.renderingDone){return}this.cancel();this.textDivs=[];const t=document.createDocumentFragment();this.textLayerRenderTask=(0,i.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:t,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:e,enhanceTextSelection:this.enhanceTextSelection});this.textLayerRenderTask.promise.then((()=>{this.textLayerDiv.appendChild(t);this._finishRendering();this._updateMatches()}),(function(e){}));if(!this._onUpdateTextLayerMatches){this._onUpdateTextLayerMatches=e=>{if(e.pageIndex===this.pageIdx||e.pageIndex===-1){this._updateMatches()}};this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)}}cancel(){if(this.textLayerRenderTask){this.textLayerRenderTask.cancel();this.textLayerRenderTask=null}if(this._onUpdateTextLayerMatches){this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches);this._onUpdateTextLayerMatches=null}}setTextContentStream(e){this.cancel();this.textContentStream=e}setTextContent(e){this.cancel();this.textContent=e}_convertMatches(e,t){if(!e){return[]}const{findController:r,textContentItemsStr:i}=this;let o=0,n=0;const s=i.length-1;const l=r.state.query.length;const a=[];for(let r=0,d=e.length;r<d;r++){let d=e[r];while(o!==s&&d>=n+i[o].length){n+=i[o].length;o++}if(o===i.length){console.error("Could not find a matching mapping")}const c={begin:{divIdx:o,offset:d-n}};if(t){d+=t[r]}else{d+=l}while(o!==s&&d>n+i[o].length){n+=i[o].length;o++}c.end={divIdx:o,offset:d-n};a.push(c)}return a}_renderMatches(e){if(e.length===0){return}const{findController:t,pageIdx:r,textContentItemsStr:i,textDivs:o}=this;const n=r===t.selected.pageIdx;const s=t.selected.matchIdx;const l=t.state.highlightAll;let a=null;const d={offset:undefined};function c(e,t){const r=e.divIdx;o[r].textContent="";h(r,0,e.offset,t)}function h(e,t,r,n){const s=o[e];const l=i[e].substring(t,r);const a=document.createTextNode(l);if(n){const e=document.createElement("span");e.className=n;e.appendChild(a);s.appendChild(e);return}s.appendChild(a)}let u=s,f=u+1;if(l){u=0;f=e.length}else if(!n){return}for(let i=u;i<f;i++){const l=e[i];const u=l.begin;const f=l.end;const p=n&&i===s;const g=p?" selected":"";if(p){t.scrollMatchIntoView({element:o[u.divIdx],pageIndex:r,matchIndex:s})}if(!a||u.divIdx!==a.divIdx){if(a!==null){h(a.divIdx,a.offset,d.offset)}c(u)}else{h(a.divIdx,a.offset,u.offset)}if(u.divIdx===f.divIdx){h(u.divIdx,u.offset,f.offset,"highlight"+g)}else{h(u.divIdx,u.offset,d.offset,"highlight begin"+g);for(let e=u.divIdx+1,t=f.divIdx;e<t;e++){o[e].className="highlight middle"+g}c(f,"highlight end"+g)}a=f}if(a){h(a.divIdx,a.offset,d.offset)}}_updateMatches(){if(!this.renderingDone){return}const{findController:e,matches:t,pageIdx:r,textContentItemsStr:i,textDivs:o}=this;let n=-1;for(let e=0,r=t.length;e<r;e++){const r=t[e];const s=Math.max(n,r.begin.divIdx);for(let e=s,t=r.end.divIdx;e<=t;e++){const t=o[e];t.textContent=i[e];t.className=""}n=r.end.divIdx+1}if(!e||!e.highlightMatches){return}const s=e.pageMatches[r]||null;const l=e.pageMatchesLength[r]||null;this.matches=this._convertMatches(s,l);this._renderMatches(this.matches)}_bindMouse(){const e=this.textLayerDiv;let t=null;e.addEventListener("mousedown",(r=>{if(this.enhanceTextSelection&&this.textLayerRenderTask){this.textLayerRenderTask.expandTextDivs(true);if(t){clearTimeout(t);t=null}return}const i=e.querySelector(".endOfContent");if(!i){return}let o=r.target!==e;o=o&&window.getComputedStyle(i).getPropertyValue("-moz-user-select")!=="none";if(o){const t=e.getBoundingClientRect();const o=Math.max(0,(r.pageY-t.top)/t.height);i.style.top=(o*100).toFixed(2)+"%"}i.classList.add("active")}));e.addEventListener("mouseup",(()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask){t=setTimeout((()=>{if(this.textLayerRenderTask){this.textLayerRenderTask.expandTextDivs(false)}t=null}),o);return}const r=e.querySelector(".endOfContent");if(!r){return}r.style.top="";r.classList.remove("active")}))}}t.TextLayerBuilder=n;class s{createTextLayerBuilder(e,t,r,i=false,o){return new n({textLayerDiv:e,pageIndex:t,viewport:r,enhanceTextSelection:i,eventBus:o})}}t.DefaultTextLayerFactory=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DownloadManager=void 0;var i=r(2);var o=r(7);const n=o.viewerCompatibilityParams.disableCreateObjectURL||false;function s(e,t){const r=document.createElement("a");if(!r.click){throw new Error('DownloadManager: "a.click()" is not supported.')}r.href=e;r.target="_parent";if("download"in r){r.download=t}(document.body||document.documentElement).appendChild(r);r.click();r.remove()}class l{constructor({disableCreateObjectURL:e=n}){this.disableCreateObjectURL=e}downloadUrl(e,t){if(!(0,i.createValidAbsoluteUrl)(e,"http://example.com")){return}s(e+"#pdfjs.action=download",t)}downloadData(e,t,r){if(navigator.msSaveBlob){navigator.msSaveBlob(new Blob([e],{type:r}),t);return}const o=(0,i.createObjectURL)(e,r,this.disableCreateObjectURL);s(o,t)}download(e,t,r){if(navigator.msSaveBlob){if(!navigator.msSaveBlob(e,r)){this.downloadUrl(t,r)}return}if(this.disableCreateObjectURL){this.downloadUrl(t,r);return}const i=URL.createObjectURL(e);s(i,r)}}t.DownloadManager=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.viewerCompatibilityParams=void 0;const i=Object.create(null);{const e=typeof navigator!=="undefined"&&navigator.userAgent||"";const t=typeof navigator!=="undefined"&&navigator.platform||"";const r=typeof navigator!=="undefined"&&navigator.maxTouchPoints||1;const o=/Android/.test(e);const n=/Trident/.test(e);const s=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||t==="MacIntel"&&r>1;const l=/CriOS/.test(e);(function e(){if(n||l){i.disableCreateObjectURL=true}})();(function e(){if(s||o){i.maxCanvasPixels=5242880}})()}const o=Object.freeze(i);t.viewerCompatibilityParams=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.GenericL10n=void 0;r(9);const i=document.webL10n;class o{constructor(e){this._lang=e;this._ready=new Promise(((t,r)=>{i.setLanguage(e,(()=>{t(i)}))}))}async getLanguage(){const e=await this._ready;return e.getLanguage()}async getDirection(){const e=await this._ready;return e.getDirection()}async get(e,t,r){const i=await this._ready;return i.get(e,t,r)}async translate(e){const t=await this._ready;return t.translate(e)}}t.GenericL10n=o},function(e,t,r){document.webL10n=function(e,t,r){var i={};var o="";var n="textContent";var s="";var l={};var a="loading";var d=true;function c(){return t.querySelectorAll('link[type="application/l10n"]')}function h(){var e=t.querySelector('script[type="application/l10n"]');return e?JSON.parse(e.innerHTML):null}function u(e){return e?e.querySelectorAll("*[data-l10n-id]"):[]}function f(e){if(!e)return{};var t=e.getAttribute("data-l10n-id");var r=e.getAttribute("data-l10n-args");var i={};if(r){try{i=JSON.parse(r)}catch(e){console.warn("could not parse arguments for #"+t)}}return{id:t,args:i}}function p(e,t,r){t=t||function e(t){};r=r||function e(){};var i=new XMLHttpRequest;i.open("GET",e,d);if(i.overrideMimeType){i.overrideMimeType("text/plain; charset=utf-8")}i.onreadystatechange=function(){if(i.readyState==4){if(i.status==200||i.status===0){t(i.responseText)}else{r()}}};i.onerror=r;i.ontimeout=r;try{i.send(null)}catch(e){r()}}function g(e,t,r,s){var l=e.replace(/[^\/]*$/,"")||"./";function a(e){if(e.lastIndexOf("\\")<0)return e;return e.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function d(e,r){var i={};var o=/^\s*|\s*$/;var n=/^\s*#|^\s*$/;var s=/^\s*\[(.*)\]\s*$/;var d=/^\s*@import\s+url\((.*)\)\s*$/i;var c=/^([^=\s]*)\s*=\s*(.+)$/;function h(e,r,h){var f=e.replace(o,"").split(/[\r\n]+/);var p="*";var g=t.split("-",1)[0];var v=false;var C="";function m(){while(true){if(!f.length){h();return}var e=f.shift();if(n.test(e))continue;if(r){C=s.exec(e);if(C){p=C[1].toLowerCase();v=p!=="*"&&p!==t&&p!==g;continue}else if(v){continue}C=d.exec(e);if(C){u(l+C[1],m);return}}var o=e.match(c);if(o&&o.length==3){i[o[1]]=a(o[2])}}}m()}function u(e,t){p(e,(function(e){h(e,false,t)}),(function(){console.warn(e+" not found.");t()}))}h(e,true,(function(){r(i)}))}p(e,(function(e){o+=e;d(e,(function(e){for(var t in e){var o,s,l=t.lastIndexOf(".");if(l>0){o=t.substring(0,l);s=t.substring(l+1)}else{o=t;s=n}if(!i[o]){i[o]={}}i[o][s]=e[t]}if(r){r()}}))}),s)}function v(e,t){if(e){e=e.toLowerCase()}t=t||function e(){};C();s=e;var r=c();var o=r.length;if(o===0){var n=h();if(n&&n.locales&&n.default_locale){console.log("using the embedded JSON directory, early way out");i=n.locales[e];if(!i){var l=n.default_locale.toLowerCase();for(var d in n.locales){d=d.toLowerCase();if(d===e){i=n.locales[e];break}else if(d===l){i=n.locales[l]}}}t()}else{console.log("no resource to load, early way out")}a="complete";return}var u=null;var f=0;u=function(){f++;if(f>=o){t();a="complete"}};function p(e){var t=e.href;this.load=function(e,r){g(t,e,r,(function(){console.warn(t+" not found.");console.warn('"'+e+'" resource not found');s="";r()}))}}for(var v=0;v<o;v++){var m=new p(r[v]);m.load(e,u)}}function C(){i={};o="";s=""}function m(e){var t={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function r(e,t){return t.indexOf(e)!==-1}function i(e,t,r){return t<=e&&e<=r}var o={0:function(e){return"other"},1:function(e){if(i(e%100,3,10))return"few";if(e===0)return"zero";if(i(e%100,11,99))return"many";if(e==2)return"two";if(e==1)return"one";return"other"},2:function(e){if(e!==0&&e%10===0)return"many";if(e==2)return"two";if(e==1)return"one";return"other"},3:function(e){if(e==1)return"one";return"other"},4:function(e){if(i(e,0,1))return"one";return"other"},5:function(e){if(i(e,0,2)&&e!=2)return"one";return"other"},6:function(e){if(e===0)return"zero";if(e%10==1&&e%100!=11)return"one";return"other"},7:function(e){if(e==2)return"two";if(e==1)return"one";return"other"},8:function(e){if(i(e,3,6))return"few";if(i(e,7,10))return"many";if(e==2)return"two";if(e==1)return"one";return"other"},9:function(e){if(e===0||e!=1&&i(e%100,1,19))return"few";if(e==1)return"one";return"other"},10:function(e){if(i(e%10,2,9)&&!i(e%100,11,19))return"few";if(e%10==1&&!i(e%100,11,19))return"one";return"other"},11:function(e){if(i(e%10,2,4)&&!i(e%100,12,14))return"few";if(e%10===0||i(e%10,5,9)||i(e%100,11,14))return"many";if(e%10==1&&e%100!=11)return"one";return"other"},12:function(e){if(i(e,2,4))return"few";if(e==1)return"one";return"other"},13:function(e){if(i(e%10,2,4)&&!i(e%100,12,14))return"few";if(e!=1&&i(e%10,0,1)||i(e%10,5,9)||i(e%100,12,14))return"many";if(e==1)return"one";return"other"},14:function(e){if(i(e%100,3,4))return"few";if(e%100==2)return"two";if(e%100==1)return"one";return"other"},15:function(e){if(e===0||i(e%100,2,10))return"few";if(i(e%100,11,19))return"many";if(e==1)return"one";return"other"},16:function(e){if(e%10==1&&e!=11)return"one";return"other"},17:function(e){if(e==3)return"few";if(e===0)return"zero";if(e==6)return"many";if(e==2)return"two";if(e==1)return"one";return"other"},18:function(e){if(e===0)return"zero";if(i(e,0,2)&&e!==0&&e!=2)return"one";return"other"},19:function(e){if(i(e,2,10))return"few";if(i(e,0,1))return"one";return"other"},20:function(e){if((i(e%10,3,4)||e%10==9)&&!(i(e%100,10,19)||i(e%100,70,79)||i(e%100,90,99)))return"few";if(e%1e6===0&&e!==0)return"many";if(e%10==2&&!r(e%100,[12,72,92]))return"two";if(e%10==1&&!r(e%100,[11,71,91]))return"one";return"other"},21:function(e){if(e===0)return"zero";if(e==1)return"one";return"other"},22:function(e){if(i(e,0,1)||i(e,11,99))return"one";return"other"},23:function(e){if(i(e%10,1,2)||e%20===0)return"one";return"other"},24:function(e){if(i(e,3,10)||i(e,13,19))return"few";if(r(e,[2,12]))return"two";if(r(e,[1,11]))return"one";return"other"}};var n=t[e.replace(/-.*$/,"")];if(!(n in o)){console.warn("plural form unknown for ["+e+"]");return function(){return"other"}}return o[n]}l.plural=function(e,t,r,o){var a=parseFloat(t);if(isNaN(a))return e;if(o!=n)return e;if(!l._pluralRules){l._pluralRules=m(s)}var d="["+l._pluralRules(a)+"]";if(a===0&&r+"[zero]"in i){e=i[r+"[zero]"][o]}else if(a==1&&r+"[one]"in i){e=i[r+"[one]"][o]}else if(a==2&&r+"[two]"in i){e=i[r+"[two]"][o]}else if(r+d in i){e=i[r+d][o]}else if(r+"[other]"in i){e=i[r+"[other]"][o]}return e};function w(e,t,r){var o=i[e];if(!o){console.warn("#"+e+" is undefined.");if(!r){return null}o=r}var n={};for(var s in o){var l=o[s];l=b(l,t,e,s);l=y(l,t,e);n[s]=l}return n}function b(e,t,r,o){var n=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/;var s=n.exec(e);if(!s||!s.length)return e;var a=s[1];var d=s[2];var c;if(t&&d in t){c=t[d]}else if(d in i){c=i[d]}if(a in l){var h=l[a];e=h(e,c,r,o)}return e}function y(e,t,r){var o=/\{\{\s*(.+?)\s*\}\}/g;return e.replace(o,(function(e,o){if(t&&o in t){return t[o]}if(o in i){return i[o]}console.log("argument {{"+o+"}} for #"+r+" is undefined.");return e}))}function x(e){var r=f(e);if(!r.id)return;var i=w(r.id,r.args);if(!i){console.warn("#"+r.id+" is undefined.");return}if(i[n]){if(k(e)===0){e[n]=i[n]}else{var o=e.childNodes;var s=false;for(var l=0,a=o.length;l<a;l++){if(o[l].nodeType===3&&/\S/.test(o[l].nodeValue)){if(s){o[l].nodeValue=""}else{o[l].nodeValue=i[n];s=true}}}if(!s){var d=t.createTextNode(i[n]);e.insertBefore(d,e.firstChild)}}delete i[n]}for(var c in i){e[c]=i[c]}}function k(e){if(e.children){return e.children.length}if(typeof e.childElementCount!=="undefined"){return e.childElementCount}var t=0;for(var r=0;r<e.childNodes.length;r++){t+=e.nodeType===1?1:0}return t}function M(e){e=e||t.documentElement;var r=u(e);var i=r.length;for(var o=0;o<i;o++){x(r[o])}x(e)}return{get:function(e,t,r){var i=e.lastIndexOf(".");var o=n;if(i>0){o=e.substring(i+1);e=e.substring(0,i)}var s;if(r){s={};s[o]=r}var l=w(e,t,s);if(l&&o in l){return l[o]}return"{{"+e+"}}"},getData:function(){return i},getText:function(){return o},getLanguage:function(){return s},setLanguage:function(e,t){v(e,(function(){if(t)t()}))},getDirection:function(){var e=["ar","he","fa","ps","ur"];var t=s.split("-",1)[0];return e.indexOf(t)>=0?"rtl":"ltr"},translate:M,getReadyState:function(){return a},ready:function(r){if(!r){return}else if(a=="complete"||a=="interactive"){e.setTimeout((function(){r()}))}else if(t.addEventListener){t.addEventListener("localized",(function e(){t.removeEventListener("localized",e);r()}))}}}}(window,document)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFFindController=t.FindState=void 0;var i=r(2);var o=r(11);var n=r(3);const s={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};t.FindState=s;const l=250;const a=-50;const d=-400;const c={"‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"};let h=null;function u(e){if(!h){const e=Object.keys(c).join("");h=new RegExp(`[${e}]`,"g")}return e.replace(h,(function(e){return c[e]}))}class f{constructor({linkService:e,eventBus:t}){this._linkService=e;this._eventBus=t;this._reset();t._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(e){if(this._pdfDocument){this._reset()}if(!e){return}this._pdfDocument=e;this._firstPageCapability.resolve()}executeCommand(e,t){if(!t){return}const r=this._pdfDocument;if(this._state===null||this._shouldDirtyMatch(e,t)){this._dirtyMatch=true}this._state=t;if(e!=="findhighlightallchange"){this._updateUIState(s.PENDING)}this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||r&&this._pdfDocument!==r){return}this._extractText();const t=!this._highlightMatches;const i=!!this._findTimeout;if(this._findTimeout){clearTimeout(this._findTimeout);this._findTimeout=null}if(e==="find"){this._findTimeout=setTimeout((()=>{this._nextMatch();this._findTimeout=null}),l)}else if(this._dirtyMatch){this._nextMatch()}else if(e==="findagain"){this._nextMatch();if(t&&this._state.highlightAll){this._updateAllPages()}}else if(e==="findhighlightallchange"){if(i){this._nextMatch()}else{this._highlightMatches=true}this._updateAllPages()}else{this._nextMatch()}}))}scrollMatchIntoView({element:e=null,pageIndex:t=-1,matchIndex:r=-1}){if(!this._scrollMatches||!e){return}else if(r===-1||r!==this._selected.matchIdx){return}else if(t===-1||t!==this._selected.pageIdx){return}this._scrollMatches=false;const i={top:a,left:d};(0,n.scrollIntoView)(e,i,true)}_reset(){this._highlightMatches=false;this._scrollMatches=false;this._pdfDocument=null;this._pageMatches=[];this._pageMatchesLength=[];this._state=null;this._selected={pageIdx:-1,matchIdx:-1};this._offset={pageIdx:null,matchIdx:null,wrapped:false};this._extractTextPromises=[];this._pageContents=[];this._matchesCountTotal=0;this._pagesToSearch=null;this._pendingFindMatches=Object.create(null);this._resumePageIdx=null;this._dirtyMatch=false;clearTimeout(this._findTimeout);this._findTimeout=null;this._firstPageCapability=(0,i.createPromiseCapability)()}get _query(){if(this._state.query!==this._rawQuery){this._rawQuery=this._state.query;this._normalizedQuery=u(this._state.query)}return this._normalizedQuery}_shouldDirtyMatch(e,t){if(t.query!==this._state.query){return true}switch(e){case"findagain":const e=this._selected.pageIdx+1;const t=this._linkService;if(e>=1&&e<=t.pagesCount&&e!==t.page&&!t.isPageVisible(e)){return true}return false;case"findhighlightallchange":return false}return true}_prepareMatches(e,t,r){function i(t){const r=e[t];const i=e[t+1];if(t<e.length-1&&r.match===i.match){r.skipped=true;return true}for(let i=t-1;i>=0;i--){const t=e[i];if(t.skipped){continue}if(t.match+t.matchLength<r.match){break}if(t.match+t.matchLength>=r.match+r.matchLength){r.skipped=true;return true}}return false}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(let o=0,n=e.length;o<n;o++){if(i(o)){continue}t.push(e[o].match);r.push(e[o].matchLength)}}_isEntireWord(e,t,r){if(t>0){const r=e.charCodeAt(t);const i=e.charCodeAt(t-1);if((0,o.getCharacterType)(r)===(0,o.getCharacterType)(i)){return false}}const i=t+r-1;if(i<e.length-1){const t=e.charCodeAt(i);const r=e.charCodeAt(i+1);if((0,o.getCharacterType)(t)===(0,o.getCharacterType)(r)){return false}}return true}_calculatePhraseMatch(e,t,r,i){const o=[];const n=e.length;let s=-n;while(true){s=r.indexOf(e,s+n);if(s===-1){break}if(i&&!this._isEntireWord(r,s,n)){continue}o.push(s)}this._pageMatches[t]=o}_calculateWordMatch(e,t,r,i){const o=[];const n=e.match(/\S+/g);for(let e=0,t=n.length;e<t;e++){const t=n[e];const s=t.length;let l=-s;while(true){l=r.indexOf(t,l+s);if(l===-1){break}if(i&&!this._isEntireWord(r,l,s)){continue}o.push({match:l,matchLength:s,skipped:false})}}this._pageMatchesLength[t]=[];this._pageMatches[t]=[];this._prepareMatches(o,this._pageMatches[t],this._pageMatchesLength[t])}_calculateMatch(e){let t=this._pageContents[e];let r=this._query;const{caseSensitive:i,entireWord:o,phraseSearch:n}=this._state;if(r.length===0){return}if(!i){t=t.toLowerCase();r=r.toLowerCase()}if(n){this._calculatePhraseMatch(r,e,t,o)}else{this._calculateWordMatch(r,e,t,o)}if(this._state.highlightAll){this._updatePage(e)}if(this._resumePageIdx===e){this._resumePageIdx=null;this._nextPageMatch()}const s=this._pageMatches[e].length;if(s>0){this._matchesCountTotal+=s;this._updateUIResultsCount()}}_extractText(){if(this._extractTextPromises.length>0){return}let e=Promise.resolve();for(let t=0,r=this._linkService.pagesCount;t<r;t++){const r=(0,i.createPromiseCapability)();this._extractTextPromises[t]=r.promise;e=e.then((()=>this._pdfDocument.getPage(t+1).then((e=>e.getTextContent({normalizeWhitespace:true}))).then((e=>{const i=e.items;const o=[];for(let e=0,t=i.length;e<t;e++){o.push(i[e].str)}this._pageContents[t]=u(o.join(""));r.resolve(t)}),(e=>{console.error(`Unable to get text content for page ${t+1}`,e);this._pageContents[t]="";r.resolve(t)}))))}}_updatePage(e){if(this._scrollMatches&&this._selected.pageIdx===e){this._linkService.page=e+1}this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const e=this._state.findPrevious;const t=this._linkService.page-1;const r=this._linkService.pagesCount;this._highlightMatches=true;if(this._dirtyMatch){this._dirtyMatch=false;this._selected.pageIdx=this._selected.matchIdx=-1;this._offset.pageIdx=t;this._offset.matchIdx=null;this._offset.wrapped=false;this._resumePageIdx=null;this._pageMatches.length=0;this._pageMatchesLength.length=0;this._matchesCountTotal=0;this._updateAllPages();for(let e=0;e<r;e++){if(this._pendingFindMatches[e]===true){continue}this._pendingFindMatches[e]=true;this._extractTextPromises[e].then((e=>{delete this._pendingFindMatches[e];this._calculateMatch(e)}))}}if(this._query===""){this._updateUIState(s.FOUND);return}if(this._resumePageIdx){return}const i=this._offset;this._pagesToSearch=r;if(i.matchIdx!==null){const t=this._pageMatches[i.pageIdx].length;if(!e&&i.matchIdx+1<t||e&&i.matchIdx>0){i.matchIdx=e?i.matchIdx-1:i.matchIdx+1;this._updateMatch(true);return}this._advanceOffsetPage(e)}this._nextPageMatch()}_matchesReady(e){const t=this._offset;const r=e.length;const i=this._state.findPrevious;if(r){t.matchIdx=i?r-1:0;this._updateMatch(true);return true}this._advanceOffsetPage(i);if(t.wrapped){t.matchIdx=null;if(this._pagesToSearch<0){this._updateMatch(false);return true}}return false}_nextPageMatch(){if(this._resumePageIdx!==null){console.error("There can only be one pending page.")}let e=null;do{const t=this._offset.pageIdx;e=this._pageMatches[t];if(!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}_advanceOffsetPage(e){const t=this._offset;const r=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1;t.matchIdx=null;this._pagesToSearch--;if(t.pageIdx>=r||t.pageIdx<0){t.pageIdx=e?r-1:0;t.wrapped=true}}_updateMatch(e=false){let t=s.NOT_FOUND;const r=this._offset.wrapped;this._offset.wrapped=false;if(e){const e=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx;this._selected.matchIdx=this._offset.matchIdx;t=r?s.WRAPPED:s.FOUND;if(e!==-1&&e!==this._selected.pageIdx){this._updatePage(e)}}this._updateUIState(t,this._state.findPrevious);if(this._selected.pageIdx!==-1){this._scrollMatches=true;this._updatePage(this._selected.pageIdx)}}_onFindBarClose(e){const t=this._pdfDocument;this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||t&&this._pdfDocument!==t){return}if(this._findTimeout){clearTimeout(this._findTimeout);this._findTimeout=null}if(this._resumePageIdx){this._resumePageIdx=null;this._dirtyMatch=true}this._updateUIState(s.FOUND);this._highlightMatches=false;this._updateAllPages()}))}_requestMatchesCount(){const{pageIdx:e,matchIdx:t}=this._selected;let r=0,i=this._matchesCountTotal;if(t!==-1){for(let t=0;t<e;t++){r+=this._pageMatches[t]&&this._pageMatches[t].length||0}r+=t+1}if(r<1||r>i){r=i=0}return{current:r,total:i}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount()})}}t.PDFFindController=f},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.getCharacterType=p;t.CharacterType=void 0;const i={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=i;function o(e){return e<11904}function n(e){return(e&65408)===0}function s(e){return e>=97&&e<=122||e>=65&&e<=90}function l(e){return e>=48&&e<=57}function a(e){return e===32||e===9||e===13||e===10}function d(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}function c(e){return e>=12448&&e<=12543}function h(e){return e>=12352&&e<=12447}function u(e){return e>=65376&&e<=65439}function f(e){return(e&65408)===3584}function p(e){if(o(e)){if(n(e)){if(a(e)){return i.SPACE}else if(s(e)||l(e)||e===95){return i.ALPHA_LETTER}return i.PUNCT}else if(f(e)){return i.THAI_LETTER}else if(e===160){return i.SPACE}return i.ALPHA_LETTER}if(d(e)){return i.HAN_LETTER}else if(c(e)){return i.KATAKANA_LETTER}else if(h(e)){return i.HIRAGANA_LETTER}else if(u(e)){return i.HALFWIDTH_KATAKANA_LETTER}return i.ALPHA_LETTER}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.isDestHashesEqual=d;t.isDestArraysEqual=c;t.PDFHistory=void 0;var i=r(3);const o=1e3;const n=50;const s=1e3;function l(){return document.location.hash}class a{constructor({linkService:e,eventBus:t}){this.linkService=e;this.eventBus=t;this._initialized=false;this._fingerprint="";this.reset();this._boundEvents=null;this._isViewerInPresentationMode=false;this.eventBus._on("presentationmodechanged",(e=>{this._isViewerInPresentationMode=e.active||e.switchInProgress}));this.eventBus._on("pagesinit",(()=>{this._isPagesLoaded=false;const e=t=>{this.eventBus._off("pagesloaded",e);this._isPagesLoaded=!!t.pagesCount};this.eventBus._on("pagesloaded",e)}))}initialize({fingerprint:e,resetHistory:t=false,updateUrl:r=false}){if(!e||typeof e!=="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}if(this._initialized){this.reset()}const i=this._fingerprint!==""&&this._fingerprint!==e;this._fingerprint=e;this._updateUrl=r===true;this._initialized=true;this._bindEvents();const o=window.history.state;this._popStateInProgress=false;this._blockHashChange=0;this._currentHash=l();this._numPositionUpdates=0;this._uid=this._maxUid=0;this._destination=null;this._position=null;if(!this._isValidState(o,true)||t){const{hash:e,page:r,rotation:o}=this._parseCurrentHash(true);if(!e||i||t){this._pushOrReplaceState(null,true);return}this._pushOrReplaceState({hash:e,page:r,rotation:o},true);return}const n=o.destination;this._updateInternalState(n,o.uid,true);if(this._uid>this._maxUid){this._maxUid=this._uid}if(n.rotation!==undefined){this._initialRotation=n.rotation}if(n.dest){this._initialBookmark=JSON.stringify(n.dest);this._destination.page=null}else if(n.hash){this._initialBookmark=n.hash}else if(n.page){this._initialBookmark=`page=${n.page}`}}reset(){if(this._initialized){this._pageHide();this._initialized=false;this._unbindEvents()}if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._initialBookmark=null;this._initialRotation=null}push({namedDest:e=null,explicitDest:t,pageNumber:r}){if(!this._initialized){return}if(e&&typeof e!=="string"){console.error("PDFHistory.push: "+`"${e}" is not a valid namedDest parameter.`);return}else if(!Array.isArray(t)){console.error("PDFHistory.push: "+`"${t}" is not a valid explicitDest parameter.`);return}else if(!(Number.isInteger(r)&&r>0&&r<=this.linkService.pagesCount)){if(r!==null||this._destination){console.error("PDFHistory.push: "+`"${r}" is not a valid pageNumber parameter.`);return}}const i=e||JSON.stringify(t);if(!i){return}let o=false;if(this._destination&&(d(this._destination.hash,i)||c(this._destination.dest,t))){if(this._destination.page){return}o=true}if(this._popStateInProgress&&!o){return}this._pushOrReplaceState({dest:t,hash:i,page:r,rotation:this.linkService.rotation},o);if(!this._popStateInProgress){this._popStateInProgress=true;Promise.resolve().then((()=>{this._popStateInProgress=false}))}}pushCurrentPosition(){if(!this._initialized||this._popStateInProgress){return}this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress){return}const e=window.history.state;if(this._isValidState(e)&&e.uid>0){window.history.back()}}forward(){if(!this._initialized||this._popStateInProgress){return}const e=window.history.state;if(this._isValidState(e)&&e.uid<this._maxUid){window.history.forward()}}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(e,t=false){const r=t||!this._destination;const i={fingerprint:this._fingerprint,uid:r?this._uid:this._uid+1,destination:e};this._updateInternalState(e,i.uid);let o;if(this._updateUrl&&e&&e.hash){const t=document.location.href.split("#")[0];if(!t.startsWith("file://")){o=`${t}#${e.hash}`}}if(r){window.history.replaceState(i,"",o)}else{this._maxUid=this._uid;window.history.pushState(i,"",o)}}_tryPushCurrentPosition(e=false){if(!this._position){return}let t=this._position;if(e){t=Object.assign(Object.create(null),this._position);t.temporary=true}if(!this._destination){this._pushOrReplaceState(t);return}if(this._destination.temporary){this._pushOrReplaceState(t,true);return}if(this._destination.hash===t.hash){return}if(!this._destination.page&&this._numPositionUpdates<=n){return}let r=false;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first){return}r=true}this._pushOrReplaceState(t,r)}_isValidState(e,t=false){if(!e){return false}if(e.fingerprint!==this._fingerprint){if(t){if(typeof e.fingerprint!=="string"||e.fingerprint.length!==this._fingerprint.length){return false}const[t]=performance.getEntriesByType("navigation");if(!t||t.type!=="reload"){return false}}else{return false}}if(!Number.isInteger(e.uid)||e.uid<0){return false}if(e.destination===null||typeof e.destination!=="object"){return false}return true}_updateInternalState(e,t,r=false){if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}if(r&&e&&e.temporary){delete e.temporary}this._destination=e;this._uid=t;this._numPositionUpdates=0}_parseCurrentHash(e=false){const t=unescape(l()).substring(1);const r=(0,i.parseQueryString)(t);const o=r.nameddest||"";let n=r.page|0;if(!(Number.isInteger(n)&&n>0&&n<=this.linkService.pagesCount)||e&&o.length>0){n=null}return{hash:t,page:n,rotation:this.linkService.rotation}}_updateViewarea({location:e}){if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._position={hash:this._isViewerInPresentationMode?`page=${e.pageNumber}`:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.rotation};if(this._popStateInProgress){return}if(this._isPagesLoaded&&this._destination&&!this._destination.page){this._numPositionUpdates++}{this._updateViewareaTimeout=setTimeout((()=>{if(!this._popStateInProgress){this._tryPushCurrentPosition(true)}this._updateViewareaTimeout=null}),s)}}_popState({state:e}){const t=l(),r=this._currentHash!==t;this._currentHash=t;if(!e){this._uid++;const{hash:e,page:t,rotation:r}=this._parseCurrentHash();this._pushOrReplaceState({hash:e,page:t,rotation:r},true);return}if(!this._isValidState(e)){return}this._popStateInProgress=true;if(r){this._blockHashChange++;(0,i.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:o}).then((()=>{this._blockHashChange--}))}const n=e.destination;this._updateInternalState(n,e.uid,true);if(this._uid>this._maxUid){this._maxUid=this._uid}if((0,i.isValidRotation)(n.rotation)){this.linkService.rotation=n.rotation}if(n.dest){this.linkService.navigateTo(n.dest)}else if(n.hash){this.linkService.setHash(n.hash)}else if(n.page){this.linkService.page=n.page}Promise.resolve().then((()=>{this._popStateInProgress=false}))}_pageHide(){if(!this._destination||this._destination.temporary){this._tryPushCurrentPosition()}}_bindEvents(){if(this._boundEvents){return}this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)};this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea);window.addEventListener("popstate",this._boundEvents.popState);window.addEventListener("pagehide",this._boundEvents.pageHide)}_unbindEvents(){if(!this._boundEvents){return}this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea);window.removeEventListener("popstate",this._boundEvents.popState);window.removeEventListener("pagehide",this._boundEvents.pageHide);this._boundEvents=null}}t.PDFHistory=a;function d(e,t){if(typeof e!=="string"||typeof t!=="string"){return false}if(e===t){return true}const{nameddest:r}=(0,i.parseQueryString)(e);if(r===t){return true}return false}function c(e,t){function r(e,t){if(typeof e!==typeof t){return false}if(Array.isArray(e)||Array.isArray(t)){return false}if(e!==null&&typeof e==="object"&&t!==null){if(Object.keys(e).length!==Object.keys(t).length){return false}for(const i in e){if(!r(e[i],t[i])){return false}}return true}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!(Array.isArray(e)&&Array.isArray(t))){return false}if(e.length!==t.length){return false}for(let i=0,o=e.length;i<o;i++){if(!r(e[i],t[i])){return false}}return true}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFPageView=void 0;var i=r(3);var o=r(2);var n=r(14);var s=r(7);const l=s.viewerCompatibilityParams.maxCanvasPixels||16777216;class a{constructor(e){const t=e.container;const r=e.defaultViewport;this.id=e.id;this.renderingId="page"+this.id;this.pdfPage=null;this.pageLabel=null;this.rotation=0;this.scale=e.scale||i.DEFAULT_SCALE;this.viewport=r;this.pdfPageRotate=r.rotation;this.hasRestrictedScaling=false;this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE;this.imageResourcesPath=e.imageResourcesPath||"";this.renderInteractiveForms=e.renderInteractiveForms||false;this.useOnlyCssZoom=e.useOnlyCssZoom||false;this.maxCanvasPixels=e.maxCanvasPixels||l;this.eventBus=e.eventBus;this.renderingQueue=e.renderingQueue;this.textLayerFactory=e.textLayerFactory;this.annotationLayerFactory=e.annotationLayerFactory;this.renderer=e.renderer||i.RendererType.CANVAS;this.enableWebGL=e.enableWebGL||false;this.l10n=e.l10n||i.NullL10n;this.paintTask=null;this.paintedViewportMap=new WeakMap;this.renderingState=n.RenderingStates.INITIAL;this.resume=null;this.error=null;this.annotationLayer=null;this.textLayer=null;this.zoomLayer=null;const o=document.createElement("div");o.className="page";o.style.width=Math.floor(this.viewport.width)+"px";o.style.height=Math.floor(this.viewport.height)+"px";o.setAttribute("data-page-number",this.id);this.div=o;t.appendChild(o)}setPdfPage(e){this.pdfPage=e;this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*i.CSS_UNITS,rotation:t});this.stats=e.stats;this.reset()}destroy(){this.reset();if(this.pdfPage){this.pdfPage.cleanup()}}_resetZoomLayer(e=false){if(!this.zoomLayer){return}const t=this.zoomLayer.firstChild;this.paintedViewportMap.delete(t);t.width=0;t.height=0;if(e){this.zoomLayer.remove()}this.zoomLayer=null}reset(e=false,t=false){this.cancelRendering(t);this.renderingState=n.RenderingStates.INITIAL;const r=this.div;r.style.width=Math.floor(this.viewport.width)+"px";r.style.height=Math.floor(this.viewport.height)+"px";const i=r.childNodes;const o=e&&this.zoomLayer||null;const s=t&&this.annotationLayer&&this.annotationLayer.div||null;for(let e=i.length-1;e>=0;e--){const t=i[e];if(o===t||s===t){continue}r.removeChild(t)}r.removeAttribute("data-loaded");if(s){this.annotationLayer.hide()}else if(this.annotationLayer){this.annotationLayer.cancel();this.annotationLayer=null}if(!o){if(this.canvas){this.paintedViewportMap.delete(this.canvas);this.canvas.width=0;this.canvas.height=0;delete this.canvas}this._resetZoomLayer()}if(this.svg){this.paintedViewportMap.delete(this.svg);delete this.svg}this.loadingIconDiv=document.createElement("div");this.loadingIconDiv.className="loadingIcon";r.appendChild(this.loadingIconDiv)}update(e,t){this.scale=e||this.scale;if(typeof t!=="undefined"){this.rotation=t}const r=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:r});if(this.svg){this.cssTransform(this.svg,true);this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:true,timestamp:performance.now()});return}let o=false;if(this.canvas&&this.maxCanvasPixels>0){const e=this.outputScale;if((Math.floor(this.viewport.width)*e.sx|0)*(Math.floor(this.viewport.height)*e.sy|0)>this.maxCanvasPixels){o=true}}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&o){this.cssTransform(this.canvas,true);this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:true,timestamp:performance.now()});return}if(!this.zoomLayer&&!this.canvas.hasAttribute("hidden")){this.zoomLayer=this.canvas.parentNode;this.zoomLayer.style.position="absolute"}}if(this.zoomLayer){this.cssTransform(this.zoomLayer.firstChild)}this.reset(true,true)}cancelRendering(e=false){if(this.paintTask){this.paintTask.cancel();this.paintTask=null}this.resume=null;if(this.textLayer){this.textLayer.cancel();this.textLayer=null}if(!e&&this.annotationLayer){this.annotationLayer.cancel();this.annotationLayer=null}}cssTransform(e,t=false){const r=this.viewport.width;const i=this.viewport.height;const o=this.div;e.style.width=e.parentNode.style.width=o.style.width=Math.floor(r)+"px";e.style.height=e.parentNode.style.height=o.style.height=Math.floor(i)+"px";const n=this.viewport.rotation-this.paintedViewportMap.get(e).rotation;const s=Math.abs(n);let l=1,a=1;if(s===90||s===270){l=i/r;a=r/i}const d="rotate("+n+"deg) "+"scale("+l+","+a+")";e.style.transform=d;if(this.textLayer){const e=this.textLayer.viewport;const t=this.viewport.rotation-e.rotation;const i=Math.abs(t);let o=r/e.width;if(i===90||i===270){o=r/e.height}const n=this.textLayer.textLayerDiv;let s,l;switch(i){case 0:s=l=0;break;case 90:s=0;l="-"+n.style.height;break;case 180:s="-"+n.style.width;l="-"+n.style.height;break;case 270:s="-"+n.style.width;l=0;break;default:console.error("Bad rotation value.");break}n.style.transform="rotate("+i+"deg) "+"scale("+o+", "+o+") "+"translate("+s+", "+l+")";n.style.transformOrigin="0% 0%"}if(t&&this.annotationLayer){this.annotationLayer.render(this.viewport,"display")}}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}draw(){if(this.renderingState!==n.RenderingStates.INITIAL){console.error("Must be in new state before drawing");this.reset()}const{div:e,pdfPage:t}=this;if(!t){this.renderingState=n.RenderingStates.FINISHED;if(this.loadingIconDiv){e.removeChild(this.loadingIconDiv);delete this.loadingIconDiv}return Promise.reject(new Error("pdfPage is not loaded"))}this.renderingState=n.RenderingStates.RUNNING;const r=document.createElement("div");r.style.width=e.style.width;r.style.height=e.style.height;r.classList.add("canvasWrapper");if(this.annotationLayer&&this.annotationLayer.div){e.insertBefore(r,this.annotationLayer.div)}else{e.appendChild(r)}let s=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){const t=document.createElement("div");t.className="textLayer";t.style.width=r.style.width;t.style.height=r.style.height;if(this.annotationLayer&&this.annotationLayer.div){e.insertBefore(t,this.annotationLayer.div)}else{e.appendChild(t)}s=this.textLayerFactory.createTextLayerBuilder(t,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=s;let l=null;if(this.renderingQueue){l=e=>{if(!this.renderingQueue.isHighestPriority(this)){this.renderingState=n.RenderingStates.PAUSED;this.resume=()=>{this.renderingState=n.RenderingStates.RUNNING;e()};return}e()}}const a=async r=>{if(d===this.paintTask){this.paintTask=null}if(r instanceof o.RenderingCancelledException){this.error=null;return}this.renderingState=n.RenderingStates.FINISHED;if(this.loadingIconDiv){e.removeChild(this.loadingIconDiv);delete this.loadingIconDiv}this._resetZoomLayer(true);this.error=r;this.stats=t.stats;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:false,timestamp:performance.now()});if(r){throw r}};const d=this.renderer===i.RendererType.SVG?this.paintOnSvg(r):this.paintOnCanvas(r);d.onRenderContinue=l;this.paintTask=d;const c=d.promise.then((function(){return a(null).then((function(){if(s){const e=t.streamTextContent({normalizeWhitespace:true});s.setTextContentStream(e);s.render()}}))}),(function(e){return a(e)}));if(this.annotationLayerFactory){if(!this.annotationLayer){this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(e,t,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)}this.annotationLayer.render(this.viewport,"display")}e.setAttribute("data-loaded",true);this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id});return c}paintOnCanvas(e){const t=(0,o.createPromiseCapability)();const r={promise:t.promise,onRenderContinue(e){e()},cancel(){g.cancel()}};const n=this.viewport;const s=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((e=>{s.setAttribute("aria-label",e)}));s.setAttribute("hidden","hidden");let l=true;const a=function(){if(l){s.removeAttribute("hidden");l=false}};e.appendChild(s);this.canvas=s;s.mozOpaque=true;const d=s.getContext("2d",{alpha:false});const c=(0,i.getOutputScale)(d);this.outputScale=c;if(this.useOnlyCssZoom){const e=n.clone({scale:i.CSS_UNITS});c.sx*=e.width/n.width;c.sy*=e.height/n.height;c.scaled=true}if(this.maxCanvasPixels>0){const e=n.width*n.height;const t=Math.sqrt(this.maxCanvasPixels/e);if(c.sx>t||c.sy>t){c.sx=t;c.sy=t;c.scaled=true;this.hasRestrictedScaling=true}else{this.hasRestrictedScaling=false}}const h=(0,i.approximateFraction)(c.sx);const u=(0,i.approximateFraction)(c.sy);s.width=(0,i.roundToDivide)(n.width*c.sx,h[0]);s.height=(0,i.roundToDivide)(n.height*c.sy,u[0]);s.style.width=(0,i.roundToDivide)(n.width,h[1])+"px";s.style.height=(0,i.roundToDivide)(n.height,u[1])+"px";this.paintedViewportMap.set(s,n);const f=!c.scaled?null:[c.sx,0,0,c.sy,0,0];const p={canvasContext:d,transform:f,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms};const g=this.pdfPage.render(p);g.onContinue=function(e){a();if(r.onRenderContinue){r.onRenderContinue(e)}else{e()}};g.promise.then((function(){a();t.resolve(undefined)}),(function(e){a();t.reject(e)}));return r}paintOnSvg(e){let t=false;const r=()=>{if(t){throw new o.RenderingCancelledException(`Rendering cancelled, page ${this.id}`,"svg")}};const s=this.pdfPage;const l=this.viewport.clone({scale:i.CSS_UNITS});const a=s.getOperatorList().then((t=>{r();const i=new o.SVGGraphics(s.commonObjs,s.objs);return i.getSVG(t,l).then((t=>{r();this.svg=t;this.paintedViewportMap.set(t,l);t.style.width=e.style.width;t.style.height=e.style.height;this.renderingState=n.RenderingStates.FINISHED;e.appendChild(t)}))}));return{promise:a,onRenderContinue(e){e()},cancel(){t=true}}}setPageLabel(e){this.pageLabel=typeof e==="string"?e:null;if(this.pageLabel!==null){this.div.setAttribute("data-page-label",this.pageLabel)}else{this.div.removeAttribute("data-page-label")}}}t.PDFPageView=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFRenderingQueue=t.RenderingStates=void 0;const i=3e4;const o={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.RenderingStates=o;class n{constructor(){this.pdfViewer=null;this.pdfThumbnailViewer=null;this.onIdle=null;this.highestPriorityPage=null;this.idleTimeout=null;this.printing=false;this.isThumbnailViewEnabled=false}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}renderHighestPriority(e){if(this.idleTimeout){clearTimeout(this.idleTimeout);this.idleTimeout=null}if(this.pdfViewer.forceRendering(e)){return}if(this.pdfThumbnailViewer&&this.isThumbnailViewEnabled){if(this.pdfThumbnailViewer.forceRendering()){return}}if(this.printing){return}if(this.onIdle){this.idleTimeout=setTimeout(this.onIdle.bind(this),i)}}getHighestPriority(e,t,r){const i=e.views;const o=i.length;if(o===0){return null}for(let e=0;e<o;++e){const t=i[e].view;if(!this.isViewFinished(t)){return t}}if(r){const r=e.last.id;if(t[r]&&!this.isViewFinished(t[r])){return t[r]}}else{const r=e.first.id-2;if(t[r]&&!this.isViewFinished(t[r])){return t[r]}}return null}isViewFinished(e){return e.renderingState===o.FINISHED}renderView(e){switch(e.renderingState){case o.FINISHED:return false;case o.PAUSED:this.highestPriorityPage=e.renderingId;e.resume();break;case o.RUNNING:this.highestPriorityPage=e.renderingId;break;case o.INITIAL:this.highestPriorityPage=e.renderingId;e.draw().finally((()=>{this.renderHighestPriority()})).catch((e=>{console.error(`renderView: "${e}"`)}));break}return true}}t.PDFRenderingQueue=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFSinglePageViewer=void 0;var i=r(16);var o=r(2);class n extends i.BaseViewer{constructor(e){super(e);this.eventBus._on("pagesinit",(e=>{this._ensurePageViewVisible()}))}get _viewerElement(){return(0,o.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView();this._previousPageNumber=1;this._shadowViewer=document.createDocumentFragment();this._updateScrollDown=null}_ensurePageViewVisible(){const e=this._pages[this._currentPageNumber-1];const t=this._pages[this._previousPageNumber-1];const r=this.viewer.childNodes;switch(r.length){case 0:this.viewer.appendChild(e.div);break;case 1:if(r[0]!==t.div){throw new Error("_ensurePageViewVisible: Unexpected previously visible page.")}if(e===t){break}this._shadowViewer.appendChild(t.div);this.viewer.appendChild(e.div);this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){if(this._updateScrollDown){this._updateScrollDown()}super._scrollUpdate()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){if(r){this._setCurrentPageNumber(r)}const i=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible();this.update();super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r});this._updateScrollDown=()=>{this.scroll.down=i;this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(e){}get _isScrollModeHorizontal(){return(0,o.shadow)(this,"_isScrollModeHorizontal",false)}_updateScrollMode(){}_updateSpreadMode(){}}t.PDFSinglePageViewer=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.BaseViewer=void 0;var i=r(3);var o=r(14);var n=r(1);var s=r(2);var l=r(13);var a=r(4);var d=r(5);const c=10;function h(e){const t=[];this.push=function(r){const i=t.indexOf(r);if(i>=0){t.splice(i,1)}t.push(r);if(t.length>e){t.shift().destroy()}};this.resize=function(r,o){e=r;if(o){const e=new Set;for(let t=0,r=o.length;t<r;++t){e.add(o[t].id)}(0,i.moveToEndOfArray)(t,(function(t){return e.has(t.id)}))}while(t.length>e){t.shift().destroy()}}}function u(e,t){if(t===e){return true}if(Math.abs(t-e)<1e-15){return true}return false}class f{constructor(e){if(this.constructor===f){throw new Error("Cannot initialize BaseViewer.")}this._name=this.constructor.name;this.container=e.container;this.viewer=e.viewer||e.container.firstElementChild;this.eventBus=e.eventBus;this.linkService=e.linkService||new a.SimpleLinkService;this.downloadManager=e.downloadManager||null;this.findController=e.findController||null;this.removePageBorders=e.removePageBorders||false;this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE;this.imageResourcesPath=e.imageResourcesPath||"";this.renderInteractiveForms=e.renderInteractiveForms||false;this.enablePrintAutoRotate=e.enablePrintAutoRotate||false;this.renderer=e.renderer||i.RendererType.CANVAS;this.enableWebGL=e.enableWebGL||false;this.useOnlyCssZoom=e.useOnlyCssZoom||false;this.maxCanvasPixels=e.maxCanvasPixels;this.l10n=e.l10n||i.NullL10n;this.defaultRenderingQueue=!e.renderingQueue;if(this.defaultRenderingQueue){this.renderingQueue=new o.PDFRenderingQueue;this.renderingQueue.setViewer(this)}else{this.renderingQueue=e.renderingQueue}this.scroll=(0,i.watchScroll)(this.container,this._scrollUpdate.bind(this));this.presentationModeState=i.PresentationModeState.UNKNOWN;this._onBeforeDraw=this._onAfterDraw=null;this._resetView();if(this.removePageBorders){this.viewer.classList.add("removePageBorders")}Promise.resolve().then((()=>{this.eventBus.dispatch("baseviewerinit",{source:this})}))}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}get pageViewsReady(){if(!this._pagesCapability.settled){return false}return this._pages.every((function(e){return e&&e.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e)){throw new Error("Invalid page number.")}if(!this.pdfDocument){return}if(!this._setCurrentPageNumber(e,true)){console.error(`${this._name}.currentPageNumber: "${e}" is not a valid page.`)}}_setCurrentPageNumber(e,t=false){if(this._currentPageNumber===e){if(t){this._resetCurrentPageView()}return true}if(!(0<e&&e<=this.pagesCount)){return false}this._currentPageNumber=e;this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:this._pageLabels&&this._pageLabels[e-1]});if(t){this._resetCurrentPageView()}return true}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(e){if(!this.pdfDocument){return}let t=e|0;if(this._pageLabels){const r=this._pageLabels.indexOf(e);if(r>=0){t=r+1}}if(!this._setCurrentPageNumber(t,true)){console.error(`${this._name}.currentPageLabel: "${e}" is not a valid page.`)}}get currentScale(){return this._currentScale!==i.UNKNOWN_SCALE?this._currentScale:i.DEFAULT_SCALE}set currentScale(e){if(isNaN(e)){throw new Error("Invalid numeric scale.")}if(!this.pdfDocument){return}this._setScale(e,false)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){if(!this.pdfDocument){return}this._setScale(e,false)}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,i.isValidRotation)(e)){throw new Error("Invalid pages rotation angle.")}if(!this.pdfDocument){return}if(this._pagesRotation===e){return}this._pagesRotation=e;const t=this._currentPageNumber;for(let t=0,r=this._pages.length;t<r;t++){const r=this._pages[t];r.update(r.scale,e)}if(this._currentScaleValue){this._setScale(this._currentScaleValue,true)}this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t});if(this.defaultRenderingQueue){this.update()}}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){if(!this.container.offsetParent||this._getVisiblePages().views.length===0){return Promise.resolve()}return this._onePageRenderedCapability.promise}setDocument(e){if(this.pdfDocument){this._cancelRendering();this._resetView();if(this.findController){this.findController.setDocument(null)}}this.pdfDocument=e;if(!e){return}const t=e.numPages;const r=e.getPage(1);this._pagesCapability.promise.then((()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:t})}));this._onBeforeDraw=e=>{const t=this._pages[e.pageNumber-1];if(!t){return}this._buffer.push(t)};this.eventBus._on("pagerender",this._onBeforeDraw);this._onAfterDraw=e=>{if(e.cssTransform||this._onePageRenderedCapability.settled){return}this._onePageRenderedCapability.resolve();this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null};this.eventBus._on("pagerendered",this._onAfterDraw);r.then((r=>{this._firstPageCapability.resolve(r);const o=this.currentScale;const n=r.getViewport({scale:o*i.CSS_UNITS});const s=this.textLayerMode!==i.TextLayerMode.DISABLE?this:null;for(let e=1;e<=t;++e){const t=new l.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:e,scale:o,defaultViewport:n.clone(),renderingQueue:this.renderingQueue,textLayerFactory:s,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(t)}const a=this._pages[0];if(a){a.setPdfPage(r);this.linkService.cachePageRef(1,r.ref)}if(this._spreadMode!==i.SpreadMode.NONE){this._updateSpreadMode()}this._onePageRenderedOrForceFetch().then((()=>{if(this.findController){this.findController.setDocument(e)}if(e.loadingParams.disableAutoFetch||t>7500){this._pagesCapability.resolve();return}let r=t-1;if(r<=0){this._pagesCapability.resolve();return}for(let i=2;i<=t;++i){e.getPage(i).then((e=>{const t=this._pages[i-1];if(!t.pdfPage){t.setPdfPage(e)}this.linkService.cachePageRef(i,e.ref);if(--r===0){this._pagesCapability.resolve()}}),(e=>{console.error(`Unable to get page ${i} to initialize viewer`,e);if(--r===0){this._pagesCapability.resolve()}}))}}));this.eventBus.dispatch("pagesinit",{source:this});if(this.defaultRenderingQueue){this.update()}})).catch((e=>{console.error("Unable to initialize viewer",e)}))}setPageLabels(e){if(!this.pdfDocument){return}if(!e){this._pageLabels=null}else if(!(Array.isArray(e)&&this.pdfDocument.numPages===e.length)){this._pageLabels=null;console.error(`${this._name}.setPageLabels: Invalid page labels.`)}else{this._pageLabels=e}for(let e=0,t=this._pages.length;e<t;e++){const t=this._pages[e];const r=this._pageLabels&&this._pageLabels[e];t.setPageLabel(r)}}_resetView(){this._pages=[];this._currentPageNumber=1;this._currentScale=i.UNKNOWN_SCALE;this._currentScaleValue=null;this._pageLabels=null;this._buffer=new h(c);this._location=null;this._pagesRotation=0;this._pagesRequests=new WeakMap;this._firstPageCapability=(0,s.createPromiseCapability)();this._onePageRenderedCapability=(0,s.createPromiseCapability)();this._pagesCapability=(0,s.createPromiseCapability)();this._scrollMode=i.ScrollMode.VERTICAL;this._spreadMode=i.SpreadMode.NONE;if(this._onBeforeDraw){this.eventBus._off("pagerender",this._onBeforeDraw);this._onBeforeDraw=null}if(this._onAfterDraw){this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null}this.viewer.textContent="";this._updateScrollMode()}_scrollUpdate(){if(this.pagesCount===0){return}this.update()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){(0,i.scrollIntoView)(e,t)}_setScaleUpdatePages(e,t,r=false,i=false){this._currentScaleValue=t.toString();if(u(this._currentScale,e)){if(i){this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t})}return}for(let t=0,r=this._pages.length;t<r;t++){this._pages[t].update(e)}this._currentScale=e;if(!r){let e=this._currentPageNumber,t;if(this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)){e=this._location.pageNumber;t=[null,{name:"XYZ"},this._location.left,this._location.top,null]}this.scrollPageIntoView({pageNumber:e,destArray:t,allowNegativeOffset:true})}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:i?t:undefined});if(this.defaultRenderingQueue){this.update()}}_setScale(e,t=false){let r=parseFloat(e);if(r>0){this._setScaleUpdatePages(r,e,t,false)}else{const o=this._pages[this._currentPageNumber-1];if(!o){return}const n=this.isInPresentationMode||this.removePageBorders;let s=n?0:i.SCROLLBAR_PADDING;let l=n?0:i.VERTICAL_PADDING;if(!n&&this._isScrollModeHorizontal){[s,l]=[l,s]}const a=(this.container.clientWidth-s)/o.width*o.scale;const d=(this.container.clientHeight-l)/o.height*o.scale;switch(e){case"page-actual":r=1;break;case"page-width":r=a;break;case"page-height":r=d;break;case"page-fit":r=Math.min(a,d);break;case"auto":const t=(0,i.isPortraitOrientation)(o)?a:Math.min(d,a);r=Math.min(i.MAX_AUTO_SCALE,t);break;default:console.error(`${this._name}._setScale: "${e}" is an unknown zoom value.`);return}this._setScaleUpdatePages(r,e,t,true)}}_resetCurrentPageView(){if(this.isInPresentationMode){this._setScale(this._currentScaleValue,true)}const e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}scrollPageIntoView({pageNumber:e,destArray:t=null,allowNegativeOffset:r=false,ignoreDestinationZoom:o=false}){if(!this.pdfDocument){return}const n=Number.isInteger(e)&&this._pages[e-1];if(!n){console.error(`${this._name}.scrollPageIntoView: `+`"${e}" is not a valid pageNumber parameter.`);return}if(this.isInPresentationMode||!t){this._setCurrentPageNumber(e,true);return}let s=0,l=0;let a=0,d=0,c,h;const u=n.rotation%180!==0;const f=(u?n.height:n.width)/n.scale/i.CSS_UNITS;const p=(u?n.width:n.height)/n.scale/i.CSS_UNITS;let g=0;switch(t[1].name){case"XYZ":s=t[2];l=t[3];g=t[4];s=s!==null?s:0;l=l!==null?l:p;break;case"Fit":case"FitB":g="page-fit";break;case"FitH":case"FitBH":l=t[2];g="page-width";if(l===null&&this._location){s=this._location.left;l=this._location.top}break;case"FitV":case"FitBV":s=t[2];a=f;d=p;g="page-height";break;case"FitR":s=t[2];l=t[3];a=t[4]-s;d=t[5]-l;const e=this.removePageBorders?0:i.SCROLLBAR_PADDING;const r=this.removePageBorders?0:i.VERTICAL_PADDING;c=(this.container.clientWidth-e)/a/i.CSS_UNITS;h=(this.container.clientHeight-r)/d/i.CSS_UNITS;g=Math.min(Math.abs(c),Math.abs(h));break;default:console.error(`${this._name}.scrollPageIntoView: `+`"${t[1].name}" is not a valid destination type.`);return}if(!o){if(g&&g!==this._currentScale){this.currentScaleValue=g}else if(this._currentScale===i.UNKNOWN_SCALE){this.currentScaleValue=i.DEFAULT_SCALE_VALUE}}if(g==="page-fit"&&!t[4]){this._scrollIntoView({pageDiv:n.div,pageNumber:e});return}const v=[n.viewport.convertToViewportPoint(s,l),n.viewport.convertToViewportPoint(s+a,l+d)];let C=Math.min(v[0][0],v[1][0]);let m=Math.min(v[0][1],v[1][1]);if(!r){C=Math.max(C,0);m=Math.max(m,0)}this._scrollIntoView({pageDiv:n.div,pageSpot:{left:C,top:m},pageNumber:e})}_updateLocation(e){const t=this._currentScale;const r=this._currentScaleValue;const i=parseFloat(r)===t?Math.round(t*1e4)/100:r;const o=e.id;let n="#page="+o;n+="&zoom="+i;const s=this._pages[o-1];const l=this.container;const a=s.getPagePoint(l.scrollLeft-e.x,l.scrollTop-e.y);const d=Math.round(a[0]);const c=Math.round(a[1]);n+=","+d+","+c;this._location={pageNumber:o,scale:i,top:c,left:d,rotation:this._pagesRotation,pdfOpenParams:n}}_updateHelper(e){throw new Error("Not implemented: _updateHelper")}update(){const e=this._getVisiblePages();const t=e.views,r=t.length;if(r===0){return}const i=Math.max(c,2*r+1);this._buffer.resize(i,t);this.renderingQueue.renderHighestPriority(e);this._updateHelper(t);this._updateLocation(e.first);this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return this.isInPresentationMode?false:this._scrollMode===i.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===i.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===i.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return this.isInPresentationMode?false:this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?false:this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount){return{views:[]}}const e=this._pages[this._currentPageNumber-1];const t=e.div;const r={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:r,last:r,views:[r]}}_getVisiblePages(){return(0,i.getVisibleElements)(this.container,this._pages,true,this._isScrollModeHorizontal)}isPageVisible(e){if(!this.pdfDocument){return false}if(e<1||e>this.pagesCount){console.error(`${this._name}.isPageVisible: "${e}" is out of bounds.`);return false}return this._getVisiblePages().views.some((function(t){return t.id===e}))}cleanup(){for(let e=0,t=this._pages.length;e<t;e++){if(this._pages[e]&&this._pages[e].renderingState!==o.RenderingStates.FINISHED){this._pages[e].reset()}}}_cancelRendering(){for(let e=0,t=this._pages.length;e<t;e++){if(this._pages[e]){this._pages[e].cancelRendering()}}}_ensurePdfPageLoaded(e){if(e.pdfPage){return Promise.resolve(e.pdfPage)}if(this._pagesRequests.has(e)){return this._pagesRequests.get(e)}const t=this.pdfDocument.getPage(e.id).then((t=>{if(!e.pdfPage){e.setPdfPage(t)}this._pagesRequests.delete(e);return t})).catch((t=>{console.error("Unable to get page for page view",t);this._pagesRequests.delete(e)}));this._pagesRequests.set(e,t);return t}forceRendering(e){const t=e||this._getVisiblePages();const r=this._isScrollModeHorizontal?this.scroll.right:this.scroll.down;const i=this.renderingQueue.getHighestPriority(t,this._pages,r);if(i){this._ensurePdfPageLoaded(i).then((()=>{this.renderingQueue.renderView(i)}));return true}return false}createTextLayerBuilder(e,t,r,i=false,o){return new d.TextLayerBuilder({textLayerDiv:e,eventBus:o,pageIndex:t,viewport:r,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:this.isInPresentationMode?false:i})}createAnnotationLayerBuilder(e,t,r="",o=false,s=i.NullL10n){return new n.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:o,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s})}get hasEqualPageSizes(){const e=this._pages[0];for(let t=1,r=this._pages.length;t<r;++t){const r=this._pages[t];if(r.width!==e.width||r.height!==e.height){return false}}return true}getPagesOverview(){const e=this._pages.map((function(e){const t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));if(!this.enablePrintAutoRotate){return e}const t=(0,i.isPortraitOrientation)(e[0]);return e.map((function(e){if(t===(0,i.isPortraitOrientation)(e)){return e}return{width:e.height,height:e.width,rotation:(e.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode===e){return}if(!(0,i.isValidScrollMode)(e)){throw new Error(`Invalid scroll mode: ${e}`)}this._scrollMode=e;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e});this._updateScrollMode(this._currentPageNumber)}_updateScrollMode(e=null){const t=this._scrollMode,r=this.viewer;r.classList.toggle("scrollHorizontal",t===i.ScrollMode.HORIZONTAL);r.classList.toggle("scrollWrapped",t===i.ScrollMode.WRAPPED);if(!this.pdfDocument||!e){return}if(this._currentScaleValue&&isNaN(this._currentScaleValue)){this._setScale(this._currentScaleValue,true)}this._setCurrentPageNumber(e,true);this.update()}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode===e){return}if(!(0,i.isValidSpreadMode)(e)){throw new Error(`Invalid spread mode: ${e}`)}this._spreadMode=e;this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e});this._updateSpreadMode(this._currentPageNumber)}_updateSpreadMode(e=null){if(!this.pdfDocument){return}const t=this.viewer,r=this._pages;t.textContent="";if(this._spreadMode===i.SpreadMode.NONE){for(let e=0,i=r.length;e<i;++e){t.appendChild(r[e].div)}}else{const e=this._spreadMode-1;let i=null;for(let o=0,n=r.length;o<n;++o){if(i===null){i=document.createElement("div");i.className="spread";t.appendChild(i)}else if(o%2===e){i=i.cloneNode(false);t.appendChild(i)}i.appendChild(r[o].div)}}if(!e){return}this._setCurrentPageNumber(e,true);this.update()}}t.BaseViewer=f},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFViewer=void 0;var i=r(16);var o=r(2);class n extends i.BaseViewer{get _viewerElement(){return(0,o.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){if(!t&&!this.isInPresentationMode){const r=e.offsetLeft+e.clientLeft;const i=r+e.clientWidth;const{scrollLeft:o,clientWidth:n}=this.container;if(this._isScrollModeHorizontal||r<o||i>o+n){t={left:0,top:0}}}super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r})}_getVisiblePages(){if(this.isInPresentationMode){return this._getCurrentVisiblePage()}return super._getVisiblePages()}_updateHelper(e){if(this.isInPresentationMode){return}let t=this._currentPageNumber;let r=false;for(const i of e){if(i.percent<100){break}if(i.id===t){r=true;break}}if(!r){t=e[0].id}this._setCurrentPageNumber(t)}}t.PDFViewer=n}])}))})(pdf_viewer$1);return pdf_viewer$1.exports}requirePdf_viewer();const findIn=(e,t,r=false,i=false)=>{const o=new Array;const{top:n,left:s,bottom:l,right:a}=t.getBoundingClientRect();e.forEach((e=>{if(e.getBoundingClientRect().bottom<=l&&e.getBoundingClientRect().top>=n&&e.getBoundingClientRect().left>=s&&e.getBoundingClientRect().right<=a){if(r)e.selected=true;o.push(e)}else{if(r&&!i)e.selected=false}}));return o};function addField(e,t){const r=this._template.elementConnection.templateElements;this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:[...r,t]}};const i=document.createElement("ls-editor-field");i.setAttribute("type",t.formElementType);i.setAttribute("id","ls-field-"+t.id);i.style.zIndex="100";i.style.position="absolute";i.style.top=Math.floor(t.top*this.zoom)+"px";i.style.left=Math.floor(t.left*this.zoom)+"px";i.style.height=Math.floor(t.height*this.zoom)+"px";i.style.width=Math.floor(t.width*this.zoom)+"px";i.style.fontSize=Math.floor(t.fontSize*this.zoom)+"pt";i.style.alignContent=t.align;i.style.fontFamily=t.fontName;i.dataItem=t;e.appendChild(i);return i}function moveField(e,t){e.style.top=Math.floor(t.top*this.zoom)+"px";e.style.left=Math.floor(t.left*this.zoom)+"px";e.style.height=Math.floor(t.height*this.zoom)+"px";e.style.width=Math.floor(t.width*this.zoom)+"px";e.style.fontSize=Math.floor(t.fontSize*this.zoom)+"pt";e.style.fontFamily=t.fontName;e.style.textAlign=t.align;e.dataItem=t}const findDimensions=(e,t,r,i,o)=>{const n=e.getBoundingClientRect();const{height:s,width:l}=t.getBoundingClientRect();const a=l/o;const d=s/o;const c=Math.floor((t.getBoundingClientRect().top-n.top)/o);const h=Math.floor((t.getBoundingClientRect().left-n.left)/o);const u=h>0?h/i:0;const f=c>0?c/r:0;const p=(h+a)/i;const g=(c+d)/r;return{top:c,left:h,height:s,width:l,ax:u,ay:f,bx:p,by:g}};const recalculateCoordinates=e=>{const t=e.left/e.pageDimensions.width;const r=e.top/e.pageDimensions.height;const i=(e.left+e.width)/e.pageDimensions.width;const o=(e.top+e.height)/e.pageDimensions.height;return{...e,ax:t,ay:r,bx:i,by:o}};const createRole=e=>{const t=e?.signerParent?`"${e.signerParent}"`:"null";return`\n mutation LDVAddRole {\n createTemplateRole(input: {\n templateId: "${e.templateId}" \n signerIndex: ${e.signerIndex}\n signerParent: ${t}\n name: ${JSON.stringify(e.name)}\n ordinal: ${e.ordinal}\n roleType: ${e.roleType}\n experience: "${e.experience}"\n })\n }`};const deleteRole=e=>`\n mutation LDVremoveRole {\n deleteTemplateRole(input: {\n templateRoleId: "${e.id}" \n })\n }`;const updateRole=e=>{const t=e?.signerParent?`"${e.signerParent}"`:"null";return`\n mutation LDVupdateRole {\n updateTemplateRole(input: {\n templateRoleId: "${e.id}" \n signerIndex: ${e.signerIndex}\n ordinal: ${e.ordinal}\n signerParent: ${t}\n name: ${JSON.stringify(e.name)}\n roleType: ${e.roleType}\n experience: "${e.experience}"\n })\n }`};const swapRoles=(e,t)=>`\n mutation LDVswapRole {\n swapRoles(input: {\n roleId1: "${e.id}" \n roleId2: "${t.id}"\n })\n }`;const getTemplateRoles=e=>`\n query LDVGetTemplate {\n template(id: "${e}") { \n roles{\n id\n name\n roleType\n signerIndex\n ordinal\n signerParent\n experience\n }\n }\n }\n `;function oob(e){if(e.left+e.width>e.pageDimensions.width||e.top<0||e.left<0||e.top+e.height>e.pageDimensions.height)return true;else return false}function alter(e){const t=this.selected.map((t=>({action:"update",data:e(t.dataItem)})));this.mutate.emit(t);this.update.emit(t)}function debounce$1(e,t=300){let r;return(...i)=>{clearTimeout(r);r=setTimeout((()=>{e.apply(this,i)}),t)}}function matchData(e){const t=e.result;const r=atob(e.obj.id).substring(0,3);const i=t[Object.keys(t)[0]];if(e.event.action==="create"){if(r==="ele"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.obj.id);t.setAttribute("id","ls-field-"+i);t.dataItem={...e.obj,id:i}}}if(r==="rol"){syncRoles.bind(this)()}if(r==="tpl"){this._template={...this._template,...e.obj}}}async function syncRoles(){var e=this.component.shadowRoot.getElementById("ls-participant-manager");const t=await this.adapter.execute(this.token,getTemplateRoles(this._template.id));this._template={...this._template,roles:t.template.roles};e.template=this._template}function getApiType(e){if(!e?.id)return"invalid";const t=atob(e.id);if(t.length<3)return"invalid";const r=atob(e.id).substring(0,3);switch(r){case"ele":return"element";case"rol":return"role";case"tpl":return"template";case"doc":return"document";default:return"unknown"}}const validationTypes=[{id:0,description:"general purpose",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:30,description:"yyyy/mm/dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:31,description:"yy/mm/dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:32,description:"dd/mm/yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:33,description:"dd/mm/yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:34,description:"mm/dd/yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:35,description:"mm/dd/yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:36,description:"yyyy.mm.dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:37,description:"yy.mm.dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:38,description:"dd.mm.yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:39,description:"dd.mm.yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:40,description:"mm.dd.yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:41,description:"mm.dd.yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:42,description:"yyyy-mm-dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:43,description:"yy-mm-dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:44,description:"dd-mm-yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:45,description:"dd-mm-yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:46,description:"mm-dd-yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:47,description:"mm-dd-yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:48,description:"d mmmm yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:73,description:"Secret Code",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:77,description:"Title caps (force text to title caps)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:78,description:"Uppercase (force text to uppercase)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:79,description:"Lowercase (force text to lowercase)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:65,description:"1 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:66,description:"2 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:67,description:"3 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:68,description:"4 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:69,description:"5 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:70,description:"6 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:71,description:"7 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:72,description:"8 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:1e3,description:"First name field (special use)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1001,description:"Last name field (special use)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1,description:"Email",formType:"email",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1002,description:"Email field (special use)",formType:"email",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:50,description:"Whole number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"number"},{id:51,description:"Number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:52,description:"Currency",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:53,description:"1 number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:54,description:"2 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:55,description:"3 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:56,description:"4 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:57,description:"5 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:58,description:"6 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:59,description:"7 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:60,description:"8 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:61,description:"9 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:62,description:"10 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:63,description:"11 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:64,description:"12 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:2,description:"yyyy/mm/dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"date"},{id:3,description:"yy/mm/dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:4,description:"dd/mm/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"date"},{id:5,description:"dd/mm/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:6,description:"mm/dd/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:7,description:"mm/dd/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:80,description:"mm/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:81,description:"mm/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:8,description:"yyyy.mm.dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:9,description:"yy.mm.dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:10,description:"dd.mm.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:11,description:"dd.mm.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:12,description:"mm.dd.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:13,description:"mm.dd.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:82,description:"mm.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:83,description:"mm.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:14,description:"yyyy-mm-dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:15,description:"yy-mm-dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:16,description:"dd-mm-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:17,description:"dd-mm-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:18,description:"mm-dd-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:19,description:"mm-dd-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:84,description:"mm-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:85,description:"mm-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:20,description:"Dropdown List",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:91,description:"Countries",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:92,description:"Name prefix titles",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:24,description:"✔/✗",formType:"checkbox",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"checkbox"},{id:25,description:"✔/empty",formType:"checkbox",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"checkbox"},{id:26,description:"✗/empty",formType:"checkbox",defaultHeight:16,defaultWidth:16,typeDefault:false,inputType:"checkbox"},{id:74,description:"File: attach to confirmatory email to sender",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"file"},{id:75,description:"File: append to PDF, PDF files only",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"file"},{id:76,description:"File: zip with PDF (for internal view, signed PDF for signer)",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"file"},{id:90,description:"Drawn field.",formType:"drawn field",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:2e3,description:"Initials",formType:"initials",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:93,description:"Regular Expression field",formType:"regular expression",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:3e3,description:"Auto Sign",formType:"auto sign",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:4e3,description:"Text Area",formType:"textarea",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"textarea"}];function getInputType(e){if(e===null)return validationTypes[0];const t=validationTypes.find((t=>t.id===e));return t===null?validationTypes[0]:t}function keyDown(e){if(this.selected&&this.selected?.length>0){const t=alter.bind(this);if(e.key==="ArrowDown"){t((e=>{const t={...e,top:e.top+1,ay:e.ay+1,by:e.by+1};return oob(t)?e:t}))}else if(e.key==="ArrowUp"){t((e=>{const t={...e,top:e.top-1,ay:e.ay-1,by:e.top-1};return oob(t)?e:t}))}else if(e.key==="ArrowRight"){t((e=>{const t={...e,left:e.left+1,ax:e.ax+1,bx:e.bx+1};return oob(t)?e:t}))}else if(e.key==="ArrowLeft"){t((e=>{const t={...e,left:e.left-1,ax:e.ax-1,bx:e.bx-1};return oob(t)?e:t}))}else if(e.key==="Delete"||e.key==="Backspace"){const e=Array.from(this.selected);this.mutate.emit(e.map((e=>({action:"delete",data:e.dataItem}))));this.update.emit(e.map((e=>({action:"delete",data:e.dataItem}))))}}}let mousetimer=null;function debounce(e,t){if(mousetimer)clearTimeout(mousetimer);mousetimer=setTimeout((()=>{this.mutate.emit([e])}),t)}function mouseDown(e){if(e.offsetX<0||e.offsetY<0)return;this.hitField=null;const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.forEach((t=>{const{left:r,top:i,height:o,width:n,bottom:s,right:l}=t.getBoundingClientRect();const a={left:t.offsetLeft,top:t.offsetTop,height:o,width:n,x:e.screenX,y:e.screenY};this.startMouse=a;if(Math.abs(e.clientX-r)<5&&e.clientY>=i&&e.clientY<=s){this.edgeSide="w";this.hitField=t}else if(Math.abs(e.clientX-l)<5&&e.clientY>=i&&e.clientY<=s){this.edgeSide="e";this.hitField=t}else if(Math.abs(e.clientY-i)<5&&e.clientX>=r&&e.clientX<=l){this.edgeSide="n";this.hitField=t}else if(Math.abs(e.clientY-s)<5&&e.clientX>=r&&e.clientX<=l){this.edgeSide="s";this.hitField=t}else if(e.clientY<=s&&e.clientY>=i&&e.clientX>=r&&e.clientX<=l){this.edgeSide=null;this.hitField=t}}));if(this.hitField&&e.shiftKey===false){var r=this.component.shadowRoot.getElementById("ls-box-selector");r.style.visibility="hidden";if(this.hitField.selected===false){t.forEach((e=>{e.selected=false}));this.selected=[this.hitField];this.selectFields.emit([this.hitField.dataItem])}const{height:i,width:o}=this.hitField.getBoundingClientRect();const n={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:i,width:o,x:e.screenX,y:e.screenY};this.startMouse=n;this.startLocations=this.selected.map((e=>{const{height:t,width:r}=e.getBoundingClientRect();const i=e;return{top:i.offsetTop,left:i.offsetLeft,height:t,width:r}}));this.selectionBox=null}else if(this.hitField&&e.shiftKey===true){var r=this.component.shadowRoot.getElementById("ls-box-selector");r.style.visibility="hidden";if(this.hitField.selected===false){t.forEach((e=>{e.selected=false}));this.selected=[...this.selected,this.hitField];this.selectFields.emit([...this.selected.map((e=>e.dataItem)),this.hitField.dataItem])}const{height:i,width:o}=this.hitField.getBoundingClientRect();const n={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:i,width:o,x:e.screenX,y:e.screenY};this.startMouse=n;this.startLocations=this.selected.map((e=>{const{height:t,width:r}=e.getBoundingClientRect();const i=e;return{top:i.offsetTop,left:i.offsetLeft,height:t,width:r}}));this.selectionBox=null}else{this.startLocations=null;this.startMouse=null;this.selectionBox={x:e.clientX,y:e.clientY};this.unselect();this.selectFields.emit([]);this.selected=[];this.component.style.cursor="crosshair"}}function mouseMove(e){e.preventDefault();if(this.hitField&&this.edgeSide&&this.startMouse&&e.buttons===1){const t=e.screenX-this.startMouse.x;const r=e.screenY-this.startMouse.y;switch(this.edgeSide){case"n":this.hitField.style.top=this.startMouse.top+r+"px";this.hitField.style.height=this.startMouse.height-r+"px";this.hitField.dataItem={...this.hitField.dataItem,top:this.startMouse.top+r,height:this.startMouse.height-r};break;case"s":this.hitField.style.height=this.startMouse.height+r+"px";this.hitField.dataItem={...this.hitField.dataItem,height:this.startMouse.height+r};break;case"e":this.hitField.style.width=this.startMouse.width+t+"px";this.hitField.dataItem={...this.hitField.dataItem,width:this.startMouse.width+t};break;case"w":this.hitField.style.left=this.startMouse.left+t+"px";this.hitField.style.width=this.startMouse.width-t+"px";this.hitField.dataItem={...this.hitField.dataItem,left:this.startMouse.left+t,width:this.startMouse.width-t};break}debounce.bind(this)({action:"update",data:recalculateCoordinates(this.hitField.dataItem)},700)}else if(this.selectionBox&&e.buttons===1){this.isBoxing=true;var t=this.component.shadowRoot.getElementById("ls-box-selector");var r=this.component.shadowRoot.getElementById("ls-document-frame");var i=r.getBoundingClientRect().left;var o=r.getBoundingClientRect().top;const n=e.clientX-this.selectionBox.x;const s=e.clientY-this.selectionBox.y;t.style.visibility="visible";t.style.left=(this.selectionBox.x>e.clientX?e.clientX:this.selectionBox.x)-i+r.scrollLeft+"px";t.style.top=(this.selectionBox.y>e.clientY?e.clientY:this.selectionBox.y)-o+r.scrollTop+"px";t.style.width=Math.abs(n)+"px";t.style.height=Math.abs(s)+"px"}else if(this.startLocations&&!this.edgeSide&&this.startMouse&&e.buttons===1){this.isMoving=true;var t=this.component.shadowRoot.getElementById("ls-box-selector");t.style.visibility="hidden";const r=e.screenX-this.startMouse.x;const i=e.screenY-this.startMouse.y;if(this.selected?.length){for(let e=0;e<this.selected.length;e++){this.selected[e].style.left=this.startLocations[e].left+r+"px";this.selected[e].style.top=this.startLocations[e].top+i+"px"}}}}function mouseUp(e){this.edgeSide=null;this.startMouse=null;this.component.style.cursor="auto";if(this.selectionBox&&this.isBoxing){this.isBoxing=false;var t=this.component.shadowRoot.getElementById("ls-box-selector");var r=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.style.visibility="hidden";this.selectionBox=null;const i=findIn(r,t,true,e.shiftKey);this.selected=Array.from(i);this.selectFields.emit(i.map((e=>e.dataItem)))}}function mouseClick(e){if(this.isMoving){this.isMoving=false;const e=this.component.shadowRoot.querySelectorAll("ls-editor-field");const t=this.component.shadowRoot.getElementById("ls-document-frame");const r=Array.from(e).filter((e=>e.selected));this.mutate.emit(Array.from(e).filter((e=>e.selected)).map((e=>{const r={...e.dataItem,...findDimensions(t,e,this.pageDimensions[this.pageNum-1].height,this.pageDimensions[this.pageNum-1].width,this.zoom)};e.dataItem=r;return{action:"update",data:r}})));this.selectFields.emit(r.map((e=>e.dataItem)))}else{this.selectionBox={x:e.clientX,y:e.clientY};const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.forEach((r=>{const{left:i,top:o,bottom:n,right:s}=r.getBoundingClientRect();if(e.clientY<=n&&e.clientY>=o&&e.clientX>=i&&e.clientX<=s){this.edgeSide=null;this.hitField=r;if(!e.shiftKey)t.forEach((e=>e.selected=false));r.selected=true}}));this.selected=Array.from(t).filter((e=>e.selected));this.selectFields.emit(this.selected.map((e=>e.dataItem)))}}function mouseDrop(e){e.preventDefault();try{const r=JSON.parse(e.dataTransfer.getData("application/json"));this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((e=>e.selected=false));var t=this.component.shadowRoot.getElementById("ls-document-frame");const i=btoa("ele"+crypto.randomUUID());const o=e.offsetY/this.zoom+t.scrollTop;const n=e.offsetX/this.zoom+t.scrollLeft;const s={action:"create",data:{id:i,value:"",formElementType:r.formElementType,elementType:r.elementType,validation:r.validation,substantive:false,top:o,left:n,hideBorder:false,height:r.defaultHeight,width:r.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:"arial",fontSize:10,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:false,options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:n>0?n/this.pageDimensions[this.pageNum-1].width:0,ay:o>0?o/this.pageDimensions[this.pageNum-1].height:0,bx:(n+r.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(o+r.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([s]);this.update.emit([s])}catch(e){console.error(e)}}
|
|
44
|
-
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */var axios_1;var hasRequiredAxios;function requireAxios(){if(hasRequiredAxios)return axios_1;hasRequiredAxios=1;function e(e,t){return function r(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype;const{getPrototypeOf:r}=Object;const{iterator:i,toStringTag:o}=Symbol;const n=(e=>r=>{const i=t.call(r);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null));const s=e=>{e=e.toLowerCase();return t=>n(t)===e};const l=e=>t=>typeof t===e;const{isArray:a}=Array;const d=l("undefined");function c(e){return e!==null&&!d(e)&&e.constructor!==null&&!d(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=s("ArrayBuffer");function u(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&h(e.buffer)}return t}const f=l("string");const p=l("function");const g=l("number");const v=e=>e!==null&&typeof e==="object";const C=e=>e===true||e===false;const m=e=>{if(n(e)!=="object"){return false}const t=r(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(o in e)&&!(i in e)};const w=e=>{if(!v(e)||c(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return false}};const b=s("Date");const y=s("File");const x=s("Blob");const k=s("FileList");const M=e=>v(e)&&p(e.pipe);const L=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||p(e.append)&&((t=n(e))==="formdata"||t==="object"&&p(e.toString)&&e.toString()==="[object FormData]"))};const H=s("URLSearchParams");const[V,A,Z,S]=["ReadableStream","Request","Response","Headers"].map(s);const O=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let i;let o;if(typeof e!=="object"){e=[e]}if(a(e)){for(i=0,o=e.length;i<o;i++){t.call(null,e[i],i,e)}}else{if(c(e)){return}const o=r?Object.getOwnPropertyNames(e):Object.keys(e);const n=o.length;let s;for(i=0;i<n;i++){s=o[i];t.call(null,e[s],s,e)}}}function B(e,t){if(c(e)){return null}t=t.toLowerCase();const r=Object.keys(e);let i=r.length;let o;while(i-- >0){o=r[i];if(t===o.toLowerCase()){return o}}return null}const P=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:commonjsGlobal})();const _=e=>!d(e)&&e!==P;function j(){const{caseless:e,skipUndefined:t}=_(this)&&this||{};const r={};const i=(i,o)=>{const n=e&&B(r,o)||o;if(m(r[n])&&m(i)){r[n]=j(r[n],i)}else if(m(i)){r[n]=j({},i)}else if(a(i)){r[n]=i.slice()}else if(!t||!d(i)){r[n]=i}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&T(arguments[e],i)}return r}const E=(t,r,i,{allOwnKeys:o}={})=>{T(r,((r,o)=>{if(i&&p(r)){t[o]=e(r,i)}else{t[o]=r}}),{allOwnKeys:o});return t};const R=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const D=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};const I=(e,t,i,o)=>{let n;let s;let l;const a={};t=t||{};if(e==null)return t;do{n=Object.getOwnPropertyNames(e);s=n.length;while(s-- >0){l=n[s];if((!o||o(l,e,t))&&!a[l]){t[l]=e[l];a[l]=true}}e=i!==false&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t};const F=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r};const N=e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};const z=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&r(Uint8Array));const $=(e,t)=>{const r=e&&e[i];const o=r.call(e);let n;while((n=o.next())&&!n.done){const r=n.value;t.call(e,r[0],r[1])}};const W=(e,t)=>{let r;const i=[];while((r=e.exec(t))!==null){i.push(r)}return i};const U=s("HTMLFormElement");const G=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,i){return r.toUpperCase()+i}));const q=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);const Y=s("RegExp");const X=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const i={};T(r,((r,o)=>{let n;if((n=t(r,o,e))!==false){i[o]=n||r}}));Object.defineProperties(e,i)};const J=e=>{X(e,((t,r)=>{if(p(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const i=e[r];if(!p(i))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}}))};const Q=(e,t)=>{const r={};const i=e=>{e.forEach((e=>{r[e]=true}))};a(e)?i(e):i(String(e).split(t));return r};const K=()=>{};const ee=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function te(e){return!!(e&&p(e.append)&&e[o]==="FormData"&&e[i])}const re=e=>{const t=new Array(10);const r=(e,i)=>{if(v(e)){if(t.indexOf(e)>=0){return}if(c(e)){return e}if(!("toJSON"in e)){t[i]=e;const o=a(e)?[]:{};T(e,((e,t)=>{const n=r(e,i+1);!d(n)&&(o[t]=n)}));t[i]=undefined;return o}}return e};return r(e,0)};const ie=s("AsyncFunction");const oe=e=>e&&(v(e)||p(e))&&p(e.then)&&p(e.catch);const ne=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{P.addEventListener("message",(({source:r,data:i})=>{if(r===P&&i===e){t.length&&t.shift()()}}),false);return r=>{t.push(r);P.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",p(P.postMessage));const se=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(P):typeof process!=="undefined"&&process.nextTick||ne;const le=e=>e!=null&&p(e[i]);var ae={isArray:a,isArrayBuffer:h,isBuffer:c,isFormData:L,isArrayBufferView:u,isString:f,isNumber:g,isBoolean:C,isObject:v,isPlainObject:m,isEmptyObject:w,isReadableStream:V,isRequest:A,isResponse:Z,isHeaders:S,isUndefined:d,isDate:b,isFile:y,isBlob:x,isRegExp:Y,isFunction:p,isStream:M,isURLSearchParams:H,isTypedArray:z,isFileList:k,forEach:T,merge:j,extend:E,trim:O,stripBOM:R,inherits:D,toFlatObject:I,kindOf:n,kindOfTest:s,endsWith:F,toArray:N,forEachEntry:$,matchAll:W,isHTMLForm:U,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:X,freezeMethods:J,toObjectSet:Q,toCamelCase:G,noop:K,toFiniteNumber:ee,findKey:B,global:P,isContextDefined:_,isSpecCompliantForm:te,toJSONObject:re,isAsyncFn:ie,isThenable:oe,setImmediate:ne,asap:se,isIterable:le};function de(e,t,r,i,o){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);i&&(this.request=i);if(o){this.response=o;this.status=o.status?o.status:null}}ae.inherits(de,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const ce=de.prototype;const he={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{he[e]={value:e}}));Object.defineProperties(de,he);Object.defineProperty(ce,"isAxiosError",{value:true});de.from=(e,t,r,i,o,n)=>{const s=Object.create(ce);ae.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));const l=e&&e.message?e.message:"Error";const a=t==null&&e?e.code:t;de.call(s,l,a,r,i,o);if(e&&s.cause==null){Object.defineProperty(s,"cause",{value:e,configurable:true})}s.name=e&&e.name||"Error";n&&Object.assign(s,n);return s};var ue=null;function fe(e){return ae.isPlainObject(e)||ae.isArray(e)}function pe(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,i){t=pe(t);return!r&&i?"["+t+"]":t})).join(r?".":"")}function ve(e){return ae.isArray(e)&&!e.some(fe)}const Ce=ae.toFlatObject(ae,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function me(e,t,r){if(!ae.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=ae.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!ae.isUndefined(r[t])}));const i=r.metaTokens;const o=r.visitor||c;const n=r.dots;const s=r.indexes;const l=r.Blob||typeof Blob!=="undefined"&&Blob;const a=l&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o)){throw new TypeError("visitor must be a function")}function d(e){if(e===null)return"";if(ae.isDate(e)){return e.toISOString()}if(ae.isBoolean(e)){return e.toString()}if(!a&&ae.isBlob(e)){throw new de("Blob is not supported. Use a Buffer instead.")}if(ae.isArrayBuffer(e)||ae.isTypedArray(e)){return a&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,o){let l=e;if(e&&!o&&typeof e==="object"){if(ae.endsWith(r,"{}")){r=i?r:r.slice(0,-2);e=JSON.stringify(e)}else if(ae.isArray(e)&&ve(e)||(ae.isFileList(e)||ae.endsWith(r,"[]"))&&(l=ae.toArray(e))){r=pe(r);l.forEach((function e(i,o){!(ae.isUndefined(i)||i===null)&&t.append(s===true?ge([r],o,n):s===null?r:r+"[]",d(i))}));return false}}if(fe(e)){return true}t.append(ge(o,r,n),d(e));return false}const h=[];const u=Object.assign(Ce,{defaultVisitor:c,convertValue:d,isVisitable:fe});function f(e,r){if(ae.isUndefined(e))return;if(h.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}h.push(e);ae.forEach(e,(function e(i,n){const s=!(ae.isUndefined(i)||i===null)&&o.call(t,i,ae.isString(n)?n.trim():n,r,u);if(s===true){f(i,r?r.concat(n):[n])}}));h.pop()}if(!ae.isObject(e)){throw new TypeError("data must be an object")}f(e);return t}function we(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function be(e,t){this._pairs=[];e&&me(e,this,t)}const ye=be.prototype;ye.append=function e(t,r){this._pairs.push([t,r])};ye.toString=function e(t){const r=t?function(e){return t.call(this,e,we)}:we;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function xe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ke(e,t,r){if(!t){return e}const i=r&&r.encode||xe;if(ae.isFunction(r)){r={serialize:r}}const o=r&&r.serialize;let n;if(o){n=o(t,r)}else{n=ae.isURLSearchParams(t)?t.toString():new be(t,r).toString(i)}if(n){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+n}return e}class Me{constructor(){this.handlers=[]}use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){ae.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))}}var Le=Me;var He={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ve=typeof URLSearchParams!=="undefined"?URLSearchParams:be;var Ae=typeof FormData!=="undefined"?FormData:null;var Ze=typeof Blob!=="undefined"?Blob:null;var Se={isBrowser:true,classes:{URLSearchParams:Ve,FormData:Ae,Blob:Ze},protocols:["http","https","file","blob","url","data"]};const Oe=typeof window!=="undefined"&&typeof document!=="undefined";const Te=typeof navigator==="object"&&navigator||undefined;const Be=Oe&&(!Te||["ReactNative","NativeScript","NS"].indexOf(Te.product)<0);const Pe=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const _e=Oe&&window.location.href||"http://localhost";var je=Object.freeze({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserWebWorkerEnv:Pe,hasStandardBrowserEnv:Be,navigator:Te,origin:_e});var Ee={...je,...Se};function Re(e,t){return me(e,new Ee.classes.URLSearchParams,{visitor:function(e,t,r,i){if(Ee.isNode&&ae.isBuffer(e)){this.append(t,e.toString("base64"));return false}return i.defaultVisitor.apply(this,arguments)},...t})}function De(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function Ie(e){const t={};const r=Object.keys(e);let i;const o=r.length;let n;for(i=0;i<o;i++){n=r[i];t[n]=e[n]}return t}function Fe(e){function t(e,r,i,o){let n=e[o++];if(n==="__proto__")return true;const s=Number.isFinite(+n);const l=o>=e.length;n=!n&&ae.isArray(i)?i.length:n;if(l){if(ae.hasOwnProp(i,n)){i[n]=[i[n],r]}else{i[n]=r}return!s}if(!i[n]||!ae.isObject(i[n])){i[n]=[]}const a=t(e,r,i[n],o);if(a&&ae.isArray(i[n])){i[n]=Ie(i[n])}return!s}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};ae.forEachEntry(e,((e,i)=>{t(De(e),i,r,0)}));return r}return null}function Ne(e,t,r){if(ae.isString(e)){try{(0,JSON.parse)(e);return ae.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const ze={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function e(t,r){const i=r.getContentType()||"";const o=i.indexOf("application/json")>-1;const n=ae.isObject(t);if(n&&ae.isHTMLForm(t)){t=new FormData(t)}const s=ae.isFormData(t);if(s){return o?JSON.stringify(Fe(t)):t}if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)||ae.isReadableStream(t)){return t}if(ae.isArrayBufferView(t)){return t.buffer}if(ae.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let l;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1){return Re(t,this.formSerializer).toString()}if((l=ae.isFileList(t))||i.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return me(l?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(n||o){r.setContentType("application/json",false);return Ne(t)}return t}],transformResponse:[function e(t){const r=this.transitional||ze.transitional;const i=r&&r.forcedJSONParsing;const o=this.responseType==="json";if(ae.isResponse(t)||ae.isReadableStream(t)){return t}if(t&&ae.isString(t)&&(i&&!this.responseType||o)){const e=r&&r.silentJSONParsing;const i=!e&&o;try{return JSON.parse(t,this.parseReviver)}catch(e){if(i){if(e.name==="SyntaxError"){throw de.from(e,de.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ee.classes.FormData,Blob:Ee.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};ae.forEach(["delete","get","head","post","put","patch"],(e=>{ze.headers[e]={}}));var $e=ze;const We=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ue=e=>{const t={};let r;let i;let o;e&&e.split("\n").forEach((function e(n){o=n.indexOf(":");r=n.substring(0,o).trim().toLowerCase();i=n.substring(o+1).trim();if(!r||t[r]&&We[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(i)}else{t[r]=[i]}}else{t[r]=t[r]?t[r]+", "+i:i}}));return t};const Ge=Symbol("internals");function qe(e){return e&&String(e).trim().toLowerCase()}function Ye(e){if(e===false||e==null){return e}return ae.isArray(e)?e.map(Ye):String(e)}function Xe(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=r.exec(e)){t[i[1]]=i[2]}return t}const Je=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qe(e,t,r,i,o){if(ae.isFunction(i)){return i.call(this,t,r)}if(o){t=r}if(!ae.isString(t))return;if(ae.isString(i)){return t.indexOf(i)!==-1}if(ae.isRegExp(i)){return i.test(t)}}function Ke(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function et(e,t){const r=ae.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+r,{value:function(e,r,o){return this[i].call(this,t,e,r,o)},configurable:true})}))}class tt{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(e,t,r){const o=qe(t);if(!o){throw new Error("header name must be a non-empty string")}const n=ae.findKey(i,o);if(!n||i[n]===undefined||r===true||r===undefined&&i[n]!==false){i[n||t]=Ye(e)}}const n=(e,t)=>ae.forEach(e,((e,r)=>o(e,r,t)));if(ae.isPlainObject(e)||e instanceof this.constructor){n(e,t)}else if(ae.isString(e)&&(e=e.trim())&&!Je(e)){n(Ue(e),t)}else if(ae.isObject(e)&&ae.isIterable(e)){let r={},i,o;for(const t of e){if(!ae.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[o=t[0]]=(i=r[o])?ae.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}n(r,t)}else{e!=null&&o(t,e,r)}return this}get(e,t){e=qe(e);if(e){const r=ae.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return Xe(e)}if(ae.isFunction(t)){return t.call(this,e,r)}if(ae.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=qe(e);if(e){const r=ae.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Qe(this,this[r],r,t)))}return false}delete(e,t){const r=this;let i=false;function o(e){e=qe(e);if(e){const o=ae.findKey(r,e);if(o&&(!t||Qe(r,r[o],o,t))){delete r[o];i=true}}}if(ae.isArray(e)){e.forEach(o)}else{o(e)}return i}clear(e){const t=Object.keys(this);let r=t.length;let i=false;while(r--){const o=t[r];if(!e||Qe(this,this[o],o,e,true)){delete this[o];i=true}}return i}normalize(e){const t=this;const r={};ae.forEach(this,((i,o)=>{const n=ae.findKey(r,o);if(n){t[n]=Ye(i);delete t[o];return}const s=e?Ke(o):String(o).trim();if(s!==o){delete t[o]}t[s]=Ye(i);r[s]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);ae.forEach(this,((r,i)=>{r!=null&&r!==false&&(t[i]=e&&ae.isArray(r)?r.join(", "):r)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach((e=>r.set(e)));return r}static accessor(e){const t=this[Ge]=this[Ge]={accessors:{}};const r=t.accessors;const i=this.prototype;function o(e){const t=qe(e);if(!r[t]){et(i,e);r[t]=true}}ae.isArray(e)?e.forEach(o):o(e);return this}}tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(tt.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}));ae.freezeMethods(tt);var rt=tt;function it(e,t){const r=this||$e;const i=t||r;const o=rt.from(i.headers);let n=i.data;ae.forEach(e,(function e(i){n=i.call(r,n,o.normalize(),t?t.status:undefined)}));o.normalize();return n}function ot(e){return!!(e&&e.__CANCEL__)}function nt(e,t,r){de.call(this,e==null?"canceled":e,de.ERR_CANCELED,t,r);this.name="CanceledError"}ae.inherits(nt,de,{__CANCEL__:true});function st(e,t,r){const i=r.config.validateStatus;if(!r.status||!i||i(r.status)){e(r)}else{t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}function lt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function at(e,t){e=e||10;const r=new Array(e);const i=new Array(e);let o=0;let n=0;let s;t=t!==undefined?t:1e3;return function l(a){const d=Date.now();const c=i[n];if(!s){s=d}r[o]=a;i[o]=d;let h=n;let u=0;while(h!==o){u+=r[h++];h=h%e}o=(o+1)%e;if(o===n){n=(n+1)%e}if(d-s<t){return}const f=c&&d-c;return f?Math.round(u*1e3/f):undefined}}function dt(e,t){let r=0;let i=1e3/t;let o;let n;const s=(t,i=Date.now())=>{r=i;o=null;if(n){clearTimeout(n);n=null}e(...t)};const l=(...e)=>{const t=Date.now();const l=t-r;if(l>=i){s(e,t)}else{o=e;if(!n){n=setTimeout((()=>{n=null;s(o)}),i-l)}}};const a=()=>o&&s(o);return[l,a]}const ct=(e,t,r=3)=>{let i=0;const o=at(50,250);return dt((r=>{const n=r.loaded;const s=r.lengthComputable?r.total:undefined;const l=n-i;const a=o(l);const d=n<=s;i=n;const c={loaded:n,total:s,progress:s?n/s:undefined,bytes:l,rate:a?a:undefined,estimated:a&&s&&d?(s-n)/a:undefined,event:r,lengthComputable:s!=null,[t?"download":"upload"]:true};e(c)}),r)};const ht=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]};const ut=e=>(...t)=>ae.asap((()=>e(...t)));var ft=Ee.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,Ee.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>true;var pt=Ee.hasStandardBrowserEnv?{write(e,t,r,i,o,n){const s=[e+"="+encodeURIComponent(t)];ae.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());ae.isString(i)&&s.push("path="+i);ae.isString(o)&&s.push("domain="+o);n===true&&s.push("secure");document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ct(e,t,r){let i=!gt(t);if(e&&(i||r==false)){return vt(e,t)}return t}const mt=e=>e instanceof rt?{...e}:e;function wt(e,t){t=t||{};const r={};function i(e,t,r,i){if(ae.isPlainObject(e)&&ae.isPlainObject(t)){return ae.merge.call({caseless:i},e,t)}else if(ae.isPlainObject(t)){return ae.merge({},t)}else if(ae.isArray(t)){return t.slice()}return t}function o(e,t,r,o){if(!ae.isUndefined(t)){return i(e,t,r,o)}else if(!ae.isUndefined(e)){return i(undefined,e,r,o)}}function n(e,t){if(!ae.isUndefined(t)){return i(undefined,t)}}function s(e,t){if(!ae.isUndefined(t)){return i(undefined,t)}else if(!ae.isUndefined(e)){return i(undefined,e)}}function l(r,o,n){if(n in t){return i(r,o)}else if(n in e){return i(undefined,r)}}const a={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(e,t,r)=>o(mt(e),mt(t),r,true)};ae.forEach(Object.keys({...e,...t}),(function i(n){const s=a[n]||o;const d=s(e[n],t[n],n);ae.isUndefined(d)&&s!==l||(r[n]=d)}));return r}var bt=e=>{const t=wt({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:n,headers:s,auth:l}=t;t.headers=s=rt.from(s);t.url=ke(Ct(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);if(l){s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")))}if(ae.isFormData(r)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv){s.setContentType(undefined)}else if(ae.isFunction(r.getHeaders)){const e=r.getHeaders();const t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{if(t.includes(e.toLowerCase())){s.set(e,r)}}))}}if(Ee.hasStandardBrowserEnv){i&&ae.isFunction(i)&&(i=i(t));if(i||i!==false&&ft(t.url)){const e=o&&n&&pt.read(n);if(e){s.set(o,e)}}}return t};const yt=typeof XMLHttpRequest!=="undefined";var xt=yt&&function(e){return new Promise((function t(r,i){const o=bt(e);let n=o.data;const s=rt.from(o.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:d}=o;let c;let h,u;let f,p;function g(){f&&f();p&&p();o.cancelToken&&o.cancelToken.unsubscribe(c);o.signal&&o.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,true);v.timeout=o.timeout;function C(){if(!v){return}const t=rt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());const o=!l||l==="text"||l==="json"?v.responseText:v.response;const n={data:o,status:v.status,statusText:v.statusText,headers:t,config:e,request:v};st((function e(t){r(t);g()}),(function e(t){i(t);g()}),n);v=null}if("onloadend"in v){v.onloadend=C}else{v.onreadystatechange=function e(){if(!v||v.readyState!==4){return}if(v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)){return}setTimeout(C)}}v.onabort=function t(){if(!v){return}i(new de("Request aborted",de.ECONNABORTED,e,v));v=null};v.onerror=function t(r){const o=r&&r.message?r.message:"Network Error";const n=new de(o,de.ERR_NETWORK,e,v);n.event=r||null;i(n);v=null};v.ontimeout=function t(){let r=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const n=o.transitional||He;if(o.timeoutErrorMessage){r=o.timeoutErrorMessage}i(new de(r,n.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,v));v=null};n===undefined&&s.setContentType(null);if("setRequestHeader"in v){ae.forEach(s.toJSON(),(function e(t,r){v.setRequestHeader(r,t)}))}if(!ae.isUndefined(o.withCredentials)){v.withCredentials=!!o.withCredentials}if(l&&l!=="json"){v.responseType=o.responseType}if(d){[u,p]=ct(d,true);v.addEventListener("progress",u)}if(a&&v.upload){[h,f]=ct(a);v.upload.addEventListener("progress",h);v.upload.addEventListener("loadend",f)}if(o.cancelToken||o.signal){c=t=>{if(!v){return}i(!t||t.type?new nt(null,e,v):t);v.abort();v=null};o.cancelToken&&o.cancelToken.subscribe(c);if(o.signal){o.signal.aborted?c():o.signal.addEventListener("abort",c)}}const m=lt(o.url);if(m&&Ee.protocols.indexOf(m)===-1){i(new de("Unsupported protocol "+m+":",de.ERR_BAD_REQUEST,e));return}v.send(n||null)}))};const kt=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let i;const o=function(e){if(!i){i=true;s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof de?t:new nt(t instanceof Error?t.message:t))}};let n=t&&setTimeout((()=>{n=null;o(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))}),t);const s=()=>{if(e){n&&clearTimeout(n);n=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}));e=null}};e.forEach((e=>e.addEventListener("abort",o)));const{signal:l}=r;l.unsubscribe=()=>ae.asap(s);return l}};var Mt=kt;const Lt=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0;let o;while(i<r){o=i+t;yield e.slice(i,o);i=o}};const Ht=async function*(e,t){for await(const r of Vt(e)){yield*Lt(r,t)}};const Vt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const At=(e,t,r,i)=>{const o=Ht(e,t);let n=0;let s;let l=e=>{if(!s){s=true;i&&i(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await o.next();if(t){l();e.close();return}let s=i.byteLength;if(r){let e=n+=s;r(e)}e.enqueue(new Uint8Array(i))}catch(e){l(e);throw e}},cancel(e){l(e);return o.return()}},{highWaterMark:2})};const Zt=64*1024;const{isFunction:St}=ae;const Ot=(({Request:e,Response:t})=>({Request:e,Response:t}))(ae.global);const{ReadableStream:Tt,TextEncoder:Bt}=ae.global;const Pt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const _t=e=>{e=ae.merge.call({skipUndefined:true},Ot,e);const{fetch:t,Request:r,Response:i}=e;const o=t?St(t):typeof fetch==="function";const n=St(r);const s=St(i);if(!o){return false}const l=o&&St(Tt);const a=o&&(typeof Bt==="function"?(e=>t=>e.encode(t))(new Bt):async e=>new Uint8Array(await new r(e).arrayBuffer()));const d=n&&l&&Pt((()=>{let e=false;const t=new r(Ee.origin,{body:new Tt,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const c=s&&l&&Pt((()=>ae.isReadableStream(new i("").body)));const h={stream:c&&(e=>e.body)};o&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!h[e]&&(h[e]=(t,r)=>{let i=t&&t[e];if(i){return i.call(t)}throw new de(`Response type '${e}' is not supported`,de.ERR_NOT_SUPPORT,r)})}))})();const u=async e=>{if(e==null){return 0}if(ae.isBlob(e)){return e.size}if(ae.isSpecCompliantForm(e)){const t=new r(Ee.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(ae.isArrayBufferView(e)||ae.isArrayBuffer(e)){return e.byteLength}if(ae.isURLSearchParams(e)){e=e+""}if(ae.isString(e)){return(await a(e)).byteLength}};const f=async(e,t)=>{const r=ae.toFiniteNumber(e.getContentLength());return r==null?u(t):r};return async e=>{let{url:o,method:s,data:l,signal:a,cancelToken:u,timeout:p,onDownloadProgress:g,onUploadProgress:v,responseType:C,headers:m,withCredentials:w="same-origin",fetchOptions:b}=bt(e);let y=t||fetch;C=C?(C+"").toLowerCase():"text";let x=Mt([a,u&&u.toAbortSignal()],p);let k=null;const M=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let L;try{if(v&&d&&s!=="get"&&s!=="head"&&(L=await f(m,l))!==0){let e=new r(o,{method:"POST",body:l,duplex:"half"});let t;if(ae.isFormData(l)&&(t=e.headers.get("content-type"))){m.setContentType(t)}if(e.body){const[t,r]=ht(L,ct(ut(v)));l=At(e.body,Zt,t,r)}}if(!ae.isString(w)){w=w?"include":"omit"}const t=n&&"credentials"in r.prototype;const a={...b,signal:x,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:l,duplex:"half",credentials:t?w:undefined};k=n&&new r(o,a);let u=await(n?y(k,b):y(o,a));const p=c&&(C==="stream"||C==="response");if(c&&(g||p&&M)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=u[t]}));const t=ae.toFiniteNumber(u.headers.get("content-length"));const[r,o]=g&&ht(t,ct(ut(g),true))||[];u=new i(At(u.body,Zt,r,(()=>{o&&o();M&&M()})),e)}C=C||"text";let H=await h[ae.findKey(h,C)||"text"](u,e);!p&&M&&M();return await new Promise(((t,r)=>{st(t,r,{data:H,headers:rt.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:k})}))}catch(t){M&&M();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new de("Network Error",de.ERR_NETWORK,e,k),{cause:t.cause||t})}throw de.from(t,t&&t.code,e,k)}}};const jt=new Map;const Et=e=>{let t=e?e.env:{};const{fetch:r,Request:i,Response:o}=t;const n=[i,o,r];let s=n.length,l=s,a,d,c=jt;while(l--){a=n[l];d=c.get(a);d===undefined&&c.set(a,d=l?new Map:_t(t));c=d}return d};Et();const Rt={http:ue,xhr:xt,fetch:{get:Et}};ae.forEach(Rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Dt=e=>`- ${e}`;const It=e=>ae.isFunction(e)||e===null||e===false;var Ft={getAdapter:(e,t)=>{e=ae.isArray(e)?e:[e];const{length:r}=e;let i;let o;const n={};for(let s=0;s<r;s++){i=e[s];let r;o=i;if(!It(i)){o=Rt[(r=String(i)).toLowerCase()];if(o===undefined){throw new de(`Unknown adapter '${r}'`)}}if(o&&(ae.isFunction(o)||(o=o.get(t)))){break}n[r||"#"+s]=o}if(!o){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let t=r?e.length>1?"since :\n"+e.map(Dt).join("\n"):" "+Dt(e[0]):"as no adapter specified";throw new de(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return o},adapters:Rt};function Nt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new nt(null,e)}}function zt(e){Nt(e);e.headers=rt.from(e.headers);e.data=it.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Ft.getAdapter(e.adapter||$e.adapter,e);return t(e).then((function t(r){Nt(e);r.data=it.call(e,e.transformResponse,r);r.headers=rt.from(r.headers);return r}),(function t(r){if(!ot(r)){Nt(e);if(r&&r.response){r.response.data=it.call(e,e.transformResponse,r.response);r.response.headers=rt.from(r.response.headers)}}return Promise.reject(r)}))}const $t="1.12.2";const Wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Wt[e]=function r(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ut={};Wt.transitional=function e(t,r,i){function o(e,t){return"[Axios v"+$t+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(e,i,n)=>{if(t===false){throw new de(o(i," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED)}if(r&&!Ut[i]){Ut[i]=true;console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,i,n):true}};Wt.spelling=function e(t){return(e,r)=>{console.warn(`${r} is likely a misspelling of ${t}`);return true}};function Gt(e,t,r){if(typeof e!=="object"){throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE)}const i=Object.keys(e);let o=i.length;while(o-- >0){const n=i[o];const s=t[n];if(s){const t=e[n];const r=t===undefined||s(t,n,e);if(r!==true){throw new de("option "+n+" must be "+r,de.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new de("Unknown option "+n,de.ERR_BAD_OPTION)}}}var qt={assertOptions:Gt,validators:Wt};const Yt=qt.validators;class Xt{constructor(e){this.defaults=e||{};this.interceptors={request:new Le,response:new Le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=wt(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;if(r!==undefined){qt.assertOptions(r,{silentJSONParsing:Yt.transitional(Yt.boolean),forcedJSONParsing:Yt.transitional(Yt.boolean),clarifyTimeoutError:Yt.transitional(Yt.boolean)},false)}if(i!=null){if(ae.isFunction(i)){t.paramsSerializer={serialize:i}}else{qt.assertOptions(i,{encode:Yt.function,serialize:Yt.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}qt.assertOptions(t,{baseUrl:Yt.spelling("baseURL"),withXsrfToken:Yt.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=o&&ae.merge(o.common,o[t.method]);o&&ae.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]}));t.headers=rt.concat(n,o);const s=[];let l=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}l=l&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));const a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));let d;let c=0;let h;if(!l){const e=[zt.bind(this),undefined];e.unshift(...s);e.push(...a);h=e.length;d=Promise.resolve(t);while(c<h){d=d.then(e[c++],e[c++])}return d}h=s.length;let u=t;while(c<h){const e=s[c++];const t=s[c++];try{u=e(u)}catch(e){t.call(this,e);break}}try{d=zt.call(this,u)}catch(e){return Promise.reject(e)}c=0;h=a.length;while(c<h){d=d.then(a[c++],a[c++])}return d}getUri(e){e=wt(this.defaults,e);const t=Ct(e.baseURL,e.url,e.allowAbsoluteUrls);return ke(t,e.params,e.paramsSerializer)}}ae.forEach(["delete","get","head","options"],(function e(t){Xt.prototype[t]=function(e,r){return this.request(wt(r||{},{method:t,url:e,data:(r||{}).data}))}}));ae.forEach(["post","put","patch"],(function e(t){function r(e){return function r(i,o,n){return this.request(wt(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Xt.prototype[t]=r();Xt.prototype[t+"Form"]=r(true)}));var Jt=Xt;class Qt{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(r){t=r}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=e=>{let t;const i=new Promise((e=>{r.subscribe(e);t=e})).then(e);i.cancel=function e(){r.unsubscribe(t)};return i};e((function e(i,o,n){if(r.reason){return}r.reason=new nt(i,o,n);t(r.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new Qt((function t(r){e=r}));return{token:t,cancel:e}}}var Kt=Qt;function er(e){return function t(r){return e.apply(null,r)}}function tr(e){return ae.isObject(e)&&e.isAxiosError===true}const rr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rr).forEach((([e,t])=>{rr[t]=e}));var ir=rr;function or(t){const r=new Jt(t);const i=e(Jt.prototype.request,r);ae.extend(i,Jt.prototype,r,{allOwnKeys:true});ae.extend(i,r,null,{allOwnKeys:true});i.create=function e(r){return or(wt(t,r))};return i}const nr=or($e);nr.Axios=Jt;nr.CanceledError=nt;nr.CancelToken=Kt;nr.isCancel=ot;nr.VERSION=$t;nr.toFormData=me;nr.AxiosError=de;nr.Cancel=nr.CanceledError;nr.all=function e(t){return Promise.all(t)};nr.spread=er;nr.isAxiosError=tr;nr.mergeConfig=wt;nr.AxiosHeaders=rt;nr.formToJSON=e=>Fe(ae.isHTMLForm(e)?new FormData(e):e);nr.getAdapter=Ft.getAdapter;nr.HttpStatusCode=ir;nr.default=nr;axios_1=nr;return axios_1}var axiosExports=requireAxios();var axios=getDefaultExportFromCjs(axiosExports);const Parameters={endpoints:{graphQL:"https://dypxviim4zgwtpev7valhchaem.appsync-api.eu-west-2.amazonaws.com/graphql"}};const createElement=e=>`\n mutation AddField {\n createTemplateElement(input: {\n templateId: "${e.templateId}", \n ax: ${e.ax}, \n ay: ${e.ay}, \n bx: ${e.bx}, \n by: ${e.by}, \n elementType: ${JSON.stringify(e.elementType)}, \n role: "1",\n label: ${JSON.stringify(e.label)}, \n page: ${e.page}, \n fieldOrder: ${e.fieldOrder}, \n fontName: ${JSON.stringify(e.fontName)}, \n fontSize: ${e.fontSize}, \n helpText: ${JSON.stringify(e.helpText)}, \n hideBorder: ${e.hideBorder}, \n logicGroup: ${JSON.stringify(e.logicGroup)}, \n mapTo: ${JSON.stringify(e.mapTo)}, \n optional: ${e.optional}, \n options: ${JSON.stringify(e.options)}, \n substantive: ${e.substantive}, \n validation: ${e.validation}, \n value: ${JSON.stringify(e.value)}, \n align: ${JSON.stringify(e.align)}, \n signer: ${e.signer}, \n logicAction: ${e.logicAction}, \n labelExtra: ${JSON.stringify(e.labelExtra)}})\n }`;const updateElement=e=>`mutation ChangeField {\n updateTemplateElement(input: {\n templateElementId: "${e.id}", \n ax: ${e.ax}, \n ay: ${e.ay}, \n bx: ${e.bx}, \n by: ${e.by}, \n elementType: ${JSON.stringify(e.elementType)}, \n label: ${JSON.stringify(e.label)}, \n page: ${e.page}, \n fieldOrder: ${e.fieldOrder?e.fieldOrder:null}, \n fontName: ${JSON.stringify(e.fontName)}, \n fontSize: ${e.fontSize}, \n helpText: "${e.helpText}", \n hideBorder: ${e.hideBorder}, \n logicGroup: ${JSON.stringify(e.logicGroup)}, \n mapTo: "${e.mapTo}", \n optional: ${e.optional}, \n options: ${JSON.stringify(e.options)}, \n role: "1", \n substantive: ${e.substantive}, \n validation: ${e.validation==="0"?"null":e.validation}, \n value: "${e.value}", \n align: "${e.align}", \n signer: ${e.signer}, \n logicAction: ${e.logicAction}, \n labelExtra: "${e.labelExtra}"})\n}`;const deleteElement=e=>`mutation DeleteField {\n deleteTemplateElement(input: {\n templateElementId: "${e.id}"})\n }`;const updateTemplate=e=>`\n mutation LDVupdateTemplate {\n updateTemplate(input: {\n templateId: "${e.id}", \n title: "${e.title}",\n locked: ${e.locked},\n autoArchive: ${e.autoArchive},\n fixSignatureScale: ${e.fixSignatureScale?e.fixSignatureScale:false}\n })\n }\n `;const getTemplate=e=>`\n query LDVGetTemplate {\n template(id: "${e}") {\n id\n title\n fileName\n pageDimensions\n pageCount\n modified\n link\n valid\n locked\n autoArchive\n archived\n tags\n created\n createdBy\n lastSent\n fixSignatureScale\n groupId\n roles{\n id\n name\n roleType\n signerIndex\n ordinal\n signerParent\n experience\n }\n elementConnection {\n templateElements {\n align\n ax\n ay\n bx\n by\n elementType\n formElementType\n fieldOrder\n fontName\n fontSize\n helpText\n hideBorder\n id\n label\n labelExtra\n logicAction\n logicGroup\n mapTo\n options\n optional\n page\n role\n signer\n substantive\n validation\n value\n }\n totalCount\n }\n userSignatureConnection {\n userSignatureElements {\n id\n userId\n ax\n ay\n bx\n by\n page\n link\n }\n }\n }\n }\n `;class LsDocumentAdapter{endpoint;constructor(e){this.endpoint=e}handleEvent=async(e,t)=>{axios.defaults.headers.common["Authorization"]=t;const r=e.data;if(!r?.id)return"invalid";const i=atob(r.id);if(i.length<3)return"invalid";const o=atob(r.id).substring(0,3);let n="";switch(o){case"ele":switch(e.action){case"create":n=createElement(r);break;case"update":n=updateElement(recalculateCoordinates(r));break;case"delete":n=deleteElement(r);break}break;case"rol":switch(e.action){case"create":n=createRole(r);break;case"update":n=updateRole(r);break;case"delete":n=deleteRole(r);break;case"swap":console.log(r,e);n=swapRoles(r,e.data2);break}break;case"tpl":switch(e.action){case"update":n=updateTemplate(r);break}break}const s=await this.execute(t,n);return{result:s,obj:r,event:e}};async execute(e,t,r){if(e){const i=await axios.post(this.endpoint||Parameters.endpoints.graphQL,{query:t,variables:r?r:{}},{headers:{Authorization:e}});return i.data.data}else{console.warn("UNASSIGNED ACCESS TOKEN")}return Promise.reject()}}const getGroupData=e=>`\n query LDVgetGroupData {\n group(id: "${e}"){\n id \n standardMessageConnection{\n messages {\n id\n name\n default\n body\n created\n modified\n }\n }\n scheduleConnection {\n schedules {\n id\n name\n items {\n id\n daysAfter\n frequency\n subject\n message\n when\n timeOfDay\n skipWeekend\n }\n default\n }\n }\n experienceConnection{\n experiences {\n id\n name\n language\n defaultExperience\n witnessSameDevice\n allowSignatureReuse\n attachDraft\n canReassign\n defaultReminderSubject\n defaultSubject\n finalSignerEmailSubHeader\n finalSignerEmailText\n footerTextColour\n forwarding\n penDiameter\n postSignAttach\n postSignEmail\n rejectedEmailSubheader\n senderName\n signatureAppendDate\n signatureDoneText\n signatureMouse\n signatureType\n signatureCertifiedType\n signatureUpload\n signatureAppend\n signatureAppendExtra\n signingPageText\n textBackgroundColour\n textFontColour\n typedSignatureFixedSize\n created\n modified\n witnessingRequiresSignerSMS\n witnessingRequiresWitnessSMS\n }\n }\n attachmentConnection {\n attachments {\n id\n filename\n autoAttach\n description\n created\n }\n }\n contactConnection {\n contacts{\n id\n firstName\n lastName\n email\n phoneNumber\n name\n }\n }\n }\n }\n `;function validate(e){var t=[];e.roles.forEach((r=>{if(e.elementConnection.templateElements.filter((e=>e.formElementType==="signature"&&e.signer===r.signerIndex&&r.roleType!=="APPROVER")).length===0){t.push({id:r.id,title:"Missing signature.",description:`{tr.name} is missing a signature.`,role:r})}}));e.elementConnection.templateElements.forEach((e=>{if(e.validation===20&&(!e.options||e.options.length===0)){t.push({id:e.id,title:"Missing options",description:`Drop down field "${e.label}" is missing options.`,element:e})}}));return t}const lsDocumentViewerCss="*,*::before,*::after{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion: no-preference){html{interpolate-size:allow-keywords}}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate}:host{display:flex;flex-direction:row;width:100vw;height:100vh;margin:0px;padding:0px}.validation-tag-wrapper{position:fixed;top:0.375rem;right:0.375rem;z-index:2000}#my-field-panel{position:relative;height:calc(100% - 4.313rem)}.leftBox{position:relative;border-radius:16px;border:1px solid var(--gray-30, #edeff2);background:var(--white, #fff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);width:21.25rem;margin:1rem;min-width:21.25rem;max-height:100%;z-index:1000;left:0;top:0}.left-box-inner{position:relative;display:flex;height:100%;padding:0.75rem;gap:0.75rem}.rightBox{width:200px;border:1px gray solid;width:470px;min-width:390px;padding:4px;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:8px;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.ls-editor-infobox{padding:2px 8px 2px 8px}#pdf-canvas{top:0px;left:0px;width:100px;height:100px;box-shadow:0 8px 32px 0 rgba(0, 0, 0, 0.12)}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw;height:100%}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:visible;max-height:100%;width:100vw;overflow:scroll;padding:5rem 380px 2rem 380px}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:30px}.nextButton{position:relative;bottom:30px}.fieldBox{z-index:1000}#ls-box-selector{position:absolute;visibility:hidden;background-color:transparent;border:1px rgba(71, 71, 71, 0.716) dashed}#ls-editor-form{display:flex;width:100vw;height:calc(100vh - 2.25rem);position:relative;background:var(--gray-10, #f7f8fa);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.04) inset, 0 10px 15px 0 rgba(0, 0, 0, 0.04) inset}.hidden{visibility:hidden;display:none;width:0px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.fields-box{display:flex;flex-direction:column;gap:0.75rem}.page-header{display:flex;height:2.25rem;gap:0.5rem;padding:0.25rem 0.75rem;justify-content:center;align-items:center}.header-text-1{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem}.header-text-2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem}.properties-header{display:flex;padding:1rem;gap:0.75rem;align-items:center;border-bottom:1px solid var(--gray-20, #edeff2)}.properties-header-title{color:var(--gray-100, #45484d);width:100%;font-size:1.5rem;font-style:normal;font-weight:500;line-height:2rem;}.properties-header-icon{display:flex;padding:0.5rem;border-radius:0.625rem;background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.field-properties-outer{position:relative;height:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";pdfExports.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js";const LsDocumentViewer=class{constructor(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.pageChange=createEvent(this,"pageChange");this.selectFields=createEvent(this,"selectFields");this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}isPageRendering;pdfDocument;pageNumPending=null;canvas;ctx;pageDimensions;isMoving=false;isBoxing=false;selectionBox=null;hitField;edgeSide;startLocations;startMouse;template;token;userpool;endpoint;templateid;zoom=1;pageNum=1;signer=0;_template;validationErrors=[];status;groupInfo;selected=[];isLoading=true;mode="editor";modeHandler(e,t){if(e==="preview"){this.showtoolbar=false;this.showtoolbox=false;this.showstatusbar=false;this.readonly=true}else if(e==="editor"){this.showtoolbar=true;this.showtoolbox=true;this.showstatusbar=true;this.readonly=false}else if(e==="compose"){this.showtoolbar=true;this.showtoolbox=true;this.showstatusbar=true;this.readonly=false}}tableViewHandler(e,t){if(e===true){this.showPageFields(-1)}else if(e==="editor"){this.showPageFields(this.pageNum)}this.queueRenderPage(this.pageNum)}manager="toolbox";displayTable=false;showtoolbox=false;showtoolbar=false;showstatusbar=false;showpagepreview=false;expandfields=false;readonly=false;showtableview=false;toolboxFilter=null;pageRendered;pageChange;selectFields;mutate;update;adapter;mutateHandler(e){if(this.token&&this.adapter)e.detail.forEach((e=>this.adapter.handleEvent(e,this.token).then((e=>matchData.bind(this)(e)))))}updateHandler(e){if(e.detail)e.detail.forEach((e=>this.syncChange(e)))}addParticpantHandler(e){const t=this.groupInfo.experienceConnection.experiences.find((e=>e.defaultExperience===true));const r=this._template.roles.find((t=>t.id===e.detail.parent));const i=[{action:"create",data:{id:btoa("rol"+crypto.randomUUID()),name:"Signer "+(this._template.roles.length+1),roleType:e.detail.type,signerIndex:e.detail.type==="WITNESS"?100+r.signerIndex:this._template.roles.length,ordinal:e.detail.type==="WITNESS"?r.ordinal+1:this._template.roles.length,signerParent:e.detail.parent,experience:t.id,templateId:this._template.id}}];this.update.emit(i);this.mutate.emit(i)}selectFieldsHandler(e){const t=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:t.map((e=>e.dataItem))}};var r=this.component.shadowRoot.getElementById("ls-toolbar");if(r){r.dataItem=e.detail}var i=this.component.shadowRoot.getElementById("my-field-panel");if(i){i.dataItem=e.detail}e.detail.forEach((e=>{const t=this.component.shadowRoot.getElementById("ls-field-"+e.id);t.selected=true}));this.selected.forEach((t=>t.selected=e.detail.map((e=>e.id)).includes(t.dataItem.id)));this.validationErrors=validate.bind(this)(this._template)}roleHandler(e){this.signer=e.detail}async pageNext(){if(this.pageNum>=this.pdfDocument.numPages){return}this.pageNum+=1;this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}async pagePrev(){if(this.pageNum<=1){return}this.pageNum-=1;this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}async unselect(){const e=this.component.shadowRoot.querySelectorAll("ls-editor-field");e.forEach((e=>{e.selected=false}));this.selected=[]}async setZoom(e){this.zoom=e;this.canvas=this.component.shadowRoot.getElementById("pdf-canvas");const t=this.component.shadowRoot.getElementById("ls-document-frame");this.canvas.style.height=this.pageDimensions[this.pageNum-1].height*e+"px";this.canvas.style.width=this.pageDimensions[this.pageNum-1].width*e+"px";t.style.height=this.pageDimensions[this.pageNum-1].height*e+"px";t.style.width=this.pageDimensions[this.pageNum-1].width*e+"px";this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((e=>moveField.bind(this)(e,e.dataItem)));this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}clip(e,t=0){return e>1?t:e}parseTemplate(e){const t=JSON.parse(e);const r=JSON.parse(JSON.parse(t.pageDimensions));this.pageDimensions=r.map((e=>({height:e[1],width:e[0]})));const i=t.elementConnection.templateElements.map((e=>({...e,top:this.clip(e.ay)*this.pageDimensions[0].height,left:this.clip(e.ax)*this.pageDimensions[0].width,height:(this.clip(e.by,.1)-this.clip(e.ay))*this.pageDimensions[0].height,width:(this.clip(e.bx,.2)-this.clip(e.ax))*this.pageDimensions[0].width,templateId:t.id})));const o=t.roles.map((e=>({...e,templateId:t.id})));this.signer=o.length>0?1:0;this._template={...t,elementConnection:{...t.elementConnection,templateElements:i},roles:o}}renderPage(e){this.isPageRendering=true;this.pdfDocument.getPage(e).then((e=>{const t=e.getViewport({scale:this.zoom});this.canvas.height=Math.floor(t.height);this.canvas.width=Math.floor(t.width);const r={viewport:t,canvasContext:this.ctx};const i=e.render(r);i.promise.then((()=>{this.isPageRendering=false;this.pageRendered.emit(this.pageNum);if(this.pageNumPending!==null){this.renderPage(this.pageNumPending);this.pageChange.emit(this.pageNumPending);this.pageNumPending=null}}))}))}queueRenderPage(e){if(this.isPageRendering){this.pageNumPending=e}else{this.renderPage(e)}}loadAndRender(e){pdfExports.getDocument(e).promise.then((e=>{this.pdfDocument=e;this.renderPage(this.pageNum)}))}prepareElement(e){return{...e,top:Math.floor(this.clip(e.ay)*this.pageDimensions[e.page-1].height),left:Math.floor(this.clip(e.ax)*this.pageDimensions[e.page-1].width),height:Math.floor((this.clip(e.by,.05)-this.clip(e.ay))*this.pageDimensions[e.page-1].height),width:Math.floor((this.clip(e.bx,.2)-this.clip(e.ax))*this.pageDimensions[e.page-1].width),pageDimensions:this.pageDimensions[e.page-1],templateId:this._template.id}}syncChange(e){if(e?.select==="clear"){this.unselect()}if(getApiType(e.data)==="element"){if(e.action==="create"){const t={...e.data,page:this.pageNum};addField.bind(this)(this.component.shadowRoot.getElementById("ls-document-frame"),t)}else if(e.action==="update"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);if(t){moveField.bind(this)(t,e.data);const r=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);r.dataItem=e.data;this.selectFields.emit(this.selected.map((e=>e.dataItem)));this.selected=this.selected.map((t=>t.dataItem.id===e.data.id?r:t))}const r=this.component.shadowRoot.querySelectorAll("ls-editor-field");this.selected=Array.from(r).filter((e=>e.selected))}else if(e.action==="delete"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);const r=this._template.elementConnection.templateElements;this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:r.filter((t=>t.id!==e.data.id))}};this.component.shadowRoot.getElementById("ls-document-frame").removeChild(t);this.selected=[]}else{console.warn("Unrecognised action, check Legalesign documentation. `create`, `update` and `delete` allowed.")}}this.validationErrors=validate.bind(this)(this._template)}initViewer(){this.canvas=this.component.shadowRoot.getElementById("pdf-canvas");this.canvas.style.height=this.pageDimensions[this.pageNum-1].height*this.zoom+"px";this.canvas.style.width=this.pageDimensions[this.pageNum-1].width*this.zoom+"px";this.ctx=this.canvas.getContext("2d");if(this._template?.link)this.loadAndRender(this._template?.link);var e=this.component.shadowRoot.getElementById("ls-document-frame");e.addEventListener("click",mouseClick.bind(this));e.addEventListener("mousedown",mouseDown.bind(this));e.addEventListener("mousemove",mouseMove.bind(this));e.addEventListener("mouseup",mouseUp.bind(this));document.addEventListener("keydown",keyDown.bind(this));e.addEventListener("dragenter",(e=>{e.preventDefault()}));e.addEventListener("dragover",(e=>{e.preventDefault()}));e.addEventListener("drop",mouseDrop.bind(this));this._template.elementConnection.templateElements.forEach((e=>{addField.bind(this)(this.component.shadowRoot.getElementById("ls-document-frame"),this.prepareElement(e))}))}showPageFields(e){const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");Array.from(t).forEach((t=>{t.className=t.dataItem.page===e?"":"hidden"}))}async load(){this.isLoading=true;try{this.adapter=new LsDocumentAdapter(this.endpoint);const e=await this.adapter.execute(this.token,getTemplate(this.templateid));this.parseTemplate(JSON.stringify(e.template));const t=await this.adapter.execute(this.token,getGroupData(this._template.groupId));this.groupInfo=t.group;this.initViewer();this.validationErrors=validate.bind(this)(this._template);this.selected=[];this.setZoom(1);this.isLoading=false}catch(e){console.error("Your access token is invalid.",e)}}componentWillLoad(){if(this.token&&!this._template)this.load()}handleSelectedField(e){const t=this.component.shadowRoot.querySelectorAll("ls-toolbox-field");t.forEach((t=>{const r=t.formElementType===e.detail;t.isSelected=r}))}render(){return h(Host,{key:"331bbb6ee8979812cac17c61037085c18ffe3ea4"},h(h.Fragment,null,this.isLoading&&h("ls-page-loader",{key:"2fdab395bd9707041e35176bdbcc898e61dcf640"}),h("div",{key:"676168eb9b02205325cb53c68bda22783669380c",class:"validation-tag-wrapper"},h("ls-validation-tag",{key:"62867096f5fda376314bb7915b81e7006d95c492",validationErrors:this.validationErrors})),h("div",{key:"898f1dcc9a33dc8fa3181e409364b575bb923904",class:"page-header"},h("p",{key:"d5d0041f19aa10609d02a81412a46cf0c45376bb",class:"header-text-1"},"Template Creation"),h("p",{key:"08f9eb736cd04e1c4cd867f4882f03d3d1899e39"},"/"),h("p",{key:"039a5d1475d4ee606b8f11cc1f49fcdcfe309d30",class:"header-text-2"},this._template?.title)),h("form",{key:"c4455c35ff74b2ea43adc7e298c46d7db22dc964",id:"ls-editor-form"},this.showtoolbox===true?h("div",{id:"ls-left-box",class:"leftBox"},h("div",{class:!this.selected||this.selected.length===0?"left-box-inner":"hidden"},h("ls-feature-column",{onManage:e=>{if(e.detail==="document"){var t=this.component.shadowRoot.getElementById("ls-document-options");t.template=this._template}else if(e.detail==="participant"){var r=this.component.shadowRoot.getElementById("ls-participant-manager");r.template=this._template}this.manager=e.detail}}),h("div",{id:"ls-toolbox",class:this.manager==="toolbox"?"toolbox":"hidden"},h("div",{class:"ls-editor-infobox"},h("h2",{class:"toolbox-section-title"},"Participant Fields"),h("p",{class:"toolbox-section-description"},"Select and Click to place Signature fields where you’d like on the Document.")),h("div",{class:"fields-box"},this.signer>0?h("ls-toolbox-field",{elementType:"signature",formElementType:"signature",label:"Signature",defaultHeight:27,defaultWidth:120,validation:0,icon:"signature",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}):h("ls-toolbox-field",{elementType:"auto sign",formElementType:"auto sign",label:"Auto Sign",defaultHeight:27,defaultWidth:120,validation:3e3,icon:"auto-sign",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"text",formElementType:"text",label:"Text",defaultHeight:27,defaultWidth:100,validation:0,icon:"text",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"signing date",formElementType:"signing date",label:"Signing Date",defaultHeight:27,defaultWidth:120,validation:30,icon:"auto-date",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"date",formElementType:"date",label:"Date",defaultHeight:27,defaultWidth:80,validation:2,icon:"calender",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"email",formElementType:"email",label:"Email",defaultHeight:27,defaultWidth:120,validation:1,icon:"at-symbol",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"initials",formElementType:"initials",label:"Initials",defaultHeight:27,defaultWidth:120,validation:2e3,icon:"initials",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("div",{class:"fields-box"},h("ls-toolbox-field",{elementType:"number",formElementType:"number",label:"Number",defaultHeight:27,defaultWidth:80,validation:50,icon:"hashtag",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"dropdown",formElementType:"dropdown",label:"Dropdown",defaultHeight:27,defaultWidth:80,validation:20,icon:"hashtag",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"checkbox",formElementType:"checkbox",label:"Checkbox",defaultHeight:27,defaultWidth:27,validation:25,icon:"check",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"regex",formElementType:"regex",label:"Regex",defaultHeight:27,defaultWidth:120,validation:93,icon:"code",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"image",formElementType:"image",label:"Image",defaultHeight:27,defaultWidth:120,validation:90,icon:"photograph",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"file",formElementType:"file",label:"File",defaultHeight:27,defaultWidth:120,validation:74,icon:"upload",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}})))),h("ls-participant-manager",{id:"ls-participant-manager",class:this.manager==="participant"?"toolbox":"hidden",editor:this}),h("ls-document-options",{id:"ls-document-options",class:this.manager==="document"?"toolbox":"hidden"})),!this.displayTable&&h("div",{class:this.selected.length>0?"field-properties-outer":"hidden"},h("div",{class:"properties-header"},h("div",{class:"properties-header-icon"},h("ls-icon",{name:"pre-filled-content"})),h("h1",{class:"properties-header-title"},"Field Properties"),h("button",{class:"tertiaryGrey",onClick:e=>{this.selected=[];e.preventDefault()}},h("ls-icon",{name:"x",size:"20"}))),h("ls-field-properties",{id:"my-field-panel"}),h("slot",null))):h(h.Fragment,null),h("ls-toolbar",{key:"8c4b8034e7ffed516af95db5f10cf4ada95dcbdb",id:"ls-toolbar",template:this._template,editor:this,groupInfo:this.groupInfo}),h("div",{key:"f387d5bc8389c756ed527b5a3b90f4622b3cc97c",id:"ls-mid-area"},h("div",{key:"670fef66b54c73e52b707fc27e6cd058765c2dd2",class:"document-frame-wrapper",id:"document-frame-wrapper"},h("div",{key:"2321a7a20cbd67b5e55607bd54b0bfb8fb5c2dc8",id:"ls-document-frame"},h("canvas",{key:"76ec82c4ae65781013f12fa382affd327c1271f2",id:"pdf-canvas",class:this.displayTable||this.isLoading?"hidden":""}),h("ls-editor-table",{key:"a8ec99154542ae3d0290eb3c33d88e5c96cff78e",editor:this,class:this.displayTable?"":"hidden"}),h("div",{key:"74d7d28664675bfe3c0b178f783fcfe155ac4544",id:"ls-box-selector"}))),h("ls-statusbar",{key:"44c7a537634f5ea25028942223a850804d0f9639",editor:this})))))}static get watchers(){return{mode:["modeHandler"],displayTable:["tableViewHandler"]}}};LsDocumentViewer.style=lsDocumentViewerCss;const defaultRolePalette=[{description:"gray",s10:"#f7f8fa",s20:"#edeff2",s30:"#e0e2e5",s40:"#d8d9dc",s50:"#c8c9cc",s60:"#afb0b2",s70:"#939599",s80:"#6f7176",s90:"#5e6066",s100:"#45484d"},{description:"blue",s10:"#f0f6ff",s20:"#e0ecff",s30:"#bed4fa",s40:"#a2bdf5",s50:"#78a3fa",s60:"#5684f0",s70:"#4368e0",s80:"#2d4dcc",s90:"#233ead",s100:"#14287a"},{description:"green",s10:"#effff9",s20:"#c5fde8",s30:"#9df5d4",s40:"#72f0c2",s50:"#57e5b1",s60:"#46dbaa",s70:"#33b88c",s80:"#15946a",s90:"#177559",s100:"#125241"},{description:"yellow",s10:"#fffcef",s20:"#fff3c2",s30:"#fcec9d",s40:"#ffe561",s50:"#fad232",s60:"#f0b618",s70:"#cc8904",s80:"#9e5913",s90:"#8a3f0e",s100:"#70350d"},{description:"purple",s10:"#f4f0ff",s20:"#eee5ff",s30:"#d6befa",s40:"#c6a2f5",s50:"#b078fa",s60:"#9956f0",s70:"#8743e0",s80:"#722dcc",s90:"#5f23ad",s100:"#40147a"},{description:"teal",s10:"#effffc",s20:"#c5fcf1",s30:"#a5fae9",s40:"#76f5db",s50:"#54ebcd",s60:"#46dbbd",s70:"#33b8a2",s80:"#148f7e",s90:"#17756c",s100:"#15524c"},{description:"pink",s10:"#fff0f9",s20:"#ffe5f5",s30:"#fabee2",s40:"#f5a2d4",s50:"#fa78c6",s60:"#f056b2",s70:"#e043a2",s80:"#cc2d8c",s90:"#ad2376",s100:"#7a1451"},{description:"lime",s10:"#fafff0",s20:"#f6ffe5",s30:"#e6fabe",s40:"#d9f5a2",s50:"#cffa78",s60:"#bdf056",s70:"#ace043",s80:"#97cc2d",s90:"#7fad23",s100:"#587a14"},{description:"red",s10:"#fff0f0",s20:"#ffe1e0",s30:"#ffc9c7",s40:"#ffa19e",s50:"#ff706b",s60:"#f64a44",s70:"#dc2721",s80:"#c1140e",s90:"#990500",s100:"#7a1714"},{description:"lightblue",s10:"#effbff",s20:"#c7f1ff",s30:"#9de4fc",s40:"#79dbfc",s50:"#51d3ff",s60:"#48c5f0",s70:"#20a6d6",s80:"#0b80b2",s90:"#19648a",s100:"#0c3e57"},{description:"aubergine",s10:"#fcf0ff",s20:"#fae5ff",s30:"#eebefa",s40:"#e4a2f5",s50:"#e078fa",s60:"#d156f0",s70:"#c143e0",s80:"#ac2dcc",s90:"#9223ad",s100:"#66147a"},{description:"burnt",s10:"#fff6f0",s20:"#fff0e5",s30:"#fad6be",s40:"#f5c3a2",s50:"#faac78",s60:"#f09456",s70:"#e08243",s80:"#cc6d2d",s90:"#ad5a23",s100:"#7a3d14"},{description:"trueGreen",s10:"#f0fff0",s20:"#e5ffe5",s30:"#befabe",s40:"#a2f5a2",s50:"#78fa78",s60:"#56f056",s70:"#43e043",s80:"#2dcc2d",s90:"#23ad23",s100:"#147a14"},{description:"indigo",s10:"#f2f0ff",s20:"#e9e5ff",s30:"#c6befa",s40:"#ada2f5",s50:"#8978fa",s60:"#6b56f0",s70:"#5843e0",s80:"#422dcc",s90:"#3523ad",s100:"#21147a"},{description:"cyan",s10:"#efffff",s20:"#c5fcfc",s30:"#a0fafa",s40:"#76f5f5",s50:"#54ebeb",s60:"#46dbdb",s70:"#33b3b8",s80:"#11868f",s90:"#166a70",s100:"#11474d"},{s60:"rgb(70, 219, 170)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(239, 255, 249)",description:"overflowcolor"},{s60:"rgb(240, 182, 24)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 252, 239)",description:"overflowcolor"},{s60:"rgb(238, 229, 255)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(244, 240, 255)",description:"overflowcolor"},{s60:"rgb(240, 86, 178)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 240, 249)",description:"overflowcolor"},{s60:"rgb(189, 240, 86)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(250, 255, 240)",description:"overflowcolor"},{s60:"rgb(246, 74, 68)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(246, 190, 188)",description:"overflowcolor"},{s60:"rgb(58, 0, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(188, 169, 240)",description:"overflowcolor"},{s60:"rgba(1, 179, 34, 0.69)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(135, 173, 158)",description:"overflowcolor"},{s60:"rgb(201, 204, 0)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgba(246, 247, 203, 0.77)",description:"overflowcolor"},{s60:"rgb(249, 55, 129)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 237, 244)",description:"overflowcolor"},{s60:"rgb(0, 14, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(209, 212, 243)",description:"overflowcolor"},{s60:"rgb(135, 173, 158)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(205, 244, 228)",description:"overflowcolor"},{s60:"rgb(86, 199, 240)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(202, 236, 248)",description:"overflowcolor"},{s60:"rgb(246, 205, 68)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(244, 240, 255)",description:"overflowcolor"},{s60:"rgb(0, 94, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(188, 169, 240)",description:"overflowcolor"},{s60:"rgba(179, 1, 63, 0.69)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(135, 173, 158)",description:"overflowcolor"}];const lsEditorFieldCss=":host{display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate}.ls-editor-field-editable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;margin:0;padding:0px 0px 0px 0px;min-width:2em;height:100%;width:100%}.ls-editor-field{opacity:0.7}.ls-editor-field-editable:focus{outline:none}.ls-editor-field-draggable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;min-width:2px;height:98%;width:98%}.hidden-field{display:none}input{all:unset}.draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.editing-input{caret-color:rgb(15 23 42);caret-shape:auto;height:100%;width:100%}.required-icon{position:absolute;top:2px;right:2px;color:var(--red-60, #f64a44)}";const LsEditorField=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}dataItem;selected=false;readonly;type;page;isEditing=false;heldEdge=null;isEdgeDragging=false;innerValue;sizeObserver;mutate;update;handleInput(e){if(e.code==="Enter"){this.isEditing=false;this.sizeObserver.observe(this.component.shadowRoot.getElementById("field-info"))}}handleMouseMove(e){if(this.readonly)return;if(!e.clientX)return;if(Math.abs(e.offsetX)<5){this.component.style.cursor="ew-resize"}else if(Math.abs(e.offsetX-this.component.clientWidth)<5){this.component.style.cursor="ew-resize"}else if(Math.abs(e.offsetY)<5){this.component.style.cursor="ns-resize"}else if(Math.abs(e.offsetY-this.component.clientHeight)<5){this.component.style.cursor="ns-resize"}else{this.component.style.cursor="move"}}handleDoubleClick(){if(this.readonly)return;this.isEditing=true;this.heldEdge=null;this.isEdgeDragging=false;this.sizeObserver.disconnect();this.innerValue=this.innerValue?this.innerValue:this.dataItem?.value;const e=this.component.shadowRoot.getElementById("editing-input");console.log(this.dataItem);if(e){e.className="ls-editor-field-editable";e.focus()}}handleDragStart(e){e.dataTransfer.setData("application/json",JSON.stringify({type:this.type}));e.dataTransfer.dropEffect="move"}watchSelectedHandler(e,t){if(e){this.component.style.background=defaultRolePalette[this.dataItem?.signer%100].s20;this.component.style.opacity="0.7";this.component.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}else{this.component.style.background="#ffffff";this.component.style.opacity="0.7";this.component.style.boxShadow="none"}}componentDidLoad(){this.sizeObserver=new ResizeObserver((e=>{for(const t of e){if(t.contentRect){const e=this.component.shadowRoot.getElementById("field-info");e.style.height=t.contentRect.height+"px";e.style.width=t.contentRect.width+"px"}}}));this.sizeObserver.observe(this.component);if(this.selected){this.component.style.background=defaultRolePalette[this.dataItem?.signer%100].s20;this.component.style.opacity="0.7";this.component.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}else{this.component.style.background="#ffffff";this.component.style.opacity="0.7";this.component.style.boxShadow="none"}}alter(e){this.dataItem={...this.dataItem,...e};this.debounce(this.dataItem,900)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=[{action:"update",data:e}];this.mutate.emit(t);this.update.emit(t)}),t)}render(){return h(Host,{key:"3ad1a3a7480b3fc1394db18a60acc7af63f7df98",style:{border:`2px ${defaultRolePalette[this.dataItem?.signer%100].s60} solid`}},h("div",{key:"16fe59242c50fd50bb96d65c6b3ffa2fa47c5e54",class:{"ls-editor-field":true,"is-selected":this.selected}},!this.dataItem?.optional&&h("ls-icon",{key:"47c188b577ab99a83b9d84b5401a20a51865f10a",name:"required",size:"12",class:"required-icon",customStyle:{verticalAlign:"top"}}),h("input",{key:"ffc948a18ace160ce07f8400ee5cf49b33062b00",id:"editing-input",class:this.isEditing?"ls-editor-field-editable":"hidden-field",type:getInputType(this.dataItem.validation).inputType,value:this.dataItem?.value,checked:this.dataItem?.value?true:false,onInput:e=>this.alter({value:e.target.value})}),h("div",{key:"1d0bec72edda583a92fff8d23c8a57c0c2433347",id:"field-info",class:this.isEditing?"hidden-field":"ls-editor-field-draggable"},this.dataItem.value.length&&this.dataItem.value||this.dataItem?.label||this.dataItem?.formElementType)))}static get watchers(){return{selected:["watchSelectedHandler"]}}};LsEditorField.style=lsEditorFieldCss;const lsEditorTableCss=":host{display:block;z-index:100;position:absolute;top:0px;left:0px}table{background-color:azure;border:1px solid black}td{border:1px solid black}";const LsEditorTable=class{constructor(e){registerInstance(this,e)}get component(){return getElement(this)}editor;componentDidLoad(){var e=this.component.shadowRoot.getElementById("ls-editor-table");Array.from(this.editor.component.shadowRoot.querySelectorAll("ls-editor-field")).forEach((t=>{const r=document.createElement("tr");const i=document.createElement("td");i.innerText=t.dataItem.id;r.appendChild(i);const o=document.createElement("td");o.innerText=t.dataItem.value;r.appendChild(o);const n=document.createElement("td");n.innerText=t.dataItem.label;r.appendChild(n);e.appendChild(r)}))}render(){return h(Host,{key:"5843064d233783ed3c491d399c415d281ed35e11"},h("table",{key:"8a6d6d1dc717876eb4401f76f8dc280b957fdeb7",id:"ls-editor-table"}),h("slot",{key:"334d466e08ed2490fa88ef774912b469fde0a287"}))}};LsEditorTable.style=lsEditorTableCss;const lsFeatureColumnCss=":host{display:flex;flex-direction:column;gap:0.5rem}.activeIcon,.defaultIcon{padding:0.75rem;border-radius:0.75rem;color:var(--gray-80, #787A80)}.defaultIcon:hover{background-color:var(--primary-10, #EFF4FF);color:var(--primary-100, #0C1457);cursor:pointer}.activeIcon{background-color:var(--primary-60, #4456F6);color:var(--white, #fff)}";const LsFeatureColoumn=class{constructor(e){registerInstance(this,e);this.manage=createEvent(this,"manage")}manager="toolbox";manage;render(){return h(Host,{key:"c153ff8227ffe959671bd72b62eef1be0d6ea0a5"},h("div",{key:"febf78c0ccc42e2511b52419955e28017b6d617c",class:this.manager==="document"?"activeIcon":"defaultIcon",onClick:()=>{console.log("document");this.manage.emit("document");this.manager="document"}},h("ls-icon",{key:"027568b936d809b03eecc895fcfab24cd65e7fa3",name:"document",size:"24"})),h("div",{key:"3fe1542a7c2053dcca881682eb29859f4bf7a914",class:this.manager==="toolbox"?"activeIcon":"defaultIcon",onClick:()=>{this.manage.emit("toolbox");this.manager="toolbox"}},h("ls-icon",{key:"2656bb9ebbcec8dbf2a5519e9f80ceb734413828",name:"typing-input",size:"24"})),h("div",{key:"46abc8a29b3488273d669089602ed902752b1145",class:this.manager==="participant"?"activeIcon":"defaultIcon",onClick:()=>{this.manage.emit("participant");this.manager="participant"}},h("ls-icon",{key:"173f5cc9556a37f7502fb7c02e1644659dd65b16",name:"user-group",size:"24"})),h("slot",{key:"856f4c459eb86ae32eb564c5024f64231f9cc8a1"}))}};LsFeatureColoumn.style=lsFeatureColumnCss;const lsFieldAlignmentCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldAlignment=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}right(){const e=this.dataItem.reduce(((e,t)=>t.left+t.width<e?e:t.left+t.width),0);console.log(e);const t=this.dataItem.map((t=>{const r=e-t.width;return{action:"update",data:{...t,left:r,ax:r,bx:r+t.width}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}center(){const e=this.dataItem.reduce(((e,t)=>{console.log(e+(t.left+t.width/2));return e+(t.left+t.width/2)}),0);console.log(e);const t=e/this.dataItem.length;console.log("centerposition",t);const r=this.dataItem.map((e=>{const r=e.left+(t-(e.left+e.width/2));return{action:"update",data:{...e,left:r,ax:r,bx:r+e.width}}}));console.log(r);this.dataItem=r.map((e=>e.data));this.mutate.emit(r);this.update.emit(r)}top(){const e=this.dataItem.reduce(((e,t)=>t.top<e?e:t.top),0);this.alter({top:e})}left(){const e=this.dataItem.reduce(((e,t)=>t.left<e?t.left:e),this.dataItem[0].left);this.alter({left:e})}middle(){const e=this.dataItem.reduce(((e,t)=>{console.log(e+(t.top+t.height/2));return e+(t.top+t.height/2)}),0);const t=e/this.dataItem.length;const r=this.dataItem.map((e=>{const r=e.top+(t-(e.top+e.height/2));return{action:"update",data:{...e,top:r,ay:r,by:r+e.height}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r);this.update.emit(r)}bottom(){const e=this.dataItem.reduce(((e,t)=>e>t.top+t.height?e:t.top+t.height),0);const t=this.dataItem.map((t=>{const r=e-t.height;return{action:"update",data:{...t,top:r,ay:r,by:r+t.height}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"276514255f8b1da24cffe917638d0e79196cd4c9"},h("div",{key:"0e4af454e1789c6b5ee4dd443c69eb700428bee6",class:"ls-field-properties-section"},h("div",{key:"958a851c77101f9146c3947fd31d56b9ad0d1c84",class:"ls-field-properties-section-text"},h("p",{key:"7d8add53a07a7b453feedffcd45dd6129f57de37",class:"ls-field-properties-section-title"},"Alignment"),h("p",{key:"a072da1f7284f3e3162af00431eb86b103a6d139",class:"ls-field-properties-section-description"},"Align your Fields relative to the page or multi-select and align then to each other.")),h("div",{key:"6bf9c9285cdbdab4ed8b51de45b8199d2e2d1770",class:"multi-button-group-row"},h("div",{key:"ba5a3e3e98211666a962c20c6de73aca844c4af5",class:"button-group"},h("button",{key:"31c378287314c164517274f0ab2905b127ca3049",onClick:()=>this.left(),"aria-label":"Align selected fields vertically about their left edge.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"97dbc0e12710ca5dea47d8da193ab238ee5ae9dd",name:"field-alignment-left"})),h("button",{key:"fa22bb526248b17a3bd47a482ba1309fb4874d87",onClick:()=>this.center(),"aria-label":"Align selected fields vertically about their centre.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"be176582cc48aaf636e7590224fcddf8a39bb7ef",name:"field-alignment-centre"})),h("button",{key:"9b7ac33e30f711b2aa806cfc87ae1e85fe3158f8",onClick:()=>{this.right()},"aria-label":"Align selected fields vertically about their right edge.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"81953cc88fadc80c0df9a53d367edf4240ba1225",name:"field-alignment-right"}))),h("div",{key:"88274bcb8a4f0df2de472e006470f47741448cfe",class:"button-group"},h("button",{key:"bb784cb991e0fb26f6610c3fde6cf3b4630dc468",onClick:()=>this.top(),"aria-label":"Align selected fields by their top.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"69e5a9a07882a5038e56f574cbe4f5a844ff2400",name:"field-alignment-top"})),h("button",{key:"bb5b5d922ec9b21a17e133ecfb60267636bfa0a1",onClick:()=>this.middle(),"aria-label":"Align selected fields by their middles.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"0b4c455c31330de80905f8522baf9e7db621fd0f",name:"field-alignment-middle"})),h("button",{key:"e951fd98037f208e3ceb4da04a406e50332fd634",onClick:()=>this.bottom(),"aria-label":"Align selected fields by their bottoms.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"3faf90ae35dc58ff59d899c74b3d2e8f24755dd5",name:"field-alignment-bottom"}))))),h("slot",{key:"427224b21fa432083716c6cee3d7d0483ddbd0f4"}))}};LsFieldAlignment.style=lsFieldAlignmentCss;const lsFieldContentCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldContent=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}dataItem;showValidationTypes=true;mutate;update;alter(e){this.dataItem={...this.dataItem,...e};this.debounce(this.dataItem,500)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=[{action:"update",data:e}];this.mutate.emit(t);this.update.emit(t)}),t)}supportsValue(){const e=["signature","intials","image","file","signing","date","autosign","regex"];return!e.includes(this.dataItem?.elementType)}render(){return h(Host,{key:"20ce159dc4152f65e0b0210eccb2eab973af8241"},h("ls-props-section",{key:"c9d8025b354e166b16699ac10a7699d6a3780c03",sectionTitle:"Field Type",sectionDescription:"The Field you currently have selected"},h("ls-field-type-display",{key:"ff03c5571b4b19a22059d34eeea633568635bb9f",fieldType:this.dataItem?.elementType,assignee:this.dataItem?.signer})),h("ls-props-section",{key:"1dc8dd9b52e20ca794b8a326250ddf81b6bf9355",sectionTitle:"Required Field",row:true},h("ls-toggle",{key:"1406c81a96e437b9f4757f6bd1654f7508387b61",id:"toggle-required",checked:!this.dataItem?.optional,onValueChange:e=>this.alter({optional:!e.detail})})),h("ls-props-section",{key:"e247625d206cf48ce9903f213bc3568d333e7b98",sectionTitle:"Field Label",sectionDescription:"Add a label to clarify the information required from the Recipient."},h("input",{key:"8e94c624afc3af83fc448aed69af434cb9c43e35",value:this.dataItem?.label,placeholder:"eg. Sign Here",onInput:e=>this.alter({label:e.target.value})})),this.supportsValue()&&h("ls-props-section",{key:"b729f4eea9b1a6097f7efbb62178d8684c4fbca4",sectionTitle:"Value",sectionDescription:"A prefilled value that can be altered by the signer."},h("input",{key:"ac48703e8da2d666c6804ba050483255432bdb7c",value:this.dataItem?.value,placeholder:"e.g. Gordon Smith",onInput:e=>this.alter({value:e.target.value})})),this.dataItem.validation===20&&h("ls-props-section",{key:"9226d7ebef28ee13f365eb8d6e756a783550898e",sectionTitle:"Options",sectionDescription:"Define the options available in the dropdown. One option per line."},h("textarea",{key:"0238600016c642bc0b9e3a44c083086bab56c063",value:this.dataItem?.options,placeholder:"Option 1\nOption 2\nOption 3",onInput:e=>this.alter({options:e.target.value})})),this.showValidationTypes&&h("ls-props-section",{key:"4651e3e667c092921f227badbb4286ff1b3c54ef",sectionTitle:"Content Format",sectionDescription:"Select the specific format you want the Recipient to enter."},h("ls-input-wrapper",{key:"b66ae98ebd1a27180c6099346fad20aafe677e5e",select:true},h("select",{key:"fec14e36d47672718cf656542c2447abd9358967",onChange:e=>this.alter({validation:parseInt(e.target.value)})},validationTypes.filter((e=>e.formType===this.dataItem?.elementType)).map((e=>h("option",{selected:this.dataItem?.validation===e.id,value:e.id},e.description)))))),h("slot",{key:"8b96944ac071c6b4041d3389cefe8e4712c984fb"}))}};LsFieldContent.style=lsFieldContentCss;const lsFieldDimensionsCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldDimensions=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}alter(e){console.log(e);if(this.isMultiple(this.dataItem)){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}else{const t={action:"update",data:{...this.dataItem,...e}};this.dataItem=t.data;this.mutate.emit([t]);this.update.emit([t])}}render(){return h(Host,{key:"53678e7fc68e795616c51e7cb7325a5cd45761de"},this.isMultiple(this.dataItem)&&h("div",{key:"f5a073c2039858e3b69162a1d1e599ae559dc2d6",class:"ls-field-properties-section"},h("div",{key:"f707c71fc9623bf6fc290ab3bb14451ba98e5454",class:"ls-field-properties-section-text"},h("p",{key:"c000b0fb97cb50712463b4973b8d395df30f0704",class:"ls-field-properties-section-title"},"Height and Width"),h("p",{key:"4443d09dd3358da331437d83db4080e7b7a6407b",class:"ls-field-properties-section-description"},"Define the height and width of one or multiple fields")),h("div",{key:"efa8b8ec8030846f073c147879dfab93ba135a02",class:"input-row"},h("div",{key:"c6e3345f3fc87d539ac35a85c0b8c47042795b59",class:"input-wrapper"},h("ls-icon",{key:"9033883167f51a83f41039dc9da682de3954cd17",id:"selectLeadingIcon",name:"field-match-width"}),h("input",{key:"a18a60327e5766e2c109af6dd95f080a5d0aa3b9",class:"has-leading-icon",aria:"field-width",id:"field-width",onChange:e=>this.alter({width:e.target.value})})),h("div",{key:"7d3464a547cdf5938311a5f9ffc2995be604035e",class:"input-wrapper"},h("ls-icon",{key:"0e413fc72b08cf785b33c56041fe0c638b86bc70",id:"selectLeadingIcon",name:"field-match-height"}),h("input",{key:"bb8a36bfe49680bbe7183d8cc524d1be95f6d87c",class:"has-leading-icon",aria:"field-height",id:"field-height",onChange:e=>this.alter({height:e.target.value})})))),this.isSingle(this.dataItem)&&h("div",{key:"5f73b3b84f25b2072374fc6ca27d0b59dfc3314e",class:"field-set"},h("div",{key:"ee6d5b21c0957acee288252e35165868cc0db0ba",class:"ls-field-properties-section"},h("div",{key:"5edddb346091bb34859f258630ea959492c64ac4",class:"ls-field-properties-section-text"},h("p",{key:"3a90f8a2e72a099fe297dfbcc0b269bd61268ad6",class:"ls-field-properties-section-title"},"Height and Width"),h("p",{key:"0c336dc47d35dd3a629b766e87046463e19a9522",class:"ls-field-properties-section-description"},"Define the height and width of one or multiple fields")),h("div",{key:"494929a5bbb6eae61c2d82aa1e3442ca2c1dabb1",class:"input-row"},h("div",{key:"ce3002cfcf8344556895ed9d237e8dfb359a27a4",class:"input-wrapper"},h("ls-icon",{key:"dca359e82e3733fec34ee138006ef8d63cd7025c",id:"selectLeadingIcon",name:"field-match-width"}),h("input",{key:"421cd8faa380b84cb57d0dc0e76d92a3abd38162",type:"number",class:"has-leading-icon",aria:"field-width",id:"field-width",value:this.dataItem?.width,onChange:e=>this.alter({width:e.target.value})})),h("div",{key:"90b66ca4284e84ddb8b22de8d144ae24e757c74c",class:"input-wrapper"},h("ls-icon",{key:"438f4022c0b55db6f6131bcf57c957fd644f4661",id:"selectLeadingIcon",name:"field-match-height"}),h("input",{key:"d936659987860f79cba8e5ada8f28a437eaba4f5",type:"number",class:"has-leading-icon",aria:"field-height",id:"field-height",value:this.dataItem?.height,onChange:e=>this.alter({height:e.target.value})})))),h("div",{key:"6b1bafdcf631c2ec00acc7afe7fdfe03b0b6600e",class:"ls-field-properties-section"},h("div",{key:"70731c167c84621672059ab5a8ab28c266029525",class:"ls-field-properties-section-text"},h("p",{key:"81fbb63a29e0f432765f00beedc4683d3f464a03",class:"ls-field-properties-section-title"},"Scale and Resize"),h("p",{key:"1ba477c5b9076364870cdd5f6106a4d40f74189f",class:"ls-field-properties-section-description"},"Multi-select fields and match their dimensions")),h("div",{key:"62ba3006a435142653751e81b153b833dafa9801",class:"button-group"},h("button",{key:"9dec26a9e8ed19d2c21ea273afd2e655a0e1b6cc",disabled:true},h("ls-icon",{key:"04777dc3bfdc0b81bce904d4f56108749e0c47c8",name:"field-scale"})),h("button",{key:"709baed52decc30ffebd96b14b02a54466ac7824",disabled:true},h("ls-icon",{key:"cf6b733cb6fcda50b39faf12b208cc1d5fa4a8b0",name:"field-match-width"})),h("button",{key:"6ef87f9641f2cc45a679afc73eb49920abdc7822",disabled:true},h("ls-icon",{key:"28ee6b1d779df43ad15f4041271ec85ac9e95903",name:"field-match-height"}))))))}};LsFieldDimensions.style=lsFieldDimensionsCss;const lsFieldDistributeCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-toolbar-numeric{width:45px;max-height:18px;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldDistribute=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;get component(){return getElement(this)}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}distributeHorizontal(){var e=this.component.shadowRoot.getElementById("ls-fix-horizontal-space");var t=0;const r=this.dataItem.sort(((e,t)=>e.left-t.left));if(e.value!==""){t=parseInt(e.value)}else{var i=0;for(var o=1;o<r.length;o++){const e=r[o-1];const t=r[o];i=i+(t.left-e.left-e.width<=0?0:t.left-e.left-e.width)}t=Math.floor(i/r.length)}var n=r[0].left;const s=r.map((e=>{const r=n;n=n+e.width+t;return{action:"update",data:{...e,left:r}}}));this.dataItem=s.map((e=>e.data));this.mutate.emit(s);this.update.emit(s)}gapVertical(e){const t=this.dataItem.sort(((e,t)=>e.top-t.top));var r=t[0].top;const i=t.map((t=>{const i=r;r=r+t.height+e;const o={...t,top:i};return{action:"update",data:oob(o)?{...t,left:t.pageDimensions.height-t.height-1}:o}}));this.dataItem=i.map((e=>e.data));this.mutate.emit(i);this.update.emit(i)}gapHorizontal(e){const t=this.dataItem.sort(((e,t)=>e.top-t.top));var r=t[0].left;const i=t.map((t=>{const i=r;r=r+t.width+e;const o={...t,left:i};console.log(o,oob(o));return{action:"update",data:oob(o)?{...t,left:t.pageDimensions.width-t.width-1}:o}}));this.dataItem=i.map((e=>e.data));this.mutate.emit(i);this.update.emit(i)}distributeVertical(){var e=this.component.shadowRoot.getElementById("ls-fix-vertical-space");var t=0;const r=this.dataItem.sort(((e,t)=>e.top-t.top));if(e.value!=="")t=parseInt(e.value);else{var i=0;for(var o=1;o<r.length;o++){const e=r[o-1];const t=r[o];i=i+(t.top-e.top-e.height<=0?0:t.top-e.top-e.height)}t=Math.floor(i/r.length)}var n=r[0].top;const s=r.map((e=>{const r=n;n=n+e.height+t;const i={...e,top:r};return{action:"update",data:oob(i)?{...e,top:e.pageDimensions.height-e.height}:i}}));this.dataItem=s.map((e=>e.data));this.mutate.emit(s);this.update.emit(s)}render(){return h(Host,{key:"6b56e29ef6606020392f6345eeab99a79201ca39"},h("div",{key:"dd54237204e0a3cb3e5e7106fa3c217f1bd4783c",class:"ls-field-properties-section"},h("div",{key:"4211d0435d809c161875ec80ed36c8c3fe6e2d09",class:"ls-field-properties-section-text"},h("p",{key:"9f6bf5f1c684a17fb20fb5e8b44e2fd193e1c428",class:"ls-field-properties-section-title"},"Distribution"),h("p",{key:"7b8da49375a5bc764b3f910a8e625569911aa7b7",class:"ls-field-properties-section-description"},"Multi-select fields and evenly space them out")),h("div",{key:"618ac328f320cd4299289fa072d62640964e6b5f",class:"button-group"},h("button",{key:"ae5e15c9947486772f978e028b71d1f0901cb4ef",onClick:()=>{this.distributeVertical()},"aria-label":"Distribute selected fields vertically.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Distribute selected fields vertically.","data-tooltip-place":"top"},h("ls-icon",{key:"30452ccd64d0e2a3d0ebcf7125a37abfa2996610",name:"field-distribute-vertically"})),h("button",{key:"ced0890fec909ecd9d6c42426eeb5f291303b6b9",onClick:()=>{this.distributeHorizontal()},"aria-label":"Distribute selected fields horizontally.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Distribute selected fields horizontally.","data-tooltip-place":"top"},h("ls-icon",{key:"8c4925974e0f22a0222f0e403a913a03bef27475",name:"field-distribute-horizontally"})))),h("div",{key:"6080eed10a0a7f7b8bc1566936df072ad67c5437",class:"ls-field-properties-section"},h("div",{key:"261f4b45dec8cc55bebe5aa9e58524f4077a756a",class:"ls-field-properties-section-text"},h("p",{key:"9702708febe79b8f20179dd90fb1b4d839876862",class:"ls-field-properties-section-title"},"Gap"),h("p",{key:"226c8c2508c1540aa20ac806522c57e6c374dc98",class:"ls-field-properties-section-description"},"Define the exact gap between multi-select fields.")),h("div",{key:"857724c65a60b251df274c41ef3167cb9ce39fa9",class:"input-row"},h("div",{key:"e90426b59b908488a8d456fa2cd43984e0da5253",class:"input-wrapper"},h("ls-icon",{key:"1977d4be8956afc9de41ead5b6957e4fe3669c4f",id:"selectLeadingIcon",name:"field-distribute-vertically"}),h("input",{key:"2e61592539c3453cf345a2798f75e979ed17fa75",type:"number",class:"has-leading-icon",id:"ls-fix-vertical-space",onChange:e=>{this.gapVertical(parseInt(e.target.value))},value:"",size:4,min:0,max:9999})),h("div",{key:"9384373f0bb26414c1375f8786624c7aff12ed36",class:"input-wrapper"},h("ls-icon",{key:"31e062fb69c324d2571df1d62e2ba3549245acc4",id:"selectLeadingIcon",name:"field-distribute-horizontally"}),h("input",{key:"20352f4de63216cc737f7cf469493381282bef32",type:"number",class:"has-leading-icon",id:"ls-fix-horizontal-space",onChange:e=>{this.gapHorizontal(parseInt(e.target.value))},value:"",size:4,min:0,max:9999})))),h("slot",{key:"33b53eb78125407c869e7ae32eba9a23ac77001b"}))}};LsFieldDistribute.style=lsFieldDistributeCss;const lsFieldFooterCss=":host{display:block}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}";const LsFieldFooter=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update");this.selectFields=createEvent(this,"selectFields")}dataItem;mutate;update;selectFields;deleteField=()=>{this.update.emit([{action:"delete",data:this.dataItem}]);this.mutate.emit([{action:"delete",data:this.dataItem}])};duplicateField=()=>{const e={...this.dataItem,id:btoa("ele"+crypto.randomUUID())};const t=this.dataItem.top+this.dataItem.height;if(t+this.dataItem.height<this.dataItem.pageDimensions.height){e.top=t}this.update.emit([{action:"create",data:e,select:"clear"}]);this.mutate.emit([{action:"create",data:e}])};render(){return h(Host,{key:"8cb31207e999dc865fb83cb472d77519cd957fdb"},h("div",{key:"cdb9ade290c3c1cbe613d5c2f04698d16cf2131e",class:"button-footer"},h("button",{key:"6f8db1780d9f860a7d3fa407355fde33cd48c11c",class:"secondary",onClick:()=>this.duplicateField()},h("ls-icon",{key:"7b01415cc8b7be376445c97e4d2b24788afb3e3a",name:"field-duplicate",size:"20"}),"Duplicate"),h("button",{key:"0447898646ae162dd58ca46befcd468b39af2a1a",class:"destructive",onClick:()=>this.deleteField()},h("ls-icon",{key:"65074ed995a57053602d665f036fd7280708860d",name:"trash",size:"20"}),"Delete")),h("slot",{key:"c786084652dfac87fad5ada66808496a3b1aa1dd"}))}};LsFieldFooter.style=lsFieldFooterCss;const lsFieldFormatCss=":host{display:flex;flex-direction:row}.ls-field-format-bar{display:flex;flex-direction:row;gap:0.5rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldFormat=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;get component(){return getElement(this)}selectFieldsHandler(){if(this.dataItem.length>0){var e=this.component.shadowRoot.getElementById("ls-toolbar-font-select");if(e)e.value=this.dataItem[0].fontName;var t=this.component.shadowRoot.getElementById("ls-toolbar-font-size");if(t)t.value=this.dataItem[0].fontSize.toString()}}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"db560de41ff6135ddfc7cd24bee0428393612506"},this.dataItem&&this.dataItem.length>1&&h("div",{key:"4ea46f8e884a76f7683707f02fd175bbb841a7c4",class:"ls-field-format-bar"},h("div",{key:"8004f0b99e69619878b40a4f6a25ccffb76f64cc",class:" input-wrapper"},h("ls-icon",{key:"8c2a1ecc4b2895217b1a5fbc06b765ee640f57f6",id:"selectLeadingIcon",name:"typeface"}),h("select",{key:"e9d63ce0c9bf0f807f8843a546615663f6fe0810",id:"ls-toolbar-font-select",onChange:e=>{this.alter({fontName:e.target.value})},class:"has-leading-icon"},h("option",{key:"57414b268d83f98ba372970a44b01e6564e3f204",value:"arial"},"Arial"),h("option",{key:"0ea33343c8b48361730103a0f57b451ce9e2b082",value:"liberation sans"},"Liberation Sans"),h("option",{key:"41594d03ec8bfb0d30374ab12f524ef083982ab0",value:"courier"},"Courier"),h("option",{key:"266d0e85da5f80b73fedbadb2c1d049bff226036",value:"helvetica"},"Helvetica"),h("option",{key:"75078832a92fb69d4e6dbe175f9fefb6ba7b36b8",value:"verdana"},"Verdana")),h("ls-icon",{key:"82e48e668a00ab951a5ab0a8cc8f4704a19d7a08",id:"selectorIcon",name:"selector"})),h("div",{key:"c017c1fb108b13f531efcf75264a4d7a4871d6e1",class:"input-wrapper"},h("ls-icon",{key:"84bd33a74b0332b795d921b481f805a57ef2cfef",id:"selectLeadingIcon",name:"typesize"}),h("input",{key:"f5e5ac7505bef63d6dc46ab6b6839bac1f8cd74b",id:"ls-toolbar-font-size",width:"30",size:4,class:"has-leading-icon"})),h("div",{key:"9e662def8efd6e8bace2f279ea4b5b15a2fe94ca",class:"button-group"},h("button",{key:"3d4ad30a8ec41eb4a1d525eeb53bc8f8757f0c69",onClick:()=>{this.alter({align:"left"})}},h("ls-icon",{key:"338e02bcf2b1ee58167fb54a1cf0c168a45ab80d",name:"menu-alt-2"})),h("button",{key:"594f8af91b7a82b3c67c5e86e0d41307beeb2e71",onClick:()=>{this.alter({align:"center"})}},h("ls-icon",{key:"00eb405987271237bf93ec03df7b37cc0d1bdd53",name:"menu-alt-5"})),h("button",{key:"a27269a2a51b8fe5bccc15f83628d68251006f70",onClick:()=>{this.alter({align:"right"})}},h("ls-icon",{key:"b4403cf793697fa578ba4948339959bced93a936",name:"menu-alt-3"})))),this.dataItem&&this.dataItem.length===1&&h("div",{key:"c71a0a7dbf4965db5083c2e31892c7d5376ee512",class:"ls-field-format-bar"},h("div",{key:"c182854d46457e7fce5806042bb81ad2a9e2a0cd",class:"input-wrapper"},h("ls-icon",{key:"c37ea1cf1fea476864a869aac0ac69147d33e5b6",id:"selectorIcon",name:"selector"}),h("ls-icon",{key:"499ef3629da6bb05dc85bfad4e22f778a1df00a6",id:"selectLeadingIcon",name:"typeface"}),h("select",{key:"fc9fbf6d744d2e255c252494a8666e461704cb63",id:"ls-toolbar-font-select",onChange:e=>{this.alter({fontName:e.target.value})},class:"has-leading-icon"},h("option",{key:"40bb53d54f3b5f62ec744ae52bea51d7d5e3ffd1",value:"arial"},"Arial"),h("option",{key:"0883cd66f56fd0ed76f48c36203cf4e50f5af980",value:"liberation sans"},"Liberation Sans"),h("option",{key:"72187239ec4a7c296b5ab277d0f19253fc1ac0b6",value:"courier"},"Courier"),h("option",{key:"cd43e5e9858a58ed2a4f1b99924c5746c75c438d",value:"helvetica"},"Helvetica"),h("option",{key:"3a20de6b6937525ae0ec6208888d3956d39bf598",value:"verdana"},"Verdana"))),h("div",{key:"85d7ee0da79d69fcb24495bff20d6683670f0240",class:"input-wrapper"},h("ls-icon",{key:"4c9ca20bf707f7a0a7dbebda0cdb7db36db0b289",id:"selectLeadingIcon",name:"typesize"}),h("input",{key:"2489d93094f314de173a1a466f0a4d13a0d34373",id:"ls-toolbar-font-size",width:"30",size:4,value:this.dataItem[0].fontSize,onChange:e=>{this.alter({fontSize:e.target.value})},class:"has-leading-icon"})),h("div",{key:"f8e5d4822460f11eca96b422a5e9d72191421afc",class:"button-group"},h("button",{key:"547af4eb1d1c0872dd1dbc3ca68eb92621476ae1",onClick:()=>{this.alter({align:"left"})}},h("ls-icon",{key:"8ba5aecb7fc976ef40aea370d00da31e333566c3",name:"menu-alt-2"})),h("button",{key:"c1bd4b5bf403e2b88a0a2169b4123aa9d143aa22",onClick:()=>{this.alter({align:"center"})}},h("ls-icon",{key:"598a82c0edc4997d22d9decae45286877c43f136",name:"menu-alt-5"})),h("button",{key:"9f39d1337f27b0d74ef557836d4bcd86eb508696",onClick:()=>{this.alter({align:"right"})}},h("ls-icon",{key:"c3518f2e0f2fa51592660a94a1fd49037422a8eb",name:"menu-alt-3"})))))}static get watchers(){return{dataItem:["selectFieldsHandler"]}}};LsFieldFormat.style=lsFieldFormatCss;const lsFieldPlacementCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPlacement=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}getValue(e){if(this.isMultiple(this.dataItem)){return""}else if(this.isSingle(this.dataItem)){return this.dataItem[e]}return""}alter(e){if(this.isMultiple(this.dataItem)){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}else{const t={action:"update",data:{...this.dataItem,...e}};this.dataItem=t.data;this.mutate.emit([t]);this.update.emit([t])}}center(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].width/2-this.dataItem[0].width/2}right(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].width-this.dataItem[0].width}middle(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].height/2-this.dataItem[0].height/2}bottom(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].height-this.dataItem[0].height}render(){return h(Host,{key:"c9dc68e4e38efb9c800c3162750fda48a679f24d"},this.isMultiple(this.dataItem)&&h("div",{key:"b8000d7a209d1b48483c567b9476d264df95cfb8",class:"ls-field-properties-section"},h("div",{key:"63b627e957a7cc4e498f4d647d7f097ab46447d0",class:"ls-field-properties-section-text"},h("p",{key:"b2b4d8cabf3b4136bfd8f24a971e37915f831130",class:"ls-field-properties-section-title"},"Location"),h("p",{key:"39036ea300acacb68af52a8a7f3c74bfab636ca9",class:"ls-field-properties-section-description"},"Use coordinates to move your fields on the page")),h("div",{key:"406a42a6eba6512b4a0aab8af66c7f6c3dba7389",class:"input-row"},h("div",{key:"3c1f0599222c5105f345202a453dbe47459e3d08",class:"input-wrapper"},h("ls-icon",{key:"1b72436b61075143fcf71aa25c560dda48729b93",id:"selectLeadingIcon",name:"x-letter"}),h("input",{key:"dbc911eb99b0fb11f618b853610ea61501f248e4",type:"number",class:"has-leading-icon",aria:"top-location",id:"top-location",onChange:e=>this.alter({left:e.target.value})})),h("div",{key:"6f805235eedb1ed975a1dd124ed306785cfbc738",class:"input-wrapper"},h("ls-icon",{key:"a09edcec36df6f3541bb99744c1c03b9ac25809d",id:"selectLeadingIcon",name:"y"}),h("input",{key:"aafc5b2376c78ac269f3bcbec76f654132a1ed31",type:"number",class:"has-leading-icon",aria:"left-location",id:"left-location",onChange:e=>this.alter({top:e.target.value})})))),this.isSingle(this.dataItem)&&h("div",{key:"e6aefc1f92c9052740ef11a7b68cd437e6cacb62",class:"field-set"},h("div",{key:"998c00036ff931841dbee535816d70cc1c13f341",class:"ls-field-properties-section"},h("div",{key:"859c5e6195da6aae05f212325cc887a9e6d98b5a",class:"ls-field-properties-section-text"},h("p",{key:"fe1e0776b11bc989a025c598910ab3881876de5a",class:"ls-field-properties-section-title"},"Alignment"),h("p",{key:"43a1ae930fd8e07e99af9e03adc82d4032a33fd2",class:"ls-field-properties-section-description"},"Align your Fields relative to the page or multi-select and align then to each other.")),h("div",{key:"7a95a01f785eb50a9287457906a6889b7d6a3033",class:"multi-button-group-row"},h("div",{key:"504071b40528fd4399755a0af9b1a9ff4f279c5f",class:"button-group"},h("button",{key:"efd3e2aa445a03fce18474c28a07fa7b8687a0c7",onClick:()=>{this.alter({left:0})}},h("ls-icon",{key:"e11ff3e4dbe3d6677e117e9b683ee9840f870c26",name:"field-alignment-left"})),h("button",{key:"258b9fb3c78c835fd1e281df90e2984cfb08ef40",onClick:()=>{this.alter({left:this.center()})}},h("ls-icon",{key:"f22b23fd59c5c74baeb42bf60614a06cb4483178",name:"field-alignment-centre"})),h("button",{key:"0b80020e7d7d775c48634d5cb5754f3edce44008",onClick:()=>{this.alter({left:this.right()})}},h("ls-icon",{key:"d8ae12c4670eb1e6e1cf65cfa5c2a5e9f123c261",name:"field-alignment-right"}))),h("div",{key:"2519a99c8563e99c118a250da6747f2b6076de61",class:"button-group"},h("button",{key:"6d92cb364078ad0f33e3d22e8753d43d49c96663",onClick:()=>this.alter({top:0})},h("ls-icon",{key:"21468552b013129c3df35c09871ba9132fb91873",name:"field-alignment-top"})),h("button",{key:"f040000cfca80f27a5e0bb6169a2111c71a8f1d4",onClick:()=>{this.alter({top:this.middle()})}},h("ls-icon",{key:"b6c5d151dda019ea8d6d912a9fe2677646b7374b",name:"field-alignment-middle"})),h("button",{key:"a9246e1659fe5e4e0fdd0a03ed5772408bbc7c02",onClick:()=>{this.alter({top:this.bottom()})}},h("ls-icon",{key:"1f7933380d6fbfc524cdebc7f86fa1f74ebf1395",name:"field-alignment-bottom"}))))),h("div",{key:"8bf879e9ce04d81f0f5b6df99566a41be51ed470",class:"ls-field-properties-section"},h("div",{key:"a7fee5248dab7322aa5fef2ff2f1dcf91728ee33",class:"ls-field-properties-section-text"},h("p",{key:"b8eb47ce94ec9d00e776ac505686666c430aac61",class:"ls-field-properties-section-title"},"Location"),h("p",{key:"17f950776fa0207b9c66a6d6a911e67b1b66c86d",class:"ls-field-properties-section-description"},"Use coordinates to move your fields on the page")),h("div",{key:"da01c959b6265147ed9d90a050401f36228a283d",class:"input-row"},h("div",{key:"4dac7c60fdaa4493de9b42401dfacdb031c38a25",class:"input-wrapper"},h("ls-icon",{key:"11e8d9bacb897bb04f12b818448eeb039bbf7a47",id:"selectLeadingIcon",name:"x-letter"}),h("input",{key:"24b67407ed28079cf4f5d873c2c771b8f15d8a9c",type:"number",class:"has-leading-icon",aria:"top-location",id:"top-location",value:this.dataItem?.left,onChange:e=>this.alter({left:e.target.value})})),h("div",{key:"f80ae951bd8f5e8e219aa480a4a16ff55f46d8ab",class:"input-wrapper"},h("ls-icon",{key:"b86661a641e357a9b0867d65b4ccee62bea4e44e",id:"selectLeadingIcon",name:"y"}),h("input",{key:"d2357ca6884f20d72bfb3dbbaa1a14ed797f646b",type:"number",class:"has-leading-icon",aria:"left-location",id:"left-location",value:this.dataItem?.top,onChange:e=>this.alter({top:e.target.value}),width:"30"})))),h("div",{key:"5a10ba1fa5515601b24343d0b1bf54a97ca29bb3",class:"ls-field-properties-section"},h("div",{key:"4b23811405359d00533810851c817939258e7e25",class:"ls-field-properties-section-text"},h("p",{key:"328d03492253d0aa58e1155b02fc29efb057c9f8",class:"ls-field-properties-section-title"},"Distribution"),h("p",{key:"e2fecc82d431ee3756d502d45b143b900313ac15",class:"ls-field-properties-section-description"},"Multi-select fields and evenly space them out")),h("div",{key:"2c8ba1520ce6aad2c6d96c97b00c3f54e6820b51",class:"button-group"},h("button",{key:"69187c8725b6b545ae9cb724b1deaf74e8d9cc88",disabled:true},h("ls-icon",{key:"c3d9cdccfb4fb61acd39d941f4d8a4cec449f075",name:"field-distribute-vertically"})),h("button",{key:"72bdb68d15e0e10233dd763c1428cad730a744c7",disabled:true},h("ls-icon",{key:"1d07a51d8b73bf486f286bfc2d6adfa09038305d",name:"field-distribute-horizontally"})))),h("div",{key:"0776885c8c491e8717548a2e4287403a96488cc4",class:"ls-field-properties-section"},h("div",{key:"3ba1d1ea93a606de7b7a533326465e18487e5560",class:"ls-field-properties-section-text"},h("p",{key:"c31cba25f48fdcfe8883443ddecc82e7be4378f4",class:"ls-field-properties-section-title"},"Gap"),h("p",{key:"5f6998f21adb8803857a79e6da129022905a8c87",class:"ls-field-properties-section-description"},"Define the exact gap between multi-select fields.")),h("div",{key:"194a8a16e88493b7b4960fa7ab5ceba6e95b78d9",class:"input-row"},h("div",{key:"19862c6084d6fd681ce71bf0e5ba6c2141807d49",class:"input-wrapper"},h("ls-icon",{key:"fc168bd1174daddec9d761b1d8692b69d37cf331",id:"selectLeadingIconDisabled",name:"field-distribute-vertically"}),h("input",{key:"9ce4fe9e1ea759eb867adde5d5360dd3534ebbd0",type:"number",value:"0",class:"has-leading-icon",aria:"vertical-gap",id:"vertical-gap",disabled:true})),h("div",{key:"54eea8b43335fe796755f36f66ce6828479c137f",class:"input-wrapper"},h("ls-icon",{key:"9f94c55ced5a9d3fe43b472a7fcc9f9d7c830fad",id:"selectLeadingIconDisabled",name:"field-distribute-horizontally"}),h("input",{key:"eb65a84f010fc9f5abfa8fd5fd369cdad2b9670d",type:"number",value:"0",class:"has-leading-icon",aria:"horizontal-gap",id:"horizontal-gap",disabled:true}))))))}};LsFieldPlacement.style=lsFieldPlacementCss;const lsFieldPropertiesCss=":host{display:block;width:100%;padding:1rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldProperties=class{constructor(e){registerInstance(this,e)}dataItem;renderFields(){if(this.dataItem&&this.dataItem?.length===1){switch(this.dataItem[0].formElementType){case"signature":return h("ls-field-properties-signature",{dataItem:this.dataItem[0]});case"date":return h("ls-field-properties-date",{dataItem:this.dataItem[0]});case"autodate":return h("ls-field-properties-date",{dataItem:this.dataItem[0]});case"text":return h("ls-field-properties-text",{dataItem:this.dataItem[0]});case"number":return h("ls-field-properties-number",{dataItem:this.dataItem[0]});case"autosign":return h("ls-field-properties-autosign",{dataItem:this.dataItem[0]});case"email":return h("ls-field-properties-email",{dataItem:this.dataItem[0]});case"image":return h("ls-field-properties-image",{dataItem:this.dataItem[0]});case"file":return h("ls-field-properties-file",{dataItem:this.dataItem[0]});case"dropdown":return h("ls-field-properties-file",{dataItem:this.dataItem[0]});default:return h("ls-field-properties-general",{dataItem:this.dataItem[0]})}}else if(this.dataItem&&this.dataItem?.length>1)return h("ls-field-properties-multiple",{dataItem:this.dataItem})}handleKeyDown=e=>{e.stopPropagation()};handleKeyUp=e=>{e.stopPropagation()};render(){return h(Host,{key:"1e03ad4e124276ccfa66cea66dce135720ae6f53",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp},this.dataItem&&this.renderFields(),h("slot",{key:"af5b649c1263811b7e6ccd7780d102eab5cb57f8"}))}};LsFieldProperties.style=lsFieldPropertiesCss;const lsFieldPropertiesAdvancedCss=":host,.field-set{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.25rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesAdvanced=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;expanded=false;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}alter(e,t=0){console.log("Altering advanced props:",e);let r=[];if(this.isMultiple(this.dataItem)){this.dataItem=this.dataItem.map((t=>({...t,...e})));r=this.dataItem.map((t=>({action:"update",data:{...t,...e}})))}else if(this.isSingle(this.dataItem)){this.dataItem={...this.dataItem,...e};r=[{action:"update",data:{...this.dataItem,...e}}]}if(t===0){this.update.emit(r);this.mutate.emit(r)}else{this.debounce(r,t)}}titletimer;debounce(e,t){if(this.titletimer)clearTimeout(this.titletimer);this.titletimer=setTimeout((()=>{this.update.emit(e);this.mutate.emit(e)}),t)}getValue(e){if(this.isMultiple(this.dataItem)){return""}else if(this.isSingle(this.dataItem)){return this.dataItem[e]}return""}render(){return h(Host,{key:"b41038d099fa8bfead03ceb60f847a5ccd709ca7"},h("div",{key:"f445b43700361da1e2c24f48a4fe5e75d970496f",class:"expand-fields-row",onClick:()=>this.expanded=!this.expanded},h("ls-icon",{key:"e971c83d54da07adb10c054d18771571039afb57",name:this.expanded?"expand":"collapse",size:"20",solid:true}),h("p",{key:"9964a2e018d92ed41f3c2582496e3d6a3e3ef1ae"},"Advanced Properties")),this.expanded&&h("div",{key:"1082b8d65cd9a8d7b534057d950934c8220aaee7",class:"field-set"},h("ls-props-section",{key:"b87b473dd3b58d970fe99c31023183cda2c3c812",sectionTitle:"Field Order",sectionDescription:"Determines what order fields will be filled in by the user"},h("input",{key:"65a71d05074ba7f81efa37c501f3ec896b808ea7",value:this.getValue("fieldOrder"),type:"number",placeholder:"eg. 1",onInput:e=>{console.log(e);this.alter({fieldOrder:e.target.value},100)},onChange:()=>{console.log("onchange")}})),h("ls-props-section",{key:"7cb8a2f4b7f52654ab545973f47bb1817f029d42",sectionTitle:"Ref. Name"},h("input",{key:"c78bc57e27a15cca0ca3f5882cbb026c664b4367",value:this.getValue("link"),placeholder:"eg. checkbox group",onInput:e=>this.alter({link:e.target.value},300)})),h("ls-props-section",{key:"77ade8f9d070dc35cf4967b09e57d886b6330549",sectionTitle:"Link Type",sectionDescription:"Determines in what way this field is linked to other fields"},h("select",{key:"538ffba753725e206b29cbba37cc31798a8aed43",onChange:e=>this.alter({linkType:e.target.value}),name:"Link Field","aria-label":"Link Field"},h("option",{key:"4e91e476d038bd2c36cd32d7d2aefe81bba5c5be",value:"0",selected:this.getValue("linkType")==="0"},"None"),h("option",{key:"41960a580f6776a8d7b3cadf21c2fe94487389cf",value:"1",selected:this.getValue("linkType")==="1"},"One of a group (e.g. select one checkbox)"),h("option",{key:"23a0a2b5f6e081247e4d816aa3e506baa570d242",value:"2",selected:this.getValue("linkType")==="2"},"Add to a total"),h("option",{key:"f9e20adc34266415b8851ee63b774b7e6bf7d3b5",value:"3",selected:this.getValue("linkType")==="3"},"Make this conditional upon..."))),h("ls-props-section",{key:"d4656287b628b8c6cdfcc11e1edef07b328ca5ee",sectionTitle:"Link Value",sectionDescription:"Fields with the same Link Value will be linked together"},h("input",{key:"ec571add5025c9767d738f84d9033492279472d6",value:this.getValue("logicAction"),width:"30",placeholder:"eg. checkbox group",onChange:e=>this.alter({logicAction:e.target.value})}))))}};LsFieldPropertiesAdvanced.style=lsFieldPropertiesAdvancedCss;const lsFieldPropertiesAutosignCss=":host{display:block}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesAutosign=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"df46931c369890f5abf0d25bd9fa8a8ad85ad68c"},h("div",{key:"2f0d8d99305c136efd368327b8fd333435f068dd",class:"ls-field-properties-section"},"Self Sign Field"),h("div",{key:"bd70079d45b70bd3a2c18a148507757bee9f5973"},"Label: ",h("input",{key:"108a5cc6158af4cb6a37c8f5678039bb354ec591",value:this.dataItem?.label,width:"30"})),h("ls-field-dimensions",{key:"3952b6ca0af4d444243f3c1d821ff72b74ad0100",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"95df9502c26ca62a8ad46f946742c84555e9c40a",dataItem:this.dataItem}),h("ls-field-footer",{key:"8394977015e41a56d4896d6810e96c4df13c2ae2",dataItem:this.dataItem}),h("slot",{key:"c6974754a07f99372795a71d9ec370bcbd345a08"}))}};LsFieldPropertiesAutosign.style=lsFieldPropertiesAutosignCss;const lsFieldPropertiesContainerCss="*{margin:0;box-sizing:border-box}:host{display:flex;flex-direction:column;gap:1rem;width:100%;height:calc(100% - 7.25rem);position:relative}.tabs-container{display:grid;width:100%;gap:0.125rem;padding:0.125rem;border:1px solid var(--gray-30, #e0e2e5);border-radius:0.75rem;background:var(--white, #ffffff)}.ls-tab{all:unset;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0.5rem;border-radius:0.625rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;color:var(--gray-80, #6c6e73);text-transform:capitalize}.ls-tab.active{background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.ls-tab:not(.active):hover{background:var(--gray-10, #f7f8fa)}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}.scrolling-container{overflow-y:auto;padding:0 1rem;margin:0 -1rem;height:100%}";const LsFieldPropertiesContainer=class{constructor(e){registerInstance(this,e)}dataItem;tabs=[];selectedTab;componentWillLoad(){if(!this.selectedTab){this.selectedTab=this.tabs[0]||""}}render(){return h(Host,{key:"0603644fbc51f89389ddc25dd5b1371730feaeef"},this.tabs.length>1&&h("div",{key:"602100153a470e329145e69bd38d200cc62daa7b",class:"tabs-container",style:{gridTemplateColumns:`repeat(${this.tabs.length}, 1fr)`}},this.tabs.map((e=>h("button",{class:e===this.selectedTab?"ls-tab active":"ls-tab",onClick:()=>this.selectedTab=e},e)))),h("div",{key:"2e63a3beabdcbaa4e7b15651ecdd0c583229d44f",class:"scrolling-container"},h("slot",{key:"4e891478873ea12a5c91e7ba4e45cbfc1398f149",name:this.selectedTab})))}};LsFieldPropertiesContainer.style=lsFieldPropertiesContainerCss;const lsFieldPropertiesDateCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesDate=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"36e129289aa11e64e2bd75fd1309439b3a520457"},h("ls-field-properties-container",{key:"809c2b386857b610fd9e871e6579eb84e7d9feeb",tabs:["content","placement","dimensions"]},h("div",{key:"ac2c345789f21e600ecbd4f55d2b55801a8e5a80",class:"field-set",slot:"content"},h("ls-field-content",{key:"2a1aa657a4f802f4ad34baac2031b71330f2ab82",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"6032597ec4c0a36c12b044acc27da1373ede3348",dataItem:this.dataItem})),h("div",{key:"2becaa0335ce5a94dddc5f7c8dde19821801c520",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"5af127cb268acdd44e08845339fb33b8656aca96",dataItem:this.dataItem})),h("div",{key:"b35e78ff494db8e0688b7ce1c1a75f21ed176e13",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"067d2bdf244f537716d6916663357636bd551e00",dataItem:this.dataItem}))),h("ls-field-footer",{key:"53cbced3ec835b84dcd23c91ceef8345f6a040de",dataItem:this.dataItem}))}};LsFieldPropertiesDate.style=lsFieldPropertiesDateCss;const lsFieldPropertiesEmailCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesEmail=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"557c90379fcb802368e3cc9900aa1b5d795e89bb"},h("ls-field-properties-container",{key:"9406fe9d01158e2cc360a97f597c633114654d1d",tabs:["content","placement","dimensions"]},h("div",{key:"85399d641c1f731c77d67f1a83a0c9d8772e7baf",class:"field-set",slot:"content"},h("ls-field-content",{key:"3e24119b85e872c3b706e6e99c107035a4cb6353",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"7d17afd248948968abe6358d1f96798f9ecd5f3c",dataItem:this.dataItem})),h("div",{key:"bef58eca745bacad8969861db73655986135d952",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"075fd44bd77e2c3e5d380167530dc87b6b94cf8e",dataItem:this.dataItem})),h("div",{key:"421e4db23ff914c7d6b861dae38d92d115472a0c",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"7a281a15446c697d5a4da832ef09b970faf806a7",dataItem:this.dataItem}))),h("ls-field-footer",{key:"6a9a2c13c5692e15ae816c655f0a2e40f88445b8",dataItem:this.dataItem}))}};LsFieldPropertiesEmail.style=lsFieldPropertiesEmailCss;const lsFieldPropertiesFileCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesFile=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"bee6d5d0d1f6520b1784585b0ea4517faabdda70"},h("ls-field-properties-container",{key:"a37773f2fc761aac6ad779a83f833d7b268949c4",tabs:["content","placement","dimensions"]},h("div",{key:"68bc9c76ab775a782330f02da0534b4b76f842f5",class:"field-set",slot:"content"},h("ls-field-content",{key:"223ce26cb3a8afcbe12d356a346f682a07c4cbae",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"829a97eb8b576280cf9a8ce2d8497c51e293244b",dataItem:this.dataItem})),h("div",{key:"2ec54dd64c0303fd63cdeb9f9eb4263ac39e8fbe",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"111fd6c0372890cbce36e2dc22a991c8decc95d0",dataItem:this.dataItem})),h("div",{key:"425689aebfda1c89de75fe9471db3937053a2a1b",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"7bedf59453fb4083dfa2e1b1976fb139600d1325",dataItem:this.dataItem}))),h("ls-field-footer",{key:"bf6a97a46730aa15abd404a5b11737ece8acbfab",dataItem:this.dataItem}))}};LsFieldPropertiesFile.style=lsFieldPropertiesFileCss;const lsFieldPropertiesGeneralCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesGeneral=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"bae2503fd50b94ad99bfbb24f2abe5e6d5629e2e"},h("ls-field-properties-container",{key:"deceb2d1e04ab59a142a46cb9a14a8c38c82b093",tabs:["content","placement","dimensions"]},h("div",{key:"4a7e524042efba3b2f03fc82598660dd78e3613e",class:"field-set",slot:"content"},h("ls-field-content",{key:"820a9ed90d55c4138441442c08ee94c70ccd1d0c",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"c999ac86bed0fb6e220c48b7848e3ef7b4101d94",dataItem:this.dataItem})),h("div",{key:"1123d84abf45da1002b62f0d44227cb8361be661",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"4c4c2ccd243e44c36f5f9c4862a12c10e188c630",dataItem:this.dataItem})),h("div",{key:"f4b01c607e46eaf9895aa6949d3fc7071c3da3ac",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"9f7628923c352061af77363ff4fff8391b955abf",dataItem:this.dataItem}))),h("ls-field-footer",{key:"ae2d65be67e5fc3c13dbffec1e7c1a63c902c394",dataItem:this.dataItem}))}};LsFieldPropertiesGeneral.style=lsFieldPropertiesGeneralCss;const lsFieldPropertiesImageCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesImage=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"ddf83beff21acc56fc0bcdea811f8c93294bace3"},h("ls-field-properties-container",{key:"3249c39e164149e3d3c393ed40225bb06af75ab7",tabs:["content","placement","dimensions"]},h("div",{key:"6aee8f7c5a58d52c53ea0a905b99436c286cbd67",class:"field-set",slot:"content"},h("ls-field-content",{key:"b6265eb5dfb39f3283ffc2045b8460f95093771e",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"aec88fe3ca2d5fffaeb949a155d2f4dd56ba54b8",dataItem:this.dataItem})),h("div",{key:"57acc8a5f78004601c787655fe5f7ee9374f46e8",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"c75abe20033bfa8fa3526312b84bca714472df02",dataItem:this.dataItem})),h("div",{key:"ace7da4cdf9f231fbbb42ca5ada0150f073049f7",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"5fc562a92d7948974eca672bd98a891b93ec299e",dataItem:this.dataItem}))),h("ls-field-footer",{key:"537e4d7fb85548e3d366af7fe7ae4eed044bb032",dataItem:this.dataItem}))}};LsFieldPropertiesImage.style=lsFieldPropertiesImageCss;const defaultFieldIcons={signature:"signature","auto sign":"auto-sign",text:"text","signing date":"auto-date",date:"calender",initials:"initials",checkbox:"check",email:"at-symbol",number:"hashtag",image:"photograph",dropdown:"document-text",file:"upload","drawn field":"pencil","regular expression":"code"};function getFieldIcon(e){return defaultFieldIcons[e]||"view-grid"}const lsFieldPropertiesMultipleCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.properties-container{display:flex;flex-direction:column;height:100%}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-field-type-wrapper{position:relative;border-radius:0.875rem;padding:0.25rem}.ls-field-type-inner{border-radius:0.625rem;background:var(--white, #fff);display:flex;padding:0.25rem 0.5rem 0.25rem 0.25rem;align-items:center;gap:0.875rem;align-self:stretch}.ls-field-type-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.5rem;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-field-type-name{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1.5rem;text-transform:capitalize}.tabs-container{display:grid;grid-template-columns:repeat(3, 1fr);width:100%;gap:0.125rem;padding:0.125rem;border:1px solid var(--gray-30, #e0e2e5);border-radius:0.75rem;background:var(--white, #ffffff)}.ls-tab{all:unset;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0.5rem;border-radius:0.625rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;color:var(--gray-80, #6c6e73)}.ls-tab.active{background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.ls-tab:not(.active):hover{background:var(--gray-10, #f7f8fa)}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}.scrolling-container{overflow-y:auto;padding:0 1rem;margin:0 -1rem;height:calc(100% - 10.938rem)}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.input-wrapper{position:relative}.full-width{width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesMultiple=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){this.dataItem=this.dataItem.map((t=>({...t,...e})));this.debounce(e,500)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.mutate.emit(t);this.update.emit(t)}),t)}allSignersSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,signer:undefined};const e=this.dataItem[0].signer;const t=this.dataItem.every((t=>t.signer===e));return{isSame:t,signer:t?e:13}};allLabelsSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,label:undefined};const e=this.dataItem[0].label;const t=this.dataItem.every((t=>t.label===e));return{isSame:t,label:t?e:undefined}};allElementsSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,elementType:"mixed"};const e=this.dataItem[0].elementType;const t=this.dataItem.every((t=>t.elementType===e));return{isSame:t,elementType:t?e:"mixed"}};allFieldsOptional=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,optional:false};const e=this.dataItem[0].optional;const t=this.dataItem.every((t=>t.optional===e));return{isSame:t,optional:t?e:false}};render(){return h(Host,{key:"f476c81a545cfa5d49517c70cfe8f12ecbf22cd7"},h("ls-field-properties-container",{key:"1a8fdf264a6d8e7eb234f64ff2903b87746c91e2",tabs:["content","placement","dimensions"]},h("div",{key:"415c57349a6ad5305b558483b65d1e3e80c4cfc1",class:"field-set",slot:"content"},h("div",{key:"3a29f3fbb697f06743f796d4e73d52af64926b40",class:"ls-field-properties-section"},h("div",{key:"cb368cfd54d6dc7a391f3c8583f7c97ac2d03639",class:"ls-field-properties-section-text"},h("p",{key:"c244f2e88969792b29a8107c75fd4ec092639185",class:"ls-field-properties-section-title"},"Field Type"),h("p",{key:"af171d75c8f0e2e568c4ab01535d49eac53630f3",class:"ls-field-properties-section-description"},"The Fields you currently have selected")),h("div",{key:"3afaaa697c6e4b381854bc10eb177b7d3b47d6c1",class:"ls-field-type-wrapper",style:{border:`1px dashed ${defaultRolePalette[this.allSignersSame().signer%100].s30}`,background:defaultRolePalette[this.allSignersSame().signer%100].s10}},h("div",{key:"d468dc7f2d3e3c626348a137fa43aba2c965cba6",class:"ls-field-type-inner"},h("div",{key:"2047648d2b18974e2ed65b94ffbf6aa397e84177",class:"ls-field-type-icon",style:{border:`1px solid ${defaultRolePalette[this.allSignersSame().signer%100].s60}`,color:defaultRolePalette[this.allSignersSame().signer%100].s60,background:defaultRolePalette[this.allSignersSame().signer%100].s10}},h("ls-icon",{key:"a3d57f28b6cd6cf372da48f53892e681a9a819cc",name:getFieldIcon(this.allElementsSame().elementType),size:"20"})),h("p",{key:"594dc697a1f908fd41e202588a7cf799e6ba201e",class:"ls-field-type-name"},this.dataItem.length," ",this.allElementsSame().elementType," ","Fields")))),h("div",{key:"c4c9baafa20cf8a7aea384ced5f41d04ec6dce17",class:"ls-field-properties-section row"},h("div",{key:"6c4e47a9e34898860fdabdf0bd7849a1de49c797",class:"ls-field-properties-section-text"},h("p",{key:"b07c560ea096a8966074c1b55b97cca62c96f404",class:"ls-field-properties-section-title"},"Required Field")),h("ls-toggle",{key:"506d4aba1e3cee00dc291a4a3e6a90328f366526",onValueChange:e=>this.alter({optional:!e.detail}),checked:!this.allFieldsOptional().optional,indeterminate:this.allFieldsOptional().isSame===false})),h("div",{key:"9a872405a537b1bdbbd69cd24344393141bb6759",class:"ls-field-properties-section"},h("div",{key:"f61b198abd3a21adaf3984ce1e0f1e234176f600",class:"ls-field-properties-section-text"},h("p",{key:"751dbeb8d45c04b182e83327c9514840c9e8f370",class:"ls-field-properties-section-title"},"Field Label"),h("p",{key:"3b87f243c3a86c1c52d8604ec3bd9411e11309ea",class:"ls-field-properties-section-description"},"Add a label to clarify the information required from the Recipient.")),h("input",{key:"faaa4bb9f9ea893eca15a4034cd582afd49a2965",value:this.allLabelsSame().label,onInput:e=>this.alter({label:e.target.value}),width:"30",placeholder:"eg. Sign Here"}))),h("div",{key:"456511585e43608a89e7d5331eb027ab71d08e98",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"0aaafaf40ce37451f6f9ea459ccd9e07e7bedc9f",dataItem:this.dataItem}),h("ls-field-size",{key:"b1aa99293901f0ade2647688bb0ea3cb7c681850",dataItem:this.dataItem})),h("div",{key:"e2901a24e8a7994169e4d146a7c3c55040802398",class:"field-set",slot:"placement"},h("ls-field-alignment",{key:"0e26ff3cdde4a50f3d6d1d326d76219bf5bdc93b",dataItem:this.dataItem}),h("ls-field-placement",{key:"f20e953cec0564b6b013d4e560f2532b29c50952",dataItem:this.dataItem}),h("ls-field-distribute",{key:"8eb4e16583a4bd3b550178f83038067a3a8412e5",dataItem:this.dataItem}))),h("ls-field-footer",{key:"b5b1b4bfaef25effda90fb0a6b9ee00e9d950d8c"}),h("slot",{key:"57f76abbe5d2e9592d88c53f66d20b074d251ac6"}))}};LsFieldPropertiesMultiple.style=lsFieldPropertiesMultipleCss;const lsFieldPropertiesNumberCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesNumber=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"68ff2165b13ccc43d6a685a7d6d42396f06b925a"},h("ls-field-properties-container",{key:"f16402f8dd1ee0e98a346b1347c938baab354846",tabs:["content","placement","dimensions"]},h("div",{key:"2b715391b5d40c3f040ff171ae2da91b4f8cffa1",class:"field-set",slot:"content"},h("ls-field-content",{key:"32846c02fcc7f55e73a432ab1cd0516ff1c23554",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"2e2b0e88c815e0e18935793fa1bb0d33389492b8",dataItem:this.dataItem})),h("div",{key:"60b2074337012d34fa809c772f9fde6deb0f3ff7",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"bc3785f75bbc19e32b51a8a904f2b2a350c10a69",dataItem:this.dataItem})),h("div",{key:"16f27469b5eb8a5695305b145dd0a63de95bbc4c",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"26219c3f7913f5c0c962fe7faf8739de119a02c6",dataItem:this.dataItem}))),h("ls-field-footer",{key:"c83c7dda209e25158808a8f1c9d37f5eaac1ddbe",dataItem:this.dataItem}))}};LsFieldPropertiesNumber.style=lsFieldPropertiesNumberCss;const lsFieldPropertiesSignatureCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesSignature=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"62a9fd4dd5535ce5bcc94fe11cb07020fe391742"},h("ls-field-properties-container",{key:"b15a383a7c51769a9c52266c91a47f65c0e85fcb",tabs:["content","placement","dimensions"]},h("div",{key:"cea89d50cb383f0468553718fe3b11c2116de837",class:"field-set",slot:"content"},h("ls-field-content",{key:"f3043200e40ef623e0686a88ee3bad50195837d3",dataItem:this.dataItem,showValidationTypes:false}),h("ls-field-properties-advanced",{key:"4df0fa78e6b9da356e25f0e6a7192b094fcf8ff3",dataItem:this.dataItem})),h("div",{key:"331a919f4521b1995a9c5e3200587b50ce34c64d",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"816c2f009afb374398640cd08a218523704a3abf",dataItem:this.dataItem})),h("div",{key:"00abad768142abdca45ad3b490cef45f40ff339e",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"ec7710454b70120172308d1c5abafd3a1f307192",dataItem:this.dataItem}))),h("ls-field-footer",{key:"0c27bcb56616a77d26017e6541bbf5a21d36a4b0",dataItem:this.dataItem}))}};LsFieldPropertiesSignature.style=lsFieldPropertiesSignatureCss;const lsFieldPropertiesTextCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesText=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"42c376824ac0c4987319bbcd556420351c8c7abe"},h("ls-field-properties-container",{key:"2d341f1daef2b8c4cfbf1b6da7613aee0ebc6214",tabs:["content","placement","dimensions"]},h("div",{key:"11379672c5f10a25793bb1845c62d3d9f3cca9fb",class:"field-set",slot:"content"},h("ls-field-content",{key:"f8d31ed0dadefadf09b01bec1c6b06c3294662bd",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"e48c9bfe2abbcbd7fe4075a14741a2e17b946994",dataItem:this.dataItem})),h("div",{key:"23b04bd4d66018f4ec4e9c727cd4e55ad36663e0",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"03f0589f370fd86319a91a38e9ab85e3b038319f",dataItem:this.dataItem})),h("div",{key:"f9aee3ec9536ba05ea963e46e7575c254de7b154",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"088523bd2b8f06eebe6c969b7a846cbfee31fe5c",dataItem:this.dataItem}))),h("ls-field-footer",{key:"d290dea659d37cd2cdad5dd5f03e71d118db9473",dataItem:this.dataItem}))}};LsFieldPropertiesText.style=lsFieldPropertiesTextCss;const lsFieldSizeCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-toolbar-numeric{width:45px;max-height:18px;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldSize=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"3512b35c1a8bdace79f2196765e2892387a082ab"},h("div",{key:"b0535c73b7ad10b7a41d09fc3e97847802c04ea7",class:"ls-field-properties-section"},h("div",{key:"5f938c1b6f72720657fd06337cff7b2cfb7e0b18",class:"ls-field-properties-section-text"},h("p",{key:"2285e0fc40f37ac0e63f145f5111825371677114",class:"ls-field-properties-section-title"},"Scale and Resize"),h("p",{key:"79dece2d13f38f5f6473fd82a19e5574ae2152b1",class:"ls-field-properties-section-description"},"Multi-select fields and match their dimensions")),h("div",{key:"0ab5908841094a3ebc9053a4047608fdb1ceb5ea",class:"button-group"},h("button",{key:"7d711ca327b83444e3f7f7da6f308abd8de79c88",onClick:()=>this.alter({width:this.dataItem[0].width,height:this.dataItem[0].height}),"aria-label":"Make selected fields the same height and width as the first selected field.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same height and width as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"2f8262c4497b399c1f7b3331c83cbdd2da9bf7c7",name:"field-scale"})),h("button",{key:"af9ccb863f0f310b753a8b57fe4ec6bda2b984aa","aria-label":"Make selected fields the same width as the first selected field.",onClick:()=>this.alter({width:this.dataItem[0].width}),"data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same width as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"c00a7c60775de17e949063175e15af84d2d53324",name:"field-match-width"})),h("button",{key:"32236424b6bf23199df20d686b1ed3db4020ef51",onClick:()=>this.alter({height:this.dataItem[0].height}),"aria-label":"Make selected fields the same height as the first selected field.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same height as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"69e4ad1909f9c3cf82dd37f96d6a36d4508a0ab8",name:"field-match-height"})))),h("slot",{key:"de626a2771e6e5f24f9e1a445789f314223a4479"}))}};LsFieldSize.style=lsFieldSizeCss;const defaultFieldLabels={signature:"Signature","auto sign":"Auto Sign",text:"Text","signing date":"Auto Date",date:"Date",initials:"Initials",checkbox:"Checkbox",email:"Email",number:"Number",image:"Image",dropdown:"Dropdown",file:"File","drawn field":"Draw","regular expression":"RegEx"};function getFieldLabel(e){return defaultFieldLabels[e]||"Unknown"}const lsFieldTypeDisplayCss=":host{position:relative;border-radius:0.875rem;padding:0.25rem}*{margin:0}.ls-field-type-inner{border-radius:0.625rem;background:var(--white, #fff);display:flex;padding:0.25rem 0.5rem 0.25rem 0.25rem;align-items:center;gap:0.875rem;align-self:stretch}.ls-field-type-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.5rem;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-field-type-name{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1.5rem;}";const LsFieldTypeDisplay=class{constructor(e){registerInstance(this,e)}assignee;fieldType="signature";render(){const e=defaultRolePalette[this.assignee%100];return h(Host,{key:"73dd27b05de7a8477b497ee5bb79af0ca31789b2",class:"ls-field-type-wrapper",style:{border:`1px dashed ${e.s30}`,background:e.s10}},h("div",{key:"445d44e52106148630629b0fafab019422f1a05d",class:"ls-field-type-inner"},h("div",{key:"2abde211fce10f59df054f70bcfd5f7cd21cd624",class:"ls-field-type-icon",style:{border:`1px solid ${e.s60}`,color:e.s60,background:e.s10}},h("ls-icon",{key:"e521264b748012a137d3246f9d539e9e93704d4c",name:getFieldIcon(this.fieldType),size:"20"})),h("p",{key:"3da29fd61c972c9cee454bccd69d70736fe22a2a",class:"ls-field-type-name"},getFieldLabel(this.fieldType))))}};LsFieldTypeDisplay.style=lsFieldTypeDisplayCss;const html=String.raw;const icons=[{name:"mail",svgSolid:html`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
|
|
43
|
+
*/var pdf_viewer=pdf_viewer$1.exports;var hasRequiredPdf_viewer;function requirePdf_viewer(){if(hasRequiredPdf_viewer)return pdf_viewer$1.exports;hasRequiredPdf_viewer=1;(function(e,t){(function t(r,i){e.exports=i()})(pdf_viewer,(function(){return function(e){var t={};function r(i){if(t[i]){return t[i].exports}var o=t[i]={i,l:false,exports:{}};e[i].call(o.exports,o,o.exports,r);o.l=true;return o.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var o in e)r.d(i,o,function(t){return e[t]}.bind(null,o));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=0)}([function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:true,get:function(){return i.AnnotationLayerBuilder}});Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:true,get:function(){return i.DefaultAnnotationLayerFactory}});Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:true,get:function(){return o.DefaultTextLayerFactory}});Object.defineProperty(t,"TextLayerBuilder",{enumerable:true,get:function(){return o.TextLayerBuilder}});Object.defineProperty(t,"EventBus",{enumerable:true,get:function(){return n.EventBus}});Object.defineProperty(t,"NullL10n",{enumerable:true,get:function(){return n.NullL10n}});Object.defineProperty(t,"ProgressBar",{enumerable:true,get:function(){return n.ProgressBar}});Object.defineProperty(t,"PDFLinkService",{enumerable:true,get:function(){return s.PDFLinkService}});Object.defineProperty(t,"SimpleLinkService",{enumerable:true,get:function(){return s.SimpleLinkService}});Object.defineProperty(t,"DownloadManager",{enumerable:true,get:function(){return l.DownloadManager}});Object.defineProperty(t,"GenericL10n",{enumerable:true,get:function(){return a.GenericL10n}});Object.defineProperty(t,"PDFFindController",{enumerable:true,get:function(){return d.PDFFindController}});Object.defineProperty(t,"PDFHistory",{enumerable:true,get:function(){return c.PDFHistory}});Object.defineProperty(t,"PDFPageView",{enumerable:true,get:function(){return h.PDFPageView}});Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:true,get:function(){return u.PDFSinglePageViewer}});Object.defineProperty(t,"PDFViewer",{enumerable:true,get:function(){return f.PDFViewer}});var i=r(1);var o=r(5);var n=r(3);var s=r(4);var l=r(6);var a=r(8);var d=r(10);var c=r(12);var h=r(13);var u=r(15);var f=r(17)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var i=r(2);var o=r(3);var n=r(4);class s{constructor({pageDiv:e,pdfPage:t,linkService:r,downloadManager:i,imageResourcesPath:n="",renderInteractiveForms:s=false,l10n:l=o.NullL10n}){this.pageDiv=e;this.pdfPage=t;this.linkService=r;this.downloadManager=i;this.imageResourcesPath=n;this.renderInteractiveForms=s;this.l10n=l;this.div=null;this._cancelled=false}render(e,t="display"){this.pdfPage.getAnnotations({intent:t}).then((t=>{if(this._cancelled){return}const r={viewport:e.clone({dontFlip:true}),div:this.div,annotations:t,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div){i.AnnotationLayer.update(r)}else{if(t.length===0){return}this.div=document.createElement("div");this.div.className="annotationLayer";this.pageDiv.appendChild(this.div);r.div=this.div;i.AnnotationLayer.render(r);this.l10n.translate(this.div)}}))}cancel(){this._cancelled=true}hide(){if(!this.div){return}this.div.setAttribute("hidden","true")}}t.AnnotationLayerBuilder=s;class l{createAnnotationLayerBuilder(e,t,r="",i=false,l=o.NullL10n){return new s({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:i,linkService:new n.SimpleLinkService,l10n:l})}}t.DefaultAnnotationLayerFactory=l},function(e,t,r){let i;if(typeof window!=="undefined"&&window["pdfjs-dist/build/pdf"]){i=window["pdfjs-dist/build/pdf"]}else{i=requirePdf()}e.exports=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.isValidRotation=P;t.isValidScrollMode=_;t.isValidSpreadMode=j;t.isPortraitOrientation=E;t.clamp=N;t.getPDFFileNameFromURL=T;t.noContextMenuHandler=S;t.parseQueryString=k;t.backtrackBeforeAllVisibleElements=A;t.getVisibleElements=Z;t.roundToDivide=H;t.getPageSizeInches=V;t.approximateFraction=L;t.getOutputScale=b;t.scrollIntoView=y;t.watchScroll=x;t.binarySearchFirstItem=M;t.normalizeWheelEventDelta=B;t.waitOnEventOrTimeout=D;t.moveToEndOfArray=$;t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;const i=96/72;t.CSS_UNITS=i;const o="auto";t.DEFAULT_SCALE_VALUE=o;const n=1;t.DEFAULT_SCALE=n;const s=.1;t.MIN_SCALE=s;const l=10;t.MAX_SCALE=l;const a=0;t.UNKNOWN_SCALE=a;const d=1.25;t.MAX_AUTO_SCALE=d;const c=40;t.SCROLLBAR_PADDING=c;const h=5;t.VERTICAL_PADDING=h;const u={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.PresentationModeState=u;const f={CANVAS:"canvas",SVG:"svg"};t.RendererType=f;const p={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};t.TextLayerMode=p;const g={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=g;const v={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=v;const C=/\bprint\s*\(/;t.AutoPrintRegExp=C;function m(e,t){if(!t){return e}return e.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,r)=>r in t?t[r]:"{{"+r+"}}"))}const w={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e,t,r){return m(r,t)},async translate(e){}};t.NullL10n=w;function b(e){const t=window.devicePixelRatio||1;const r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;const i=t/r;return{sx:i,sy:i,scaled:i!==1}}function y(e,t,r=false){let i=e.offsetParent;if(!i){console.error("offsetParent is not set -- cannot scroll");return}let o=e.offsetTop+e.clientTop;let n=e.offsetLeft+e.clientLeft;while(i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||r&&getComputedStyle(i).overflow==="hidden"){if(i.dataset._scaleY){o/=i.dataset._scaleY;n/=i.dataset._scaleX}o+=i.offsetTop;n+=i.offsetLeft;i=i.offsetParent;if(!i){return}}if(t){if(t.top!==undefined){o+=t.top}if(t.left!==undefined){n+=t.left;i.scrollLeft=n}}i.scrollTop=o}function x(e,t){const r=function(r){if(o){return}o=window.requestAnimationFrame((function r(){o=null;const n=e.scrollLeft;const s=i.lastX;if(n!==s){i.right=n>s}i.lastX=n;const l=e.scrollTop;const a=i.lastY;if(l!==a){i.down=l>a}i.lastY=l;t(i)}))};const i={right:true,down:true,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r};let o=null;e.addEventListener("scroll",r,true);return i}function k(e){const t=e.split("&");const r=Object.create(null);for(let e=0,i=t.length;e<i;++e){const i=t[e].split("=");const o=i[0].toLowerCase();const n=i.length>1?i[1]:null;r[decodeURIComponent(o)]=decodeURIComponent(n)}return r}function M(e,t){let r=0;let i=e.length-1;if(i<0||!t(e[i])){return e.length}if(t(e[r])){return r}while(r<i){const o=r+i>>1;const n=e[o];if(t(n)){i=o}else{r=o+1}}return r}function L(e){if(Math.floor(e)===e){return[e,1]}const t=1/e;const r=8;if(t>r){return[1,r]}else if(Math.floor(t)===t){return[1,t]}const i=e>1?t:e;let o=0,n=1,s=1,l=1;while(true){const e=o+s,t=n+l;if(t>r){break}if(i<=e/t){s=e;l=t}else{o=e;n=t}}let a;if(i-o/n<s/l-i){a=i===e?[o,n]:[n,o]}else{a=i===e?[s,l]:[l,s]}return a}function H(e,t){const r=e%t;return r===0?e:Math.round(e-r+t)}function V({view:e,userUnit:t,rotate:r}){const[i,o,n,s]=e;const l=r%180!==0;const a=(n-i)/72*t;const d=(s-o)/72*t;return{width:l?d:a,height:l?a:d}}function A(e,t,r){if(e<2){return e}let i=t[e].div;let o=i.offsetTop+i.clientTop;if(o>=r){i=t[e-1].div;o=i.offsetTop+i.clientTop}for(let r=e-2;r>=0;--r){i=t[r].div;if(i.offsetTop+i.clientTop+i.clientHeight<=o){break}e=r}return e}function Z(e,t,r=false,i=false){const o=e.scrollTop,n=o+e.clientHeight;const s=e.scrollLeft,l=s+e.clientWidth;function a(e){const t=e.div;const r=t.offsetTop+t.clientTop+t.clientHeight;return r>o}function d(e){const t=e.div;const r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>s}const c=[],h=t.length;let u=h===0?0:M(t,i?d:a);if(u>0&&u<h&&!i){u=A(u,t,o)}let f=i?l:-1;for(let e=u;e<h;e++){const r=t[e],a=r.div;const d=a.offsetLeft+a.clientLeft;const h=a.offsetTop+a.clientTop;const u=a.clientWidth,p=a.clientHeight;const g=d+u;const v=h+p;if(f===-1){if(v>=n){f=v}}else if((i?d:h)>f){break}if(v<=o||h>=n||g<=s||d>=l){continue}const C=Math.max(0,o-h)+Math.max(0,v-n);const m=Math.max(0,s-d)+Math.max(0,g-l);const w=(p-C)*(u-m)*100/p/u|0;c.push({id:r.id,x:d,y:h,view:r,percent:w})}const p=c[0],g=c[c.length-1];if(r){c.sort((function(e,t){const r=e.percent-t.percent;if(Math.abs(r)>.001){return-r}return e.id-t.id}))}return{first:p,last:g,views:c}}function S(e){e.preventDefault()}function O(e){let t=0;const r=e.length;while(t<r&&e[t].trim()===""){t++}return e.substring(t,t+5).toLowerCase()==="data:"}function T(e,t="document.pdf"){if(typeof e!=="string"){return t}if(O(e)){console.warn("getPDFFileNameFromURL: "+'ignoring "data:" URL for performance reasons.');return t}const r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/;const i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i;const o=r.exec(e);let n=i.exec(o[1])||i.exec(o[2])||i.exec(o[3]);if(n){n=n[0];if(n.includes("%")){try{n=i.exec(decodeURIComponent(n))[0]}catch(e){}}}return n||t}function B(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const r=Math.atan2(e.deltaY,e.deltaX);if(-.25*Math.PI<r&&r<.75*Math.PI){t=-t}const i=0;const o=1;const n=30;const s=30;if(e.deltaMode===i){t/=n*s}else if(e.deltaMode===o){t/=s}return t}function P(e){return Number.isInteger(e)&&e%90===0}function _(e){return Number.isInteger(e)&&Object.values(g).includes(e)&&e!==g.UNKNOWN}function j(e){return Number.isInteger(e)&&Object.values(v).includes(e)&&e!==v.UNKNOWN}function E(e){return e.width<=e.height}const R={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=R;function D({target:e,name:t,delay:r=0}){return new Promise((function(i,o){if(typeof e!=="object"||!(t&&typeof t==="string")||!(Number.isInteger(r)&&r>=0)){throw new Error("waitOnEventOrTimeout - invalid parameters.")}function n(r){if(e instanceof F){e._off(t,s)}else{e.removeEventListener(t,s)}if(a){clearTimeout(a)}i(r)}const s=n.bind(null,R.EVENT);if(e instanceof F){e._on(t,s)}else{e.addEventListener(t,s)}const l=n.bind(null,R.TIMEOUT);const a=setTimeout(l,r)}))}const I=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=I;class F{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:true})}off(e,t){this._off(e,t,{external:true})}dispatch(e){const t=this._listeners[e];if(!t||t.length===0){return}const r=Array.prototype.slice.call(arguments,1);let i;t.slice(0).forEach((function({listener:e,external:t}){if(t){if(!i){i=[]}i.push(e);return}e.apply(null,r)}));if(i){i.forEach((function(e){e.apply(null,r)}));i=null}}_on(e,t,r=null){let i=this._listeners[e];if(!i){this._listeners[e]=i=[]}i.push({listener:t,external:(r&&r.external)===true})}_off(e,t,r=null){const i=this._listeners[e];if(!i){return}for(let e=0,r=i.length;e<r;e++){if(i[e].listener===t){i.splice(e,1);return}}}}t.EventBus=F;function N(e,t,r){return Math.min(Math.max(e,t),r)}class z{constructor(e,{height:t,width:r,units:i}={}){this.visible=true;this.div=document.querySelector(e+" .progress");this.bar=this.div.parentNode;this.height=t||100;this.width=r||100;this.units=i||"%";this.div.style.height=this.height+this.units;this.percent=0}_updateBar(){if(this._indeterminate){this.div.classList.add("indeterminate");this.div.style.width=this.width+this.units;return}this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e);this._percent=N(e,0,100);this._updateBar()}setWidth(e){if(!e){return}const t=e.parentNode;const r=t.offsetWidth-e.offsetWidth;if(r>0){this.bar.style.width=`calc(100% - ${r}px)`}}hide(){if(!this.visible){return}this.visible=false;this.bar.classList.add("hidden");document.body.classList.remove("loadingInProgress")}show(){if(this.visible){return}this.visible=true;document.body.classList.add("loadingInProgress");this.bar.classList.remove("hidden")}}t.ProgressBar=z;function $(e,t){const r=[],i=e.length;let o=0;for(let n=0;n<i;++n){if(t(e[n])){r.push(e[n])}else{e[o]=e[n];++o}}for(let t=0;o<i;++t,++o){e[o]=r[t]}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.SimpleLinkService=t.PDFLinkService=void 0;var i=r(3);class o{constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:r=null,externalLinkEnabled:i=true,ignoreDestinationZoom:o=false}={}){this.eventBus=e;this.externalLinkTarget=t;this.externalLinkRel=r;this.externalLinkEnabled=i;this._ignoreDestinationZoom=o;this.baseUrl=null;this.pdfDocument=null;this.pdfViewer=null;this.pdfHistory=null;this._pagesRefCache=null}setDocument(e,t=null){this.baseUrl=t;this.pdfDocument=e;this._pagesRefCache=Object.create(null)}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}navigateTo(e){const t=({namedDest:r,explicitDest:i})=>{const o=i[0];let n;if(o instanceof Object){n=this._cachedPageNumber(o);if(n===null){this.pdfDocument.getPageIndex(o).then((e=>{this.cachePageRef(e+1,o);t({namedDest:r,explicitDest:i})})).catch((()=>{console.error(`PDFLinkService.navigateTo: "${o}" is not `+`a valid page reference, for dest="${e}".`)}));return}}else if(Number.isInteger(o)){n=o+1}else{console.error(`PDFLinkService.navigateTo: "${o}" is not `+`a valid destination reference, for dest="${e}".`);return}if(!n||n<1||n>this.pagesCount){console.error(`PDFLinkService.navigateTo: "${n}" is not `+`a valid page number, for dest="${e}".`);return}if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.push({namedDest:r,explicitDest:i,pageNumber:n})}this.pdfViewer.scrollPageIntoView({pageNumber:n,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom})};new Promise(((t,r)=>{if(typeof e==="string"){this.pdfDocument.getDestination(e).then((r=>{t({namedDest:e,explicitDest:r})}));return}t({namedDest:"",explicitDest:e})})).then((r=>{if(!Array.isArray(r.explicitDest)){console.error(`PDFLinkService.navigateTo: "${r.explicitDest}" is`+` not a valid destination array, for dest="${e}".`);return}t(r)}))}getDestinationHash(e){if(typeof e==="string"){return this.getAnchorUrl("#"+escape(e))}if(Array.isArray(e)){const t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(e){let t,r;if(e.includes("=")){const o=(0,i.parseQueryString)(e);if("search"in o){this.eventBus.dispatch("findfromurlhash",{source:this,query:o.search.replace(/"/g,""),phraseSearch:o.phrase==="true"})}if("page"in o){t=o.page|0||1}if("zoom"in o){const e=o.zoom.split(",");const t=e[0];const i=parseFloat(t);if(!t.includes("Fit")){r=[null,{name:"XYZ"},e.length>1?e[1]|0:null,e.length>2?e[2]|0:null,i?i/100:t]}else{if(t==="Fit"||t==="FitB"){r=[null,{name:t}]}else if(t==="FitH"||t==="FitBH"||t==="FitV"||t==="FitBV"){r=[null,{name:t},e.length>1?e[1]|0:null]}else if(t==="FitR"){if(e.length!==5){console.error('PDFLinkService.setHash: Not enough parameters for "FitR".')}else{r=[null,{name:t},e[1]|0,e[2]|0,e[3]|0,e[4]|0]}}else{console.error(`PDFLinkService.setHash: "${t}" is not `+"a valid zoom value.")}}}if(r){this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:r,allowNegativeOffset:true})}else if(t){this.page=t}if("pagemode"in o){this.eventBus.dispatch("pagemode",{source:this,mode:o.pagemode})}if("nameddest"in o){this.navigateTo(o.nameddest)}}else{r=unescape(e);try{r=JSON.parse(r);if(!Array.isArray(r)){r=r.toString()}}catch(e){}if(typeof r==="string"||n(r)){this.navigateTo(r);return}console.error(`PDFLinkService.setHash: "${unescape(e)}" is not `+"a valid destination.")}}executeNamedAction(e){switch(e){case"GoBack":if(this.pdfHistory){this.pdfHistory.back()}break;case"GoForward":if(this.pdfHistory){this.pdfHistory.forward()}break;case"NextPage":if(this.page<this.pagesCount){this.page++}break;case"PrevPage":if(this.page>1){this.page--}break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break}this.eventBus.dispatch("namedaction",{source:this,action:e})}cachePageRef(e,t){if(!t){return}const r=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;this._pagesRefCache[r]=e}_cachedPageNumber(e){const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return this._pagesRefCache&&this._pagesRefCache[t]||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}}t.PDFLinkService=o;function n(e){if(!Array.isArray(e)){return false}const t=e.length;if(t<2){return false}const r=e[0];if(!(typeof r==="object"&&Number.isInteger(r.num)&&Number.isInteger(r.gen))&&!(Number.isInteger(r)&&r>=0)){return false}const i=e[1];if(!(typeof i==="object"&&typeof i.name==="string")){return false}let o=true;switch(i.name){case"XYZ":if(t!==5){return false}break;case"Fit":case"FitB":return t===2;case"FitH":case"FitBH":case"FitV":case"FitBV":if(t!==3){return false}break;case"FitR":if(t!==6){return false}o=false;break;default:return false}for(let r=2;r<t;r++){const t=e[r];if(!(typeof t==="number"||o&&t===null)){return false}}return true}class s{constructor(){this.externalLinkTarget=null;this.externalLinkRel=null;this.externalLinkEnabled=true;this._ignoreDestinationZoom=false}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}navigateTo(e){}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}cachePageRef(e,t){}isPageVisible(e){return true}}t.SimpleLinkService=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DefaultTextLayerFactory=t.TextLayerBuilder=void 0;var i=r(2);const o=300;class n{constructor({textLayerDiv:e,eventBus:t,pageIndex:r,viewport:i,findController:o=null,enhanceTextSelection:n=false}){this.textLayerDiv=e;this.eventBus=t;this.textContent=null;this.textContentItemsStr=[];this.textContentStream=null;this.renderingDone=false;this.pageIdx=r;this.pageNumber=this.pageIdx+1;this.matches=[];this.viewport=i;this.textDivs=[];this.findController=o;this.textLayerRenderTask=null;this.enhanceTextSelection=n;this._onUpdateTextLayerMatches=null;this._bindMouse()}_finishRendering(){this.renderingDone=true;if(!this.enhanceTextSelection){const e=document.createElement("div");e.className="endOfContent";this.textLayerDiv.appendChild(e)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(e=0){if(!(this.textContent||this.textContentStream)||this.renderingDone){return}this.cancel();this.textDivs=[];const t=document.createDocumentFragment();this.textLayerRenderTask=(0,i.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:t,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:e,enhanceTextSelection:this.enhanceTextSelection});this.textLayerRenderTask.promise.then((()=>{this.textLayerDiv.appendChild(t);this._finishRendering();this._updateMatches()}),(function(e){}));if(!this._onUpdateTextLayerMatches){this._onUpdateTextLayerMatches=e=>{if(e.pageIndex===this.pageIdx||e.pageIndex===-1){this._updateMatches()}};this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)}}cancel(){if(this.textLayerRenderTask){this.textLayerRenderTask.cancel();this.textLayerRenderTask=null}if(this._onUpdateTextLayerMatches){this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches);this._onUpdateTextLayerMatches=null}}setTextContentStream(e){this.cancel();this.textContentStream=e}setTextContent(e){this.cancel();this.textContent=e}_convertMatches(e,t){if(!e){return[]}const{findController:r,textContentItemsStr:i}=this;let o=0,n=0;const s=i.length-1;const l=r.state.query.length;const a=[];for(let r=0,d=e.length;r<d;r++){let d=e[r];while(o!==s&&d>=n+i[o].length){n+=i[o].length;o++}if(o===i.length){console.error("Could not find a matching mapping")}const c={begin:{divIdx:o,offset:d-n}};if(t){d+=t[r]}else{d+=l}while(o!==s&&d>n+i[o].length){n+=i[o].length;o++}c.end={divIdx:o,offset:d-n};a.push(c)}return a}_renderMatches(e){if(e.length===0){return}const{findController:t,pageIdx:r,textContentItemsStr:i,textDivs:o}=this;const n=r===t.selected.pageIdx;const s=t.selected.matchIdx;const l=t.state.highlightAll;let a=null;const d={offset:undefined};function c(e,t){const r=e.divIdx;o[r].textContent="";h(r,0,e.offset,t)}function h(e,t,r,n){const s=o[e];const l=i[e].substring(t,r);const a=document.createTextNode(l);if(n){const e=document.createElement("span");e.className=n;e.appendChild(a);s.appendChild(e);return}s.appendChild(a)}let u=s,f=u+1;if(l){u=0;f=e.length}else if(!n){return}for(let i=u;i<f;i++){const l=e[i];const u=l.begin;const f=l.end;const p=n&&i===s;const g=p?" selected":"";if(p){t.scrollMatchIntoView({element:o[u.divIdx],pageIndex:r,matchIndex:s})}if(!a||u.divIdx!==a.divIdx){if(a!==null){h(a.divIdx,a.offset,d.offset)}c(u)}else{h(a.divIdx,a.offset,u.offset)}if(u.divIdx===f.divIdx){h(u.divIdx,u.offset,f.offset,"highlight"+g)}else{h(u.divIdx,u.offset,d.offset,"highlight begin"+g);for(let e=u.divIdx+1,t=f.divIdx;e<t;e++){o[e].className="highlight middle"+g}c(f,"highlight end"+g)}a=f}if(a){h(a.divIdx,a.offset,d.offset)}}_updateMatches(){if(!this.renderingDone){return}const{findController:e,matches:t,pageIdx:r,textContentItemsStr:i,textDivs:o}=this;let n=-1;for(let e=0,r=t.length;e<r;e++){const r=t[e];const s=Math.max(n,r.begin.divIdx);for(let e=s,t=r.end.divIdx;e<=t;e++){const t=o[e];t.textContent=i[e];t.className=""}n=r.end.divIdx+1}if(!e||!e.highlightMatches){return}const s=e.pageMatches[r]||null;const l=e.pageMatchesLength[r]||null;this.matches=this._convertMatches(s,l);this._renderMatches(this.matches)}_bindMouse(){const e=this.textLayerDiv;let t=null;e.addEventListener("mousedown",(r=>{if(this.enhanceTextSelection&&this.textLayerRenderTask){this.textLayerRenderTask.expandTextDivs(true);if(t){clearTimeout(t);t=null}return}const i=e.querySelector(".endOfContent");if(!i){return}let o=r.target!==e;o=o&&window.getComputedStyle(i).getPropertyValue("-moz-user-select")!=="none";if(o){const t=e.getBoundingClientRect();const o=Math.max(0,(r.pageY-t.top)/t.height);i.style.top=(o*100).toFixed(2)+"%"}i.classList.add("active")}));e.addEventListener("mouseup",(()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask){t=setTimeout((()=>{if(this.textLayerRenderTask){this.textLayerRenderTask.expandTextDivs(false)}t=null}),o);return}const r=e.querySelector(".endOfContent");if(!r){return}r.style.top="";r.classList.remove("active")}))}}t.TextLayerBuilder=n;class s{createTextLayerBuilder(e,t,r,i=false,o){return new n({textLayerDiv:e,pageIndex:t,viewport:r,enhanceTextSelection:i,eventBus:o})}}t.DefaultTextLayerFactory=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.DownloadManager=void 0;var i=r(2);var o=r(7);const n=o.viewerCompatibilityParams.disableCreateObjectURL||false;function s(e,t){const r=document.createElement("a");if(!r.click){throw new Error('DownloadManager: "a.click()" is not supported.')}r.href=e;r.target="_parent";if("download"in r){r.download=t}(document.body||document.documentElement).appendChild(r);r.click();r.remove()}class l{constructor({disableCreateObjectURL:e=n}){this.disableCreateObjectURL=e}downloadUrl(e,t){if(!(0,i.createValidAbsoluteUrl)(e,"http://example.com")){return}s(e+"#pdfjs.action=download",t)}downloadData(e,t,r){if(navigator.msSaveBlob){navigator.msSaveBlob(new Blob([e],{type:r}),t);return}const o=(0,i.createObjectURL)(e,r,this.disableCreateObjectURL);s(o,t)}download(e,t,r){if(navigator.msSaveBlob){if(!navigator.msSaveBlob(e,r)){this.downloadUrl(t,r)}return}if(this.disableCreateObjectURL){this.downloadUrl(t,r);return}const i=URL.createObjectURL(e);s(i,r)}}t.DownloadManager=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.viewerCompatibilityParams=void 0;const i=Object.create(null);{const e=typeof navigator!=="undefined"&&navigator.userAgent||"";const t=typeof navigator!=="undefined"&&navigator.platform||"";const r=typeof navigator!=="undefined"&&navigator.maxTouchPoints||1;const o=/Android/.test(e);const n=/Trident/.test(e);const s=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||t==="MacIntel"&&r>1;const l=/CriOS/.test(e);(function e(){if(n||l){i.disableCreateObjectURL=true}})();(function e(){if(s||o){i.maxCanvasPixels=5242880}})()}const o=Object.freeze(i);t.viewerCompatibilityParams=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.GenericL10n=void 0;r(9);const i=document.webL10n;class o{constructor(e){this._lang=e;this._ready=new Promise(((t,r)=>{i.setLanguage(e,(()=>{t(i)}))}))}async getLanguage(){const e=await this._ready;return e.getLanguage()}async getDirection(){const e=await this._ready;return e.getDirection()}async get(e,t,r){const i=await this._ready;return i.get(e,t,r)}async translate(e){const t=await this._ready;return t.translate(e)}}t.GenericL10n=o},function(e,t,r){document.webL10n=function(e,t,r){var i={};var o="";var n="textContent";var s="";var l={};var a="loading";var d=true;function c(){return t.querySelectorAll('link[type="application/l10n"]')}function h(){var e=t.querySelector('script[type="application/l10n"]');return e?JSON.parse(e.innerHTML):null}function u(e){return e?e.querySelectorAll("*[data-l10n-id]"):[]}function f(e){if(!e)return{};var t=e.getAttribute("data-l10n-id");var r=e.getAttribute("data-l10n-args");var i={};if(r){try{i=JSON.parse(r)}catch(e){console.warn("could not parse arguments for #"+t)}}return{id:t,args:i}}function p(e,t,r){t=t||function e(t){};r=r||function e(){};var i=new XMLHttpRequest;i.open("GET",e,d);if(i.overrideMimeType){i.overrideMimeType("text/plain; charset=utf-8")}i.onreadystatechange=function(){if(i.readyState==4){if(i.status==200||i.status===0){t(i.responseText)}else{r()}}};i.onerror=r;i.ontimeout=r;try{i.send(null)}catch(e){r()}}function g(e,t,r,s){var l=e.replace(/[^\/]*$/,"")||"./";function a(e){if(e.lastIndexOf("\\")<0)return e;return e.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function d(e,r){var i={};var o=/^\s*|\s*$/;var n=/^\s*#|^\s*$/;var s=/^\s*\[(.*)\]\s*$/;var d=/^\s*@import\s+url\((.*)\)\s*$/i;var c=/^([^=\s]*)\s*=\s*(.+)$/;function h(e,r,h){var f=e.replace(o,"").split(/[\r\n]+/);var p="*";var g=t.split("-",1)[0];var v=false;var C="";function m(){while(true){if(!f.length){h();return}var e=f.shift();if(n.test(e))continue;if(r){C=s.exec(e);if(C){p=C[1].toLowerCase();v=p!=="*"&&p!==t&&p!==g;continue}else if(v){continue}C=d.exec(e);if(C){u(l+C[1],m);return}}var o=e.match(c);if(o&&o.length==3){i[o[1]]=a(o[2])}}}m()}function u(e,t){p(e,(function(e){h(e,false,t)}),(function(){console.warn(e+" not found.");t()}))}h(e,true,(function(){r(i)}))}p(e,(function(e){o+=e;d(e,(function(e){for(var t in e){var o,s,l=t.lastIndexOf(".");if(l>0){o=t.substring(0,l);s=t.substring(l+1)}else{o=t;s=n}if(!i[o]){i[o]={}}i[o][s]=e[t]}if(r){r()}}))}),s)}function v(e,t){if(e){e=e.toLowerCase()}t=t||function e(){};C();s=e;var r=c();var o=r.length;if(o===0){var n=h();if(n&&n.locales&&n.default_locale){console.log("using the embedded JSON directory, early way out");i=n.locales[e];if(!i){var l=n.default_locale.toLowerCase();for(var d in n.locales){d=d.toLowerCase();if(d===e){i=n.locales[e];break}else if(d===l){i=n.locales[l]}}}t()}else{console.log("no resource to load, early way out")}a="complete";return}var u=null;var f=0;u=function(){f++;if(f>=o){t();a="complete"}};function p(e){var t=e.href;this.load=function(e,r){g(t,e,r,(function(){console.warn(t+" not found.");console.warn('"'+e+'" resource not found');s="";r()}))}}for(var v=0;v<o;v++){var m=new p(r[v]);m.load(e,u)}}function C(){i={};o="";s=""}function m(e){var t={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function r(e,t){return t.indexOf(e)!==-1}function i(e,t,r){return t<=e&&e<=r}var o={0:function(e){return"other"},1:function(e){if(i(e%100,3,10))return"few";if(e===0)return"zero";if(i(e%100,11,99))return"many";if(e==2)return"two";if(e==1)return"one";return"other"},2:function(e){if(e!==0&&e%10===0)return"many";if(e==2)return"two";if(e==1)return"one";return"other"},3:function(e){if(e==1)return"one";return"other"},4:function(e){if(i(e,0,1))return"one";return"other"},5:function(e){if(i(e,0,2)&&e!=2)return"one";return"other"},6:function(e){if(e===0)return"zero";if(e%10==1&&e%100!=11)return"one";return"other"},7:function(e){if(e==2)return"two";if(e==1)return"one";return"other"},8:function(e){if(i(e,3,6))return"few";if(i(e,7,10))return"many";if(e==2)return"two";if(e==1)return"one";return"other"},9:function(e){if(e===0||e!=1&&i(e%100,1,19))return"few";if(e==1)return"one";return"other"},10:function(e){if(i(e%10,2,9)&&!i(e%100,11,19))return"few";if(e%10==1&&!i(e%100,11,19))return"one";return"other"},11:function(e){if(i(e%10,2,4)&&!i(e%100,12,14))return"few";if(e%10===0||i(e%10,5,9)||i(e%100,11,14))return"many";if(e%10==1&&e%100!=11)return"one";return"other"},12:function(e){if(i(e,2,4))return"few";if(e==1)return"one";return"other"},13:function(e){if(i(e%10,2,4)&&!i(e%100,12,14))return"few";if(e!=1&&i(e%10,0,1)||i(e%10,5,9)||i(e%100,12,14))return"many";if(e==1)return"one";return"other"},14:function(e){if(i(e%100,3,4))return"few";if(e%100==2)return"two";if(e%100==1)return"one";return"other"},15:function(e){if(e===0||i(e%100,2,10))return"few";if(i(e%100,11,19))return"many";if(e==1)return"one";return"other"},16:function(e){if(e%10==1&&e!=11)return"one";return"other"},17:function(e){if(e==3)return"few";if(e===0)return"zero";if(e==6)return"many";if(e==2)return"two";if(e==1)return"one";return"other"},18:function(e){if(e===0)return"zero";if(i(e,0,2)&&e!==0&&e!=2)return"one";return"other"},19:function(e){if(i(e,2,10))return"few";if(i(e,0,1))return"one";return"other"},20:function(e){if((i(e%10,3,4)||e%10==9)&&!(i(e%100,10,19)||i(e%100,70,79)||i(e%100,90,99)))return"few";if(e%1e6===0&&e!==0)return"many";if(e%10==2&&!r(e%100,[12,72,92]))return"two";if(e%10==1&&!r(e%100,[11,71,91]))return"one";return"other"},21:function(e){if(e===0)return"zero";if(e==1)return"one";return"other"},22:function(e){if(i(e,0,1)||i(e,11,99))return"one";return"other"},23:function(e){if(i(e%10,1,2)||e%20===0)return"one";return"other"},24:function(e){if(i(e,3,10)||i(e,13,19))return"few";if(r(e,[2,12]))return"two";if(r(e,[1,11]))return"one";return"other"}};var n=t[e.replace(/-.*$/,"")];if(!(n in o)){console.warn("plural form unknown for ["+e+"]");return function(){return"other"}}return o[n]}l.plural=function(e,t,r,o){var a=parseFloat(t);if(isNaN(a))return e;if(o!=n)return e;if(!l._pluralRules){l._pluralRules=m(s)}var d="["+l._pluralRules(a)+"]";if(a===0&&r+"[zero]"in i){e=i[r+"[zero]"][o]}else if(a==1&&r+"[one]"in i){e=i[r+"[one]"][o]}else if(a==2&&r+"[two]"in i){e=i[r+"[two]"][o]}else if(r+d in i){e=i[r+d][o]}else if(r+"[other]"in i){e=i[r+"[other]"][o]}return e};function w(e,t,r){var o=i[e];if(!o){console.warn("#"+e+" is undefined.");if(!r){return null}o=r}var n={};for(var s in o){var l=o[s];l=b(l,t,e,s);l=y(l,t,e);n[s]=l}return n}function b(e,t,r,o){var n=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/;var s=n.exec(e);if(!s||!s.length)return e;var a=s[1];var d=s[2];var c;if(t&&d in t){c=t[d]}else if(d in i){c=i[d]}if(a in l){var h=l[a];e=h(e,c,r,o)}return e}function y(e,t,r){var o=/\{\{\s*(.+?)\s*\}\}/g;return e.replace(o,(function(e,o){if(t&&o in t){return t[o]}if(o in i){return i[o]}console.log("argument {{"+o+"}} for #"+r+" is undefined.");return e}))}function x(e){var r=f(e);if(!r.id)return;var i=w(r.id,r.args);if(!i){console.warn("#"+r.id+" is undefined.");return}if(i[n]){if(k(e)===0){e[n]=i[n]}else{var o=e.childNodes;var s=false;for(var l=0,a=o.length;l<a;l++){if(o[l].nodeType===3&&/\S/.test(o[l].nodeValue)){if(s){o[l].nodeValue=""}else{o[l].nodeValue=i[n];s=true}}}if(!s){var d=t.createTextNode(i[n]);e.insertBefore(d,e.firstChild)}}delete i[n]}for(var c in i){e[c]=i[c]}}function k(e){if(e.children){return e.children.length}if(typeof e.childElementCount!=="undefined"){return e.childElementCount}var t=0;for(var r=0;r<e.childNodes.length;r++){t+=e.nodeType===1?1:0}return t}function M(e){e=e||t.documentElement;var r=u(e);var i=r.length;for(var o=0;o<i;o++){x(r[o])}x(e)}return{get:function(e,t,r){var i=e.lastIndexOf(".");var o=n;if(i>0){o=e.substring(i+1);e=e.substring(0,i)}var s;if(r){s={};s[o]=r}var l=w(e,t,s);if(l&&o in l){return l[o]}return"{{"+e+"}}"},getData:function(){return i},getText:function(){return o},getLanguage:function(){return s},setLanguage:function(e,t){v(e,(function(){if(t)t()}))},getDirection:function(){var e=["ar","he","fa","ps","ur"];var t=s.split("-",1)[0];return e.indexOf(t)>=0?"rtl":"ltr"},translate:M,getReadyState:function(){return a},ready:function(r){if(!r){return}else if(a=="complete"||a=="interactive"){e.setTimeout((function(){r()}))}else if(t.addEventListener){t.addEventListener("localized",(function e(){t.removeEventListener("localized",e);r()}))}}}}(window,document)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFFindController=t.FindState=void 0;var i=r(2);var o=r(11);var n=r(3);const s={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};t.FindState=s;const l=250;const a=-50;const d=-400;const c={"‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"};let h=null;function u(e){if(!h){const e=Object.keys(c).join("");h=new RegExp(`[${e}]`,"g")}return e.replace(h,(function(e){return c[e]}))}class f{constructor({linkService:e,eventBus:t}){this._linkService=e;this._eventBus=t;this._reset();t._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(e){if(this._pdfDocument){this._reset()}if(!e){return}this._pdfDocument=e;this._firstPageCapability.resolve()}executeCommand(e,t){if(!t){return}const r=this._pdfDocument;if(this._state===null||this._shouldDirtyMatch(e,t)){this._dirtyMatch=true}this._state=t;if(e!=="findhighlightallchange"){this._updateUIState(s.PENDING)}this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||r&&this._pdfDocument!==r){return}this._extractText();const t=!this._highlightMatches;const i=!!this._findTimeout;if(this._findTimeout){clearTimeout(this._findTimeout);this._findTimeout=null}if(e==="find"){this._findTimeout=setTimeout((()=>{this._nextMatch();this._findTimeout=null}),l)}else if(this._dirtyMatch){this._nextMatch()}else if(e==="findagain"){this._nextMatch();if(t&&this._state.highlightAll){this._updateAllPages()}}else if(e==="findhighlightallchange"){if(i){this._nextMatch()}else{this._highlightMatches=true}this._updateAllPages()}else{this._nextMatch()}}))}scrollMatchIntoView({element:e=null,pageIndex:t=-1,matchIndex:r=-1}){if(!this._scrollMatches||!e){return}else if(r===-1||r!==this._selected.matchIdx){return}else if(t===-1||t!==this._selected.pageIdx){return}this._scrollMatches=false;const i={top:a,left:d};(0,n.scrollIntoView)(e,i,true)}_reset(){this._highlightMatches=false;this._scrollMatches=false;this._pdfDocument=null;this._pageMatches=[];this._pageMatchesLength=[];this._state=null;this._selected={pageIdx:-1,matchIdx:-1};this._offset={pageIdx:null,matchIdx:null,wrapped:false};this._extractTextPromises=[];this._pageContents=[];this._matchesCountTotal=0;this._pagesToSearch=null;this._pendingFindMatches=Object.create(null);this._resumePageIdx=null;this._dirtyMatch=false;clearTimeout(this._findTimeout);this._findTimeout=null;this._firstPageCapability=(0,i.createPromiseCapability)()}get _query(){if(this._state.query!==this._rawQuery){this._rawQuery=this._state.query;this._normalizedQuery=u(this._state.query)}return this._normalizedQuery}_shouldDirtyMatch(e,t){if(t.query!==this._state.query){return true}switch(e){case"findagain":const e=this._selected.pageIdx+1;const t=this._linkService;if(e>=1&&e<=t.pagesCount&&e!==t.page&&!t.isPageVisible(e)){return true}return false;case"findhighlightallchange":return false}return true}_prepareMatches(e,t,r){function i(t){const r=e[t];const i=e[t+1];if(t<e.length-1&&r.match===i.match){r.skipped=true;return true}for(let i=t-1;i>=0;i--){const t=e[i];if(t.skipped){continue}if(t.match+t.matchLength<r.match){break}if(t.match+t.matchLength>=r.match+r.matchLength){r.skipped=true;return true}}return false}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(let o=0,n=e.length;o<n;o++){if(i(o)){continue}t.push(e[o].match);r.push(e[o].matchLength)}}_isEntireWord(e,t,r){if(t>0){const r=e.charCodeAt(t);const i=e.charCodeAt(t-1);if((0,o.getCharacterType)(r)===(0,o.getCharacterType)(i)){return false}}const i=t+r-1;if(i<e.length-1){const t=e.charCodeAt(i);const r=e.charCodeAt(i+1);if((0,o.getCharacterType)(t)===(0,o.getCharacterType)(r)){return false}}return true}_calculatePhraseMatch(e,t,r,i){const o=[];const n=e.length;let s=-n;while(true){s=r.indexOf(e,s+n);if(s===-1){break}if(i&&!this._isEntireWord(r,s,n)){continue}o.push(s)}this._pageMatches[t]=o}_calculateWordMatch(e,t,r,i){const o=[];const n=e.match(/\S+/g);for(let e=0,t=n.length;e<t;e++){const t=n[e];const s=t.length;let l=-s;while(true){l=r.indexOf(t,l+s);if(l===-1){break}if(i&&!this._isEntireWord(r,l,s)){continue}o.push({match:l,matchLength:s,skipped:false})}}this._pageMatchesLength[t]=[];this._pageMatches[t]=[];this._prepareMatches(o,this._pageMatches[t],this._pageMatchesLength[t])}_calculateMatch(e){let t=this._pageContents[e];let r=this._query;const{caseSensitive:i,entireWord:o,phraseSearch:n}=this._state;if(r.length===0){return}if(!i){t=t.toLowerCase();r=r.toLowerCase()}if(n){this._calculatePhraseMatch(r,e,t,o)}else{this._calculateWordMatch(r,e,t,o)}if(this._state.highlightAll){this._updatePage(e)}if(this._resumePageIdx===e){this._resumePageIdx=null;this._nextPageMatch()}const s=this._pageMatches[e].length;if(s>0){this._matchesCountTotal+=s;this._updateUIResultsCount()}}_extractText(){if(this._extractTextPromises.length>0){return}let e=Promise.resolve();for(let t=0,r=this._linkService.pagesCount;t<r;t++){const r=(0,i.createPromiseCapability)();this._extractTextPromises[t]=r.promise;e=e.then((()=>this._pdfDocument.getPage(t+1).then((e=>e.getTextContent({normalizeWhitespace:true}))).then((e=>{const i=e.items;const o=[];for(let e=0,t=i.length;e<t;e++){o.push(i[e].str)}this._pageContents[t]=u(o.join(""));r.resolve(t)}),(e=>{console.error(`Unable to get text content for page ${t+1}`,e);this._pageContents[t]="";r.resolve(t)}))))}}_updatePage(e){if(this._scrollMatches&&this._selected.pageIdx===e){this._linkService.page=e+1}this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const e=this._state.findPrevious;const t=this._linkService.page-1;const r=this._linkService.pagesCount;this._highlightMatches=true;if(this._dirtyMatch){this._dirtyMatch=false;this._selected.pageIdx=this._selected.matchIdx=-1;this._offset.pageIdx=t;this._offset.matchIdx=null;this._offset.wrapped=false;this._resumePageIdx=null;this._pageMatches.length=0;this._pageMatchesLength.length=0;this._matchesCountTotal=0;this._updateAllPages();for(let e=0;e<r;e++){if(this._pendingFindMatches[e]===true){continue}this._pendingFindMatches[e]=true;this._extractTextPromises[e].then((e=>{delete this._pendingFindMatches[e];this._calculateMatch(e)}))}}if(this._query===""){this._updateUIState(s.FOUND);return}if(this._resumePageIdx){return}const i=this._offset;this._pagesToSearch=r;if(i.matchIdx!==null){const t=this._pageMatches[i.pageIdx].length;if(!e&&i.matchIdx+1<t||e&&i.matchIdx>0){i.matchIdx=e?i.matchIdx-1:i.matchIdx+1;this._updateMatch(true);return}this._advanceOffsetPage(e)}this._nextPageMatch()}_matchesReady(e){const t=this._offset;const r=e.length;const i=this._state.findPrevious;if(r){t.matchIdx=i?r-1:0;this._updateMatch(true);return true}this._advanceOffsetPage(i);if(t.wrapped){t.matchIdx=null;if(this._pagesToSearch<0){this._updateMatch(false);return true}}return false}_nextPageMatch(){if(this._resumePageIdx!==null){console.error("There can only be one pending page.")}let e=null;do{const t=this._offset.pageIdx;e=this._pageMatches[t];if(!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}_advanceOffsetPage(e){const t=this._offset;const r=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1;t.matchIdx=null;this._pagesToSearch--;if(t.pageIdx>=r||t.pageIdx<0){t.pageIdx=e?r-1:0;t.wrapped=true}}_updateMatch(e=false){let t=s.NOT_FOUND;const r=this._offset.wrapped;this._offset.wrapped=false;if(e){const e=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx;this._selected.matchIdx=this._offset.matchIdx;t=r?s.WRAPPED:s.FOUND;if(e!==-1&&e!==this._selected.pageIdx){this._updatePage(e)}}this._updateUIState(t,this._state.findPrevious);if(this._selected.pageIdx!==-1){this._scrollMatches=true;this._updatePage(this._selected.pageIdx)}}_onFindBarClose(e){const t=this._pdfDocument;this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||t&&this._pdfDocument!==t){return}if(this._findTimeout){clearTimeout(this._findTimeout);this._findTimeout=null}if(this._resumePageIdx){this._resumePageIdx=null;this._dirtyMatch=true}this._updateUIState(s.FOUND);this._highlightMatches=false;this._updateAllPages()}))}_requestMatchesCount(){const{pageIdx:e,matchIdx:t}=this._selected;let r=0,i=this._matchesCountTotal;if(t!==-1){for(let t=0;t<e;t++){r+=this._pageMatches[t]&&this._pageMatches[t].length||0}r+=t+1}if(r<1||r>i){r=i=0}return{current:r,total:i}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount()})}}t.PDFFindController=f},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.getCharacterType=p;t.CharacterType=void 0;const i={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=i;function o(e){return e<11904}function n(e){return(e&65408)===0}function s(e){return e>=97&&e<=122||e>=65&&e<=90}function l(e){return e>=48&&e<=57}function a(e){return e===32||e===9||e===13||e===10}function d(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}function c(e){return e>=12448&&e<=12543}function h(e){return e>=12352&&e<=12447}function u(e){return e>=65376&&e<=65439}function f(e){return(e&65408)===3584}function p(e){if(o(e)){if(n(e)){if(a(e)){return i.SPACE}else if(s(e)||l(e)||e===95){return i.ALPHA_LETTER}return i.PUNCT}else if(f(e)){return i.THAI_LETTER}else if(e===160){return i.SPACE}return i.ALPHA_LETTER}if(d(e)){return i.HAN_LETTER}else if(c(e)){return i.KATAKANA_LETTER}else if(h(e)){return i.HIRAGANA_LETTER}else if(u(e)){return i.HALFWIDTH_KATAKANA_LETTER}return i.ALPHA_LETTER}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.isDestHashesEqual=d;t.isDestArraysEqual=c;t.PDFHistory=void 0;var i=r(3);const o=1e3;const n=50;const s=1e3;function l(){return document.location.hash}class a{constructor({linkService:e,eventBus:t}){this.linkService=e;this.eventBus=t;this._initialized=false;this._fingerprint="";this.reset();this._boundEvents=null;this._isViewerInPresentationMode=false;this.eventBus._on("presentationmodechanged",(e=>{this._isViewerInPresentationMode=e.active||e.switchInProgress}));this.eventBus._on("pagesinit",(()=>{this._isPagesLoaded=false;const e=t=>{this.eventBus._off("pagesloaded",e);this._isPagesLoaded=!!t.pagesCount};this.eventBus._on("pagesloaded",e)}))}initialize({fingerprint:e,resetHistory:t=false,updateUrl:r=false}){if(!e||typeof e!=="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}if(this._initialized){this.reset()}const i=this._fingerprint!==""&&this._fingerprint!==e;this._fingerprint=e;this._updateUrl=r===true;this._initialized=true;this._bindEvents();const o=window.history.state;this._popStateInProgress=false;this._blockHashChange=0;this._currentHash=l();this._numPositionUpdates=0;this._uid=this._maxUid=0;this._destination=null;this._position=null;if(!this._isValidState(o,true)||t){const{hash:e,page:r,rotation:o}=this._parseCurrentHash(true);if(!e||i||t){this._pushOrReplaceState(null,true);return}this._pushOrReplaceState({hash:e,page:r,rotation:o},true);return}const n=o.destination;this._updateInternalState(n,o.uid,true);if(this._uid>this._maxUid){this._maxUid=this._uid}if(n.rotation!==undefined){this._initialRotation=n.rotation}if(n.dest){this._initialBookmark=JSON.stringify(n.dest);this._destination.page=null}else if(n.hash){this._initialBookmark=n.hash}else if(n.page){this._initialBookmark=`page=${n.page}`}}reset(){if(this._initialized){this._pageHide();this._initialized=false;this._unbindEvents()}if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._initialBookmark=null;this._initialRotation=null}push({namedDest:e=null,explicitDest:t,pageNumber:r}){if(!this._initialized){return}if(e&&typeof e!=="string"){console.error("PDFHistory.push: "+`"${e}" is not a valid namedDest parameter.`);return}else if(!Array.isArray(t)){console.error("PDFHistory.push: "+`"${t}" is not a valid explicitDest parameter.`);return}else if(!(Number.isInteger(r)&&r>0&&r<=this.linkService.pagesCount)){if(r!==null||this._destination){console.error("PDFHistory.push: "+`"${r}" is not a valid pageNumber parameter.`);return}}const i=e||JSON.stringify(t);if(!i){return}let o=false;if(this._destination&&(d(this._destination.hash,i)||c(this._destination.dest,t))){if(this._destination.page){return}o=true}if(this._popStateInProgress&&!o){return}this._pushOrReplaceState({dest:t,hash:i,page:r,rotation:this.linkService.rotation},o);if(!this._popStateInProgress){this._popStateInProgress=true;Promise.resolve().then((()=>{this._popStateInProgress=false}))}}pushCurrentPosition(){if(!this._initialized||this._popStateInProgress){return}this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress){return}const e=window.history.state;if(this._isValidState(e)&&e.uid>0){window.history.back()}}forward(){if(!this._initialized||this._popStateInProgress){return}const e=window.history.state;if(this._isValidState(e)&&e.uid<this._maxUid){window.history.forward()}}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(e,t=false){const r=t||!this._destination;const i={fingerprint:this._fingerprint,uid:r?this._uid:this._uid+1,destination:e};this._updateInternalState(e,i.uid);let o;if(this._updateUrl&&e&&e.hash){const t=document.location.href.split("#")[0];if(!t.startsWith("file://")){o=`${t}#${e.hash}`}}if(r){window.history.replaceState(i,"",o)}else{this._maxUid=this._uid;window.history.pushState(i,"",o)}}_tryPushCurrentPosition(e=false){if(!this._position){return}let t=this._position;if(e){t=Object.assign(Object.create(null),this._position);t.temporary=true}if(!this._destination){this._pushOrReplaceState(t);return}if(this._destination.temporary){this._pushOrReplaceState(t,true);return}if(this._destination.hash===t.hash){return}if(!this._destination.page&&this._numPositionUpdates<=n){return}let r=false;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first){return}r=true}this._pushOrReplaceState(t,r)}_isValidState(e,t=false){if(!e){return false}if(e.fingerprint!==this._fingerprint){if(t){if(typeof e.fingerprint!=="string"||e.fingerprint.length!==this._fingerprint.length){return false}const[t]=performance.getEntriesByType("navigation");if(!t||t.type!=="reload"){return false}}else{return false}}if(!Number.isInteger(e.uid)||e.uid<0){return false}if(e.destination===null||typeof e.destination!=="object"){return false}return true}_updateInternalState(e,t,r=false){if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}if(r&&e&&e.temporary){delete e.temporary}this._destination=e;this._uid=t;this._numPositionUpdates=0}_parseCurrentHash(e=false){const t=unescape(l()).substring(1);const r=(0,i.parseQueryString)(t);const o=r.nameddest||"";let n=r.page|0;if(!(Number.isInteger(n)&&n>0&&n<=this.linkService.pagesCount)||e&&o.length>0){n=null}return{hash:t,page:n,rotation:this.linkService.rotation}}_updateViewarea({location:e}){if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._position={hash:this._isViewerInPresentationMode?`page=${e.pageNumber}`:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.rotation};if(this._popStateInProgress){return}if(this._isPagesLoaded&&this._destination&&!this._destination.page){this._numPositionUpdates++}{this._updateViewareaTimeout=setTimeout((()=>{if(!this._popStateInProgress){this._tryPushCurrentPosition(true)}this._updateViewareaTimeout=null}),s)}}_popState({state:e}){const t=l(),r=this._currentHash!==t;this._currentHash=t;if(!e){this._uid++;const{hash:e,page:t,rotation:r}=this._parseCurrentHash();this._pushOrReplaceState({hash:e,page:t,rotation:r},true);return}if(!this._isValidState(e)){return}this._popStateInProgress=true;if(r){this._blockHashChange++;(0,i.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:o}).then((()=>{this._blockHashChange--}))}const n=e.destination;this._updateInternalState(n,e.uid,true);if(this._uid>this._maxUid){this._maxUid=this._uid}if((0,i.isValidRotation)(n.rotation)){this.linkService.rotation=n.rotation}if(n.dest){this.linkService.navigateTo(n.dest)}else if(n.hash){this.linkService.setHash(n.hash)}else if(n.page){this.linkService.page=n.page}Promise.resolve().then((()=>{this._popStateInProgress=false}))}_pageHide(){if(!this._destination||this._destination.temporary){this._tryPushCurrentPosition()}}_bindEvents(){if(this._boundEvents){return}this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)};this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea);window.addEventListener("popstate",this._boundEvents.popState);window.addEventListener("pagehide",this._boundEvents.pageHide)}_unbindEvents(){if(!this._boundEvents){return}this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea);window.removeEventListener("popstate",this._boundEvents.popState);window.removeEventListener("pagehide",this._boundEvents.pageHide);this._boundEvents=null}}t.PDFHistory=a;function d(e,t){if(typeof e!=="string"||typeof t!=="string"){return false}if(e===t){return true}const{nameddest:r}=(0,i.parseQueryString)(e);if(r===t){return true}return false}function c(e,t){function r(e,t){if(typeof e!==typeof t){return false}if(Array.isArray(e)||Array.isArray(t)){return false}if(e!==null&&typeof e==="object"&&t!==null){if(Object.keys(e).length!==Object.keys(t).length){return false}for(const i in e){if(!r(e[i],t[i])){return false}}return true}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!(Array.isArray(e)&&Array.isArray(t))){return false}if(e.length!==t.length){return false}for(let i=0,o=e.length;i<o;i++){if(!r(e[i],t[i])){return false}}return true}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFPageView=void 0;var i=r(3);var o=r(2);var n=r(14);var s=r(7);const l=s.viewerCompatibilityParams.maxCanvasPixels||16777216;class a{constructor(e){const t=e.container;const r=e.defaultViewport;this.id=e.id;this.renderingId="page"+this.id;this.pdfPage=null;this.pageLabel=null;this.rotation=0;this.scale=e.scale||i.DEFAULT_SCALE;this.viewport=r;this.pdfPageRotate=r.rotation;this.hasRestrictedScaling=false;this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE;this.imageResourcesPath=e.imageResourcesPath||"";this.renderInteractiveForms=e.renderInteractiveForms||false;this.useOnlyCssZoom=e.useOnlyCssZoom||false;this.maxCanvasPixels=e.maxCanvasPixels||l;this.eventBus=e.eventBus;this.renderingQueue=e.renderingQueue;this.textLayerFactory=e.textLayerFactory;this.annotationLayerFactory=e.annotationLayerFactory;this.renderer=e.renderer||i.RendererType.CANVAS;this.enableWebGL=e.enableWebGL||false;this.l10n=e.l10n||i.NullL10n;this.paintTask=null;this.paintedViewportMap=new WeakMap;this.renderingState=n.RenderingStates.INITIAL;this.resume=null;this.error=null;this.annotationLayer=null;this.textLayer=null;this.zoomLayer=null;const o=document.createElement("div");o.className="page";o.style.width=Math.floor(this.viewport.width)+"px";o.style.height=Math.floor(this.viewport.height)+"px";o.setAttribute("data-page-number",this.id);this.div=o;t.appendChild(o)}setPdfPage(e){this.pdfPage=e;this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*i.CSS_UNITS,rotation:t});this.stats=e.stats;this.reset()}destroy(){this.reset();if(this.pdfPage){this.pdfPage.cleanup()}}_resetZoomLayer(e=false){if(!this.zoomLayer){return}const t=this.zoomLayer.firstChild;this.paintedViewportMap.delete(t);t.width=0;t.height=0;if(e){this.zoomLayer.remove()}this.zoomLayer=null}reset(e=false,t=false){this.cancelRendering(t);this.renderingState=n.RenderingStates.INITIAL;const r=this.div;r.style.width=Math.floor(this.viewport.width)+"px";r.style.height=Math.floor(this.viewport.height)+"px";const i=r.childNodes;const o=e&&this.zoomLayer||null;const s=t&&this.annotationLayer&&this.annotationLayer.div||null;for(let e=i.length-1;e>=0;e--){const t=i[e];if(o===t||s===t){continue}r.removeChild(t)}r.removeAttribute("data-loaded");if(s){this.annotationLayer.hide()}else if(this.annotationLayer){this.annotationLayer.cancel();this.annotationLayer=null}if(!o){if(this.canvas){this.paintedViewportMap.delete(this.canvas);this.canvas.width=0;this.canvas.height=0;delete this.canvas}this._resetZoomLayer()}if(this.svg){this.paintedViewportMap.delete(this.svg);delete this.svg}this.loadingIconDiv=document.createElement("div");this.loadingIconDiv.className="loadingIcon";r.appendChild(this.loadingIconDiv)}update(e,t){this.scale=e||this.scale;if(typeof t!=="undefined"){this.rotation=t}const r=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:r});if(this.svg){this.cssTransform(this.svg,true);this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:true,timestamp:performance.now()});return}let o=false;if(this.canvas&&this.maxCanvasPixels>0){const e=this.outputScale;if((Math.floor(this.viewport.width)*e.sx|0)*(Math.floor(this.viewport.height)*e.sy|0)>this.maxCanvasPixels){o=true}}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&o){this.cssTransform(this.canvas,true);this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:true,timestamp:performance.now()});return}if(!this.zoomLayer&&!this.canvas.hasAttribute("hidden")){this.zoomLayer=this.canvas.parentNode;this.zoomLayer.style.position="absolute"}}if(this.zoomLayer){this.cssTransform(this.zoomLayer.firstChild)}this.reset(true,true)}cancelRendering(e=false){if(this.paintTask){this.paintTask.cancel();this.paintTask=null}this.resume=null;if(this.textLayer){this.textLayer.cancel();this.textLayer=null}if(!e&&this.annotationLayer){this.annotationLayer.cancel();this.annotationLayer=null}}cssTransform(e,t=false){const r=this.viewport.width;const i=this.viewport.height;const o=this.div;e.style.width=e.parentNode.style.width=o.style.width=Math.floor(r)+"px";e.style.height=e.parentNode.style.height=o.style.height=Math.floor(i)+"px";const n=this.viewport.rotation-this.paintedViewportMap.get(e).rotation;const s=Math.abs(n);let l=1,a=1;if(s===90||s===270){l=i/r;a=r/i}const d="rotate("+n+"deg) "+"scale("+l+","+a+")";e.style.transform=d;if(this.textLayer){const e=this.textLayer.viewport;const t=this.viewport.rotation-e.rotation;const i=Math.abs(t);let o=r/e.width;if(i===90||i===270){o=r/e.height}const n=this.textLayer.textLayerDiv;let s,l;switch(i){case 0:s=l=0;break;case 90:s=0;l="-"+n.style.height;break;case 180:s="-"+n.style.width;l="-"+n.style.height;break;case 270:s="-"+n.style.width;l=0;break;default:console.error("Bad rotation value.");break}n.style.transform="rotate("+i+"deg) "+"scale("+o+", "+o+") "+"translate("+s+", "+l+")";n.style.transformOrigin="0% 0%"}if(t&&this.annotationLayer){this.annotationLayer.render(this.viewport,"display")}}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}draw(){if(this.renderingState!==n.RenderingStates.INITIAL){console.error("Must be in new state before drawing");this.reset()}const{div:e,pdfPage:t}=this;if(!t){this.renderingState=n.RenderingStates.FINISHED;if(this.loadingIconDiv){e.removeChild(this.loadingIconDiv);delete this.loadingIconDiv}return Promise.reject(new Error("pdfPage is not loaded"))}this.renderingState=n.RenderingStates.RUNNING;const r=document.createElement("div");r.style.width=e.style.width;r.style.height=e.style.height;r.classList.add("canvasWrapper");if(this.annotationLayer&&this.annotationLayer.div){e.insertBefore(r,this.annotationLayer.div)}else{e.appendChild(r)}let s=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){const t=document.createElement("div");t.className="textLayer";t.style.width=r.style.width;t.style.height=r.style.height;if(this.annotationLayer&&this.annotationLayer.div){e.insertBefore(t,this.annotationLayer.div)}else{e.appendChild(t)}s=this.textLayerFactory.createTextLayerBuilder(t,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=s;let l=null;if(this.renderingQueue){l=e=>{if(!this.renderingQueue.isHighestPriority(this)){this.renderingState=n.RenderingStates.PAUSED;this.resume=()=>{this.renderingState=n.RenderingStates.RUNNING;e()};return}e()}}const a=async r=>{if(d===this.paintTask){this.paintTask=null}if(r instanceof o.RenderingCancelledException){this.error=null;return}this.renderingState=n.RenderingStates.FINISHED;if(this.loadingIconDiv){e.removeChild(this.loadingIconDiv);delete this.loadingIconDiv}this._resetZoomLayer(true);this.error=r;this.stats=t.stats;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:false,timestamp:performance.now()});if(r){throw r}};const d=this.renderer===i.RendererType.SVG?this.paintOnSvg(r):this.paintOnCanvas(r);d.onRenderContinue=l;this.paintTask=d;const c=d.promise.then((function(){return a(null).then((function(){if(s){const e=t.streamTextContent({normalizeWhitespace:true});s.setTextContentStream(e);s.render()}}))}),(function(e){return a(e)}));if(this.annotationLayerFactory){if(!this.annotationLayer){this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(e,t,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)}this.annotationLayer.render(this.viewport,"display")}e.setAttribute("data-loaded",true);this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id});return c}paintOnCanvas(e){const t=(0,o.createPromiseCapability)();const r={promise:t.promise,onRenderContinue(e){e()},cancel(){g.cancel()}};const n=this.viewport;const s=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((e=>{s.setAttribute("aria-label",e)}));s.setAttribute("hidden","hidden");let l=true;const a=function(){if(l){s.removeAttribute("hidden");l=false}};e.appendChild(s);this.canvas=s;s.mozOpaque=true;const d=s.getContext("2d",{alpha:false});const c=(0,i.getOutputScale)(d);this.outputScale=c;if(this.useOnlyCssZoom){const e=n.clone({scale:i.CSS_UNITS});c.sx*=e.width/n.width;c.sy*=e.height/n.height;c.scaled=true}if(this.maxCanvasPixels>0){const e=n.width*n.height;const t=Math.sqrt(this.maxCanvasPixels/e);if(c.sx>t||c.sy>t){c.sx=t;c.sy=t;c.scaled=true;this.hasRestrictedScaling=true}else{this.hasRestrictedScaling=false}}const h=(0,i.approximateFraction)(c.sx);const u=(0,i.approximateFraction)(c.sy);s.width=(0,i.roundToDivide)(n.width*c.sx,h[0]);s.height=(0,i.roundToDivide)(n.height*c.sy,u[0]);s.style.width=(0,i.roundToDivide)(n.width,h[1])+"px";s.style.height=(0,i.roundToDivide)(n.height,u[1])+"px";this.paintedViewportMap.set(s,n);const f=!c.scaled?null:[c.sx,0,0,c.sy,0,0];const p={canvasContext:d,transform:f,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms};const g=this.pdfPage.render(p);g.onContinue=function(e){a();if(r.onRenderContinue){r.onRenderContinue(e)}else{e()}};g.promise.then((function(){a();t.resolve(undefined)}),(function(e){a();t.reject(e)}));return r}paintOnSvg(e){let t=false;const r=()=>{if(t){throw new o.RenderingCancelledException(`Rendering cancelled, page ${this.id}`,"svg")}};const s=this.pdfPage;const l=this.viewport.clone({scale:i.CSS_UNITS});const a=s.getOperatorList().then((t=>{r();const i=new o.SVGGraphics(s.commonObjs,s.objs);return i.getSVG(t,l).then((t=>{r();this.svg=t;this.paintedViewportMap.set(t,l);t.style.width=e.style.width;t.style.height=e.style.height;this.renderingState=n.RenderingStates.FINISHED;e.appendChild(t)}))}));return{promise:a,onRenderContinue(e){e()},cancel(){t=true}}}setPageLabel(e){this.pageLabel=typeof e==="string"?e:null;if(this.pageLabel!==null){this.div.setAttribute("data-page-label",this.pageLabel)}else{this.div.removeAttribute("data-page-label")}}}t.PDFPageView=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFRenderingQueue=t.RenderingStates=void 0;const i=3e4;const o={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.RenderingStates=o;class n{constructor(){this.pdfViewer=null;this.pdfThumbnailViewer=null;this.onIdle=null;this.highestPriorityPage=null;this.idleTimeout=null;this.printing=false;this.isThumbnailViewEnabled=false}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}renderHighestPriority(e){if(this.idleTimeout){clearTimeout(this.idleTimeout);this.idleTimeout=null}if(this.pdfViewer.forceRendering(e)){return}if(this.pdfThumbnailViewer&&this.isThumbnailViewEnabled){if(this.pdfThumbnailViewer.forceRendering()){return}}if(this.printing){return}if(this.onIdle){this.idleTimeout=setTimeout(this.onIdle.bind(this),i)}}getHighestPriority(e,t,r){const i=e.views;const o=i.length;if(o===0){return null}for(let e=0;e<o;++e){const t=i[e].view;if(!this.isViewFinished(t)){return t}}if(r){const r=e.last.id;if(t[r]&&!this.isViewFinished(t[r])){return t[r]}}else{const r=e.first.id-2;if(t[r]&&!this.isViewFinished(t[r])){return t[r]}}return null}isViewFinished(e){return e.renderingState===o.FINISHED}renderView(e){switch(e.renderingState){case o.FINISHED:return false;case o.PAUSED:this.highestPriorityPage=e.renderingId;e.resume();break;case o.RUNNING:this.highestPriorityPage=e.renderingId;break;case o.INITIAL:this.highestPriorityPage=e.renderingId;e.draw().finally((()=>{this.renderHighestPriority()})).catch((e=>{console.error(`renderView: "${e}"`)}));break}return true}}t.PDFRenderingQueue=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFSinglePageViewer=void 0;var i=r(16);var o=r(2);class n extends i.BaseViewer{constructor(e){super(e);this.eventBus._on("pagesinit",(e=>{this._ensurePageViewVisible()}))}get _viewerElement(){return(0,o.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView();this._previousPageNumber=1;this._shadowViewer=document.createDocumentFragment();this._updateScrollDown=null}_ensurePageViewVisible(){const e=this._pages[this._currentPageNumber-1];const t=this._pages[this._previousPageNumber-1];const r=this.viewer.childNodes;switch(r.length){case 0:this.viewer.appendChild(e.div);break;case 1:if(r[0]!==t.div){throw new Error("_ensurePageViewVisible: Unexpected previously visible page.")}if(e===t){break}this._shadowViewer.appendChild(t.div);this.viewer.appendChild(e.div);this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){if(this._updateScrollDown){this._updateScrollDown()}super._scrollUpdate()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){if(r){this._setCurrentPageNumber(r)}const i=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible();this.update();super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r});this._updateScrollDown=()=>{this.scroll.down=i;this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(e){}get _isScrollModeHorizontal(){return(0,o.shadow)(this,"_isScrollModeHorizontal",false)}_updateScrollMode(){}_updateSpreadMode(){}}t.PDFSinglePageViewer=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.BaseViewer=void 0;var i=r(3);var o=r(14);var n=r(1);var s=r(2);var l=r(13);var a=r(4);var d=r(5);const c=10;function h(e){const t=[];this.push=function(r){const i=t.indexOf(r);if(i>=0){t.splice(i,1)}t.push(r);if(t.length>e){t.shift().destroy()}};this.resize=function(r,o){e=r;if(o){const e=new Set;for(let t=0,r=o.length;t<r;++t){e.add(o[t].id)}(0,i.moveToEndOfArray)(t,(function(t){return e.has(t.id)}))}while(t.length>e){t.shift().destroy()}}}function u(e,t){if(t===e){return true}if(Math.abs(t-e)<1e-15){return true}return false}class f{constructor(e){if(this.constructor===f){throw new Error("Cannot initialize BaseViewer.")}this._name=this.constructor.name;this.container=e.container;this.viewer=e.viewer||e.container.firstElementChild;this.eventBus=e.eventBus;this.linkService=e.linkService||new a.SimpleLinkService;this.downloadManager=e.downloadManager||null;this.findController=e.findController||null;this.removePageBorders=e.removePageBorders||false;this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE;this.imageResourcesPath=e.imageResourcesPath||"";this.renderInteractiveForms=e.renderInteractiveForms||false;this.enablePrintAutoRotate=e.enablePrintAutoRotate||false;this.renderer=e.renderer||i.RendererType.CANVAS;this.enableWebGL=e.enableWebGL||false;this.useOnlyCssZoom=e.useOnlyCssZoom||false;this.maxCanvasPixels=e.maxCanvasPixels;this.l10n=e.l10n||i.NullL10n;this.defaultRenderingQueue=!e.renderingQueue;if(this.defaultRenderingQueue){this.renderingQueue=new o.PDFRenderingQueue;this.renderingQueue.setViewer(this)}else{this.renderingQueue=e.renderingQueue}this.scroll=(0,i.watchScroll)(this.container,this._scrollUpdate.bind(this));this.presentationModeState=i.PresentationModeState.UNKNOWN;this._onBeforeDraw=this._onAfterDraw=null;this._resetView();if(this.removePageBorders){this.viewer.classList.add("removePageBorders")}Promise.resolve().then((()=>{this.eventBus.dispatch("baseviewerinit",{source:this})}))}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}get pageViewsReady(){if(!this._pagesCapability.settled){return false}return this._pages.every((function(e){return e&&e.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e)){throw new Error("Invalid page number.")}if(!this.pdfDocument){return}if(!this._setCurrentPageNumber(e,true)){console.error(`${this._name}.currentPageNumber: "${e}" is not a valid page.`)}}_setCurrentPageNumber(e,t=false){if(this._currentPageNumber===e){if(t){this._resetCurrentPageView()}return true}if(!(0<e&&e<=this.pagesCount)){return false}this._currentPageNumber=e;this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:this._pageLabels&&this._pageLabels[e-1]});if(t){this._resetCurrentPageView()}return true}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(e){if(!this.pdfDocument){return}let t=e|0;if(this._pageLabels){const r=this._pageLabels.indexOf(e);if(r>=0){t=r+1}}if(!this._setCurrentPageNumber(t,true)){console.error(`${this._name}.currentPageLabel: "${e}" is not a valid page.`)}}get currentScale(){return this._currentScale!==i.UNKNOWN_SCALE?this._currentScale:i.DEFAULT_SCALE}set currentScale(e){if(isNaN(e)){throw new Error("Invalid numeric scale.")}if(!this.pdfDocument){return}this._setScale(e,false)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){if(!this.pdfDocument){return}this._setScale(e,false)}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,i.isValidRotation)(e)){throw new Error("Invalid pages rotation angle.")}if(!this.pdfDocument){return}if(this._pagesRotation===e){return}this._pagesRotation=e;const t=this._currentPageNumber;for(let t=0,r=this._pages.length;t<r;t++){const r=this._pages[t];r.update(r.scale,e)}if(this._currentScaleValue){this._setScale(this._currentScaleValue,true)}this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t});if(this.defaultRenderingQueue){this.update()}}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){if(!this.container.offsetParent||this._getVisiblePages().views.length===0){return Promise.resolve()}return this._onePageRenderedCapability.promise}setDocument(e){if(this.pdfDocument){this._cancelRendering();this._resetView();if(this.findController){this.findController.setDocument(null)}}this.pdfDocument=e;if(!e){return}const t=e.numPages;const r=e.getPage(1);this._pagesCapability.promise.then((()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:t})}));this._onBeforeDraw=e=>{const t=this._pages[e.pageNumber-1];if(!t){return}this._buffer.push(t)};this.eventBus._on("pagerender",this._onBeforeDraw);this._onAfterDraw=e=>{if(e.cssTransform||this._onePageRenderedCapability.settled){return}this._onePageRenderedCapability.resolve();this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null};this.eventBus._on("pagerendered",this._onAfterDraw);r.then((r=>{this._firstPageCapability.resolve(r);const o=this.currentScale;const n=r.getViewport({scale:o*i.CSS_UNITS});const s=this.textLayerMode!==i.TextLayerMode.DISABLE?this:null;for(let e=1;e<=t;++e){const t=new l.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:e,scale:o,defaultViewport:n.clone(),renderingQueue:this.renderingQueue,textLayerFactory:s,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(t)}const a=this._pages[0];if(a){a.setPdfPage(r);this.linkService.cachePageRef(1,r.ref)}if(this._spreadMode!==i.SpreadMode.NONE){this._updateSpreadMode()}this._onePageRenderedOrForceFetch().then((()=>{if(this.findController){this.findController.setDocument(e)}if(e.loadingParams.disableAutoFetch||t>7500){this._pagesCapability.resolve();return}let r=t-1;if(r<=0){this._pagesCapability.resolve();return}for(let i=2;i<=t;++i){e.getPage(i).then((e=>{const t=this._pages[i-1];if(!t.pdfPage){t.setPdfPage(e)}this.linkService.cachePageRef(i,e.ref);if(--r===0){this._pagesCapability.resolve()}}),(e=>{console.error(`Unable to get page ${i} to initialize viewer`,e);if(--r===0){this._pagesCapability.resolve()}}))}}));this.eventBus.dispatch("pagesinit",{source:this});if(this.defaultRenderingQueue){this.update()}})).catch((e=>{console.error("Unable to initialize viewer",e)}))}setPageLabels(e){if(!this.pdfDocument){return}if(!e){this._pageLabels=null}else if(!(Array.isArray(e)&&this.pdfDocument.numPages===e.length)){this._pageLabels=null;console.error(`${this._name}.setPageLabels: Invalid page labels.`)}else{this._pageLabels=e}for(let e=0,t=this._pages.length;e<t;e++){const t=this._pages[e];const r=this._pageLabels&&this._pageLabels[e];t.setPageLabel(r)}}_resetView(){this._pages=[];this._currentPageNumber=1;this._currentScale=i.UNKNOWN_SCALE;this._currentScaleValue=null;this._pageLabels=null;this._buffer=new h(c);this._location=null;this._pagesRotation=0;this._pagesRequests=new WeakMap;this._firstPageCapability=(0,s.createPromiseCapability)();this._onePageRenderedCapability=(0,s.createPromiseCapability)();this._pagesCapability=(0,s.createPromiseCapability)();this._scrollMode=i.ScrollMode.VERTICAL;this._spreadMode=i.SpreadMode.NONE;if(this._onBeforeDraw){this.eventBus._off("pagerender",this._onBeforeDraw);this._onBeforeDraw=null}if(this._onAfterDraw){this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null}this.viewer.textContent="";this._updateScrollMode()}_scrollUpdate(){if(this.pagesCount===0){return}this.update()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){(0,i.scrollIntoView)(e,t)}_setScaleUpdatePages(e,t,r=false,i=false){this._currentScaleValue=t.toString();if(u(this._currentScale,e)){if(i){this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t})}return}for(let t=0,r=this._pages.length;t<r;t++){this._pages[t].update(e)}this._currentScale=e;if(!r){let e=this._currentPageNumber,t;if(this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)){e=this._location.pageNumber;t=[null,{name:"XYZ"},this._location.left,this._location.top,null]}this.scrollPageIntoView({pageNumber:e,destArray:t,allowNegativeOffset:true})}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:i?t:undefined});if(this.defaultRenderingQueue){this.update()}}_setScale(e,t=false){let r=parseFloat(e);if(r>0){this._setScaleUpdatePages(r,e,t,false)}else{const o=this._pages[this._currentPageNumber-1];if(!o){return}const n=this.isInPresentationMode||this.removePageBorders;let s=n?0:i.SCROLLBAR_PADDING;let l=n?0:i.VERTICAL_PADDING;if(!n&&this._isScrollModeHorizontal){[s,l]=[l,s]}const a=(this.container.clientWidth-s)/o.width*o.scale;const d=(this.container.clientHeight-l)/o.height*o.scale;switch(e){case"page-actual":r=1;break;case"page-width":r=a;break;case"page-height":r=d;break;case"page-fit":r=Math.min(a,d);break;case"auto":const t=(0,i.isPortraitOrientation)(o)?a:Math.min(d,a);r=Math.min(i.MAX_AUTO_SCALE,t);break;default:console.error(`${this._name}._setScale: "${e}" is an unknown zoom value.`);return}this._setScaleUpdatePages(r,e,t,true)}}_resetCurrentPageView(){if(this.isInPresentationMode){this._setScale(this._currentScaleValue,true)}const e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}scrollPageIntoView({pageNumber:e,destArray:t=null,allowNegativeOffset:r=false,ignoreDestinationZoom:o=false}){if(!this.pdfDocument){return}const n=Number.isInteger(e)&&this._pages[e-1];if(!n){console.error(`${this._name}.scrollPageIntoView: `+`"${e}" is not a valid pageNumber parameter.`);return}if(this.isInPresentationMode||!t){this._setCurrentPageNumber(e,true);return}let s=0,l=0;let a=0,d=0,c,h;const u=n.rotation%180!==0;const f=(u?n.height:n.width)/n.scale/i.CSS_UNITS;const p=(u?n.width:n.height)/n.scale/i.CSS_UNITS;let g=0;switch(t[1].name){case"XYZ":s=t[2];l=t[3];g=t[4];s=s!==null?s:0;l=l!==null?l:p;break;case"Fit":case"FitB":g="page-fit";break;case"FitH":case"FitBH":l=t[2];g="page-width";if(l===null&&this._location){s=this._location.left;l=this._location.top}break;case"FitV":case"FitBV":s=t[2];a=f;d=p;g="page-height";break;case"FitR":s=t[2];l=t[3];a=t[4]-s;d=t[5]-l;const e=this.removePageBorders?0:i.SCROLLBAR_PADDING;const r=this.removePageBorders?0:i.VERTICAL_PADDING;c=(this.container.clientWidth-e)/a/i.CSS_UNITS;h=(this.container.clientHeight-r)/d/i.CSS_UNITS;g=Math.min(Math.abs(c),Math.abs(h));break;default:console.error(`${this._name}.scrollPageIntoView: `+`"${t[1].name}" is not a valid destination type.`);return}if(!o){if(g&&g!==this._currentScale){this.currentScaleValue=g}else if(this._currentScale===i.UNKNOWN_SCALE){this.currentScaleValue=i.DEFAULT_SCALE_VALUE}}if(g==="page-fit"&&!t[4]){this._scrollIntoView({pageDiv:n.div,pageNumber:e});return}const v=[n.viewport.convertToViewportPoint(s,l),n.viewport.convertToViewportPoint(s+a,l+d)];let C=Math.min(v[0][0],v[1][0]);let m=Math.min(v[0][1],v[1][1]);if(!r){C=Math.max(C,0);m=Math.max(m,0)}this._scrollIntoView({pageDiv:n.div,pageSpot:{left:C,top:m},pageNumber:e})}_updateLocation(e){const t=this._currentScale;const r=this._currentScaleValue;const i=parseFloat(r)===t?Math.round(t*1e4)/100:r;const o=e.id;let n="#page="+o;n+="&zoom="+i;const s=this._pages[o-1];const l=this.container;const a=s.getPagePoint(l.scrollLeft-e.x,l.scrollTop-e.y);const d=Math.round(a[0]);const c=Math.round(a[1]);n+=","+d+","+c;this._location={pageNumber:o,scale:i,top:c,left:d,rotation:this._pagesRotation,pdfOpenParams:n}}_updateHelper(e){throw new Error("Not implemented: _updateHelper")}update(){const e=this._getVisiblePages();const t=e.views,r=t.length;if(r===0){return}const i=Math.max(c,2*r+1);this._buffer.resize(i,t);this.renderingQueue.renderHighestPriority(e);this._updateHelper(t);this._updateLocation(e.first);this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return this.isInPresentationMode?false:this._scrollMode===i.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===i.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===i.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return this.isInPresentationMode?false:this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?false:this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount){return{views:[]}}const e=this._pages[this._currentPageNumber-1];const t=e.div;const r={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:r,last:r,views:[r]}}_getVisiblePages(){return(0,i.getVisibleElements)(this.container,this._pages,true,this._isScrollModeHorizontal)}isPageVisible(e){if(!this.pdfDocument){return false}if(e<1||e>this.pagesCount){console.error(`${this._name}.isPageVisible: "${e}" is out of bounds.`);return false}return this._getVisiblePages().views.some((function(t){return t.id===e}))}cleanup(){for(let e=0,t=this._pages.length;e<t;e++){if(this._pages[e]&&this._pages[e].renderingState!==o.RenderingStates.FINISHED){this._pages[e].reset()}}}_cancelRendering(){for(let e=0,t=this._pages.length;e<t;e++){if(this._pages[e]){this._pages[e].cancelRendering()}}}_ensurePdfPageLoaded(e){if(e.pdfPage){return Promise.resolve(e.pdfPage)}if(this._pagesRequests.has(e)){return this._pagesRequests.get(e)}const t=this.pdfDocument.getPage(e.id).then((t=>{if(!e.pdfPage){e.setPdfPage(t)}this._pagesRequests.delete(e);return t})).catch((t=>{console.error("Unable to get page for page view",t);this._pagesRequests.delete(e)}));this._pagesRequests.set(e,t);return t}forceRendering(e){const t=e||this._getVisiblePages();const r=this._isScrollModeHorizontal?this.scroll.right:this.scroll.down;const i=this.renderingQueue.getHighestPriority(t,this._pages,r);if(i){this._ensurePdfPageLoaded(i).then((()=>{this.renderingQueue.renderView(i)}));return true}return false}createTextLayerBuilder(e,t,r,i=false,o){return new d.TextLayerBuilder({textLayerDiv:e,eventBus:o,pageIndex:t,viewport:r,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:this.isInPresentationMode?false:i})}createAnnotationLayerBuilder(e,t,r="",o=false,s=i.NullL10n){return new n.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:o,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s})}get hasEqualPageSizes(){const e=this._pages[0];for(let t=1,r=this._pages.length;t<r;++t){const r=this._pages[t];if(r.width!==e.width||r.height!==e.height){return false}}return true}getPagesOverview(){const e=this._pages.map((function(e){const t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));if(!this.enablePrintAutoRotate){return e}const t=(0,i.isPortraitOrientation)(e[0]);return e.map((function(e){if(t===(0,i.isPortraitOrientation)(e)){return e}return{width:e.height,height:e.width,rotation:(e.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode===e){return}if(!(0,i.isValidScrollMode)(e)){throw new Error(`Invalid scroll mode: ${e}`)}this._scrollMode=e;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e});this._updateScrollMode(this._currentPageNumber)}_updateScrollMode(e=null){const t=this._scrollMode,r=this.viewer;r.classList.toggle("scrollHorizontal",t===i.ScrollMode.HORIZONTAL);r.classList.toggle("scrollWrapped",t===i.ScrollMode.WRAPPED);if(!this.pdfDocument||!e){return}if(this._currentScaleValue&&isNaN(this._currentScaleValue)){this._setScale(this._currentScaleValue,true)}this._setCurrentPageNumber(e,true);this.update()}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode===e){return}if(!(0,i.isValidSpreadMode)(e)){throw new Error(`Invalid spread mode: ${e}`)}this._spreadMode=e;this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e});this._updateSpreadMode(this._currentPageNumber)}_updateSpreadMode(e=null){if(!this.pdfDocument){return}const t=this.viewer,r=this._pages;t.textContent="";if(this._spreadMode===i.SpreadMode.NONE){for(let e=0,i=r.length;e<i;++e){t.appendChild(r[e].div)}}else{const e=this._spreadMode-1;let i=null;for(let o=0,n=r.length;o<n;++o){if(i===null){i=document.createElement("div");i.className="spread";t.appendChild(i)}else if(o%2===e){i=i.cloneNode(false);t.appendChild(i)}i.appendChild(r[o].div)}}if(!e){return}this._setCurrentPageNumber(e,true);this.update()}}t.BaseViewer=f},function(e,t,r){Object.defineProperty(t,"__esModule",{value:true});t.PDFViewer=void 0;var i=r(16);var o=r(2);class n extends i.BaseViewer{get _viewerElement(){return(0,o.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){if(!t&&!this.isInPresentationMode){const r=e.offsetLeft+e.clientLeft;const i=r+e.clientWidth;const{scrollLeft:o,clientWidth:n}=this.container;if(this._isScrollModeHorizontal||r<o||i>o+n){t={left:0,top:0}}}super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r})}_getVisiblePages(){if(this.isInPresentationMode){return this._getCurrentVisiblePage()}return super._getVisiblePages()}_updateHelper(e){if(this.isInPresentationMode){return}let t=this._currentPageNumber;let r=false;for(const i of e){if(i.percent<100){break}if(i.id===t){r=true;break}}if(!r){t=e[0].id}this._setCurrentPageNumber(t)}}t.PDFViewer=n}])}))})(pdf_viewer$1);return pdf_viewer$1.exports}requirePdf_viewer();const findIn=(e,t,r=false,i=false)=>{const o=new Array;const{top:n,left:s,bottom:l,right:a}=t.getBoundingClientRect();e.forEach((e=>{if(e.getBoundingClientRect().bottom<=l&&e.getBoundingClientRect().top>=n&&e.getBoundingClientRect().left>=s&&e.getBoundingClientRect().right<=a){if(r)e.selected=true;o.push(e)}else{if(r&&!i)e.selected=false}}));return o};function addField(e,t){const r=this._template.elementConnection.templateElements;this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:[...r,t]}};const i=document.createElement("ls-editor-field");i.setAttribute("type",t.formElementType);i.setAttribute("id","ls-field-"+t.id);i.style.zIndex="100";i.style.position="absolute";i.style.top=Math.floor(t.top*this.zoom)+"px";i.style.left=Math.floor(t.left*this.zoom)+"px";i.style.height=Math.floor(t.height*this.zoom)+"px";i.style.width=Math.floor(t.width*this.zoom)+"px";i.style.fontSize=Math.floor(t.fontSize*this.zoom)+"pt";i.style.alignContent=t.align;i.style.fontFamily=t.fontName;i.dataItem=t;e.appendChild(i);return i}function moveField(e,t){e.style.top=Math.floor(t.top*this.zoom)+"px";e.style.left=Math.floor(t.left*this.zoom)+"px";e.style.height=Math.floor(t.height*this.zoom)+"px";e.style.width=Math.floor(t.width*this.zoom)+"px";e.style.fontSize=Math.floor(t.fontSize*this.zoom)+"pt";e.style.fontFamily=t.fontName;e.style.textAlign=t.align;e.dataItem=t}const findDimensions=(e,t,r,i,o)=>{const n=e.getBoundingClientRect();const{height:s,width:l}=t.getBoundingClientRect();const a=l/o;const d=s/o;const c=Math.floor((t.getBoundingClientRect().top-n.top)/o);const h=Math.floor((t.getBoundingClientRect().left-n.left)/o);const u=h>0?h/i:0;const f=c>0?c/r:0;const p=(h+a)/i;const g=(c+d)/r;return{top:c,left:h,height:s,width:l,ax:u,ay:f,bx:p,by:g}};const recalculateCoordinates=e=>{const t=e.left/e.pageDimensions.width;const r=e.top/e.pageDimensions.height;const i=(e.left+e.width)/e.pageDimensions.width;const o=(e.top+e.height)/e.pageDimensions.height;return{...e,ax:t,ay:r,bx:i,by:o}};const updateTemplate=e=>`\n mutation LDVupdateTemplate {\n updateTemplate(input: {\n templateId: "${e.id}", \n title: "${e.title}",\n locked: ${e.locked},\n autoArchive: ${e.autoArchive},\n fixSignatureScale: ${e.fixSignatureScale?e.fixSignatureScale:false}\n })\n }\n `;const getTemplate=e=>`\n query LDVGetTemplate {\n template(id: "${e}") {\n id\n title\n fileName\n pageDimensions\n pageCount\n modified\n link\n valid\n locked\n autoArchive\n archived\n tags\n created\n createdBy\n lastSent\n fixSignatureScale\n groupId\n roles{\n id\n name\n roleType\n signerIndex\n ordinal\n signerParent\n experience\n }\n elementConnection {\n templateElements {\n align\n ax\n ay\n bx\n by\n elementType\n formElementType\n fieldOrder\n fontName\n fontSize\n helpText\n hideBorder\n id\n label\n labelExtra\n logicAction\n logicGroup\n mapTo\n options\n optional\n page\n role\n signer\n substantive\n validation\n value\n }\n totalCount\n }\n userSignatureConnection {\n userSignatureElements {\n id\n userId\n ax\n ay\n bx\n by\n page\n link\n }\n }\n }\n }\n `;function validate(e){var t=[];e.roles.forEach((r=>{if(e.elementConnection.templateElements.filter((e=>e.formElementType==="signature"&&e.signer===r.signerIndex&&r.roleType!=="APPROVER")).length===0){t.push({id:r.id,title:"Missing signature.",description:`{tr.name} is missing a signature.`,role:r})}}));e.elementConnection.templateElements.forEach((e=>{if(e.validation===20&&(!e.options||e.options.length===0)){t.push({id:e.id,title:"Missing options",description:`Drop down field "${e.label}" is missing options.`,element:e})}}));return t}function oob(e){if(e.left+e.width>e.pageDimensions.width||e.top<0||e.left<0||e.top+e.height>e.pageDimensions.height)return true;else return false}function alter(e){const t=this.selected.map((t=>({action:"update",data:e(t.dataItem)})));this.mutate.emit(t);this.update.emit(t)}function debounce$1(e,t=300){let r;return(...i)=>{clearTimeout(r);r=setTimeout((()=>{e.apply(this,i)}),t)}}function matchData(e){const t=e.result;const r=atob(e.obj.id).substring(0,3);const i=t[Object.keys(t)[0]];if(e.event.action==="create"){if(r==="ele"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.obj.id);t.setAttribute("id","ls-field-"+i);t.dataItem={...e.obj,id:i}}this.validationErrors=validate.bind(this)(this._template)}if(r==="rol"){syncRoles.bind(this)()}if(r==="tpl"){this._template={...this._template,...e.obj};this.validationErrors=validate.bind(this)(this._template)}}async function syncRoles(){var e=this.component.shadowRoot.getElementById("ls-participant-manager");const t=await this.adapter.execute(this.token,getTemplate(this.templateid));this.parseTemplate(JSON.stringify(t.template));e.template=this._template;this.generateFields();this.validationErrors=validate.bind(this)(this._template)}function getApiType(e){if(!e?.id)return"invalid";const t=atob(e.id);if(t.length<3)return"invalid";const r=atob(e.id).substring(0,3);switch(r){case"ele":return"element";case"rol":return"role";case"tpl":return"template";case"doc":return"document";default:return"unknown"}}const validationTypes=[{id:0,description:"general purpose",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:30,description:"yyyy/mm/dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:31,description:"yy/mm/dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:32,description:"dd/mm/yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:33,description:"dd/mm/yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:34,description:"mm/dd/yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:35,description:"mm/dd/yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:36,description:"yyyy.mm.dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:37,description:"yy.mm.dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:38,description:"dd.mm.yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:39,description:"dd.mm.yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:40,description:"mm.dd.yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:41,description:"mm.dd.yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:42,description:"yyyy-mm-dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:43,description:"yy-mm-dd (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:44,description:"dd-mm-yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:45,description:"dd-mm-yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:46,description:"mm-dd-yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:47,description:"mm-dd-yy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:48,description:"d mmmm yyyy (auto sign day)",formType:"signing date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:73,description:"Secret Code",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:77,description:"Title caps (force text to title caps)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:78,description:"Uppercase (force text to uppercase)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:79,description:"Lowercase (force text to lowercase)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:65,description:"1 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:66,description:"2 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:67,description:"3 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:68,description:"4 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:69,description:"5 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:70,description:"6 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:71,description:"7 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:72,description:"8 character (any text)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:1e3,description:"First name field (special use)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1001,description:"Last name field (special use)",formType:"text",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1,description:"Email",formType:"email",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:1002,description:"Email field (special use)",formType:"email",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:50,description:"Whole number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"number"},{id:51,description:"Number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:52,description:"Currency",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:53,description:"1 number",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:54,description:"2 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:55,description:"3 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:56,description:"4 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:57,description:"5 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:58,description:"6 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:59,description:"7 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:60,description:"8 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:61,description:"9 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:62,description:"10 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:63,description:"11 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:64,description:"12 numbers",formType:"number",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"number"},{id:2,description:"yyyy/mm/dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"date"},{id:3,description:"yy/mm/dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:4,description:"dd/mm/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"date"},{id:5,description:"dd/mm/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:6,description:"mm/dd/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:7,description:"mm/dd/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:80,description:"mm/yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:81,description:"mm/yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:8,description:"yyyy.mm.dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:9,description:"yy.mm.dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:10,description:"dd.mm.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:11,description:"dd.mm.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:12,description:"mm.dd.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:13,description:"mm.dd.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:82,description:"mm.yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:83,description:"mm.yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:14,description:"yyyy-mm-dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:15,description:"yy-mm-dd",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:16,description:"dd-mm-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:17,description:"dd-mm-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:18,description:"mm-dd-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:19,description:"mm-dd-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:84,description:"mm-yy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:85,description:"mm-yyyy",formType:"date",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"date"},{id:20,description:"Dropdown List",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:91,description:"Countries",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:92,description:"Name prefix titles",formType:"dropdown",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:24,description:"✔/✗",formType:"checkbox",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"checkbox"},{id:25,description:"✔/empty",formType:"checkbox",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"checkbox"},{id:26,description:"✗/empty",formType:"checkbox",defaultHeight:16,defaultWidth:16,typeDefault:false,inputType:"checkbox"},{id:74,description:"File: attach to confirmatory email to sender",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"file"},{id:75,description:"File: append to PDF, PDF files only",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"file"},{id:76,description:"File: zip with PDF (for internal view, signed PDF for signer)",formType:"file",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"file"},{id:90,description:"Drawn field.",formType:"drawn field",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:2e3,description:"Initials",formType:"initials",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:93,description:"Regular Expression field",formType:"regular expression",defaultHeight:16,defaultWidth:200,typeDefault:false,inputType:"text"},{id:3e3,description:"Auto Sign",formType:"auto sign",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"text"},{id:4e3,description:"Text Area",formType:"textarea",defaultHeight:16,defaultWidth:200,typeDefault:true,inputType:"textarea"}];function getInputType(e){if(e===null)return validationTypes[0];const t=validationTypes.find((t=>t.id===e));return t===null?validationTypes[0]:t}function keyDown(e){if(this.selected&&this.selected?.length>0){const t=alter.bind(this);if(e.key==="ArrowDown"){t((e=>{const t={...e,top:e.top+1,ay:e.ay+1,by:e.by+1};return oob(t)?e:t}))}else if(e.key==="ArrowUp"){t((e=>{const t={...e,top:e.top-1,ay:e.ay-1,by:e.top-1};return oob(t)?e:t}))}else if(e.key==="ArrowRight"){t((e=>{const t={...e,left:e.left+1,ax:e.ax+1,bx:e.bx+1};return oob(t)?e:t}))}else if(e.key==="ArrowLeft"){t((e=>{const t={...e,left:e.left-1,ax:e.ax-1,bx:e.bx-1};return oob(t)?e:t}))}else if(e.key==="Delete"||e.key==="Backspace"){const e=Array.from(this.selected);this.mutate.emit(e.map((e=>({action:"delete",data:e.dataItem}))));this.update.emit(e.map((e=>({action:"delete",data:e.dataItem}))))}}}let mousetimer=null;function debounce(e,t){if(mousetimer)clearTimeout(mousetimer);mousetimer=setTimeout((()=>{this.mutate.emit([e])}),t)}function mouseDown(e){if(e.offsetX<0||e.offsetY<0)return;this.hitField=null;const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.forEach((t=>{const{left:r,top:i,height:o,width:n,bottom:s,right:l}=t.getBoundingClientRect();const a={left:t.offsetLeft,top:t.offsetTop,height:o,width:n,x:e.screenX,y:e.screenY};this.startMouse=a;if(Math.abs(e.clientX-r)<5&&e.clientY>=i&&e.clientY<=s){this.edgeSide="w";this.hitField=t}else if(Math.abs(e.clientX-l)<5&&e.clientY>=i&&e.clientY<=s){this.edgeSide="e";this.hitField=t}else if(Math.abs(e.clientY-i)<5&&e.clientX>=r&&e.clientX<=l){this.edgeSide="n";this.hitField=t}else if(Math.abs(e.clientY-s)<5&&e.clientX>=r&&e.clientX<=l){this.edgeSide="s";this.hitField=t}else if(e.clientY<=s&&e.clientY>=i&&e.clientX>=r&&e.clientX<=l){this.edgeSide=null;this.hitField=t}}));if(this.hitField&&e.shiftKey===false){var r=this.component.shadowRoot.getElementById("ls-box-selector");r.style.visibility="hidden";if(this.hitField.selected===false){t.forEach((e=>{e.selected=false}));this.selected=[this.hitField];this.selectFields.emit([this.hitField.dataItem])}const{height:i,width:o}=this.hitField.getBoundingClientRect();const n={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:i,width:o,x:e.screenX,y:e.screenY};this.startMouse=n;this.startLocations=this.selected.map((e=>{const{height:t,width:r}=e.getBoundingClientRect();const i=e;return{top:i.offsetTop,left:i.offsetLeft,height:t,width:r}}));this.selectionBox=null}else if(this.hitField&&e.shiftKey===true){var r=this.component.shadowRoot.getElementById("ls-box-selector");r.style.visibility="hidden";if(this.hitField.selected===false){t.forEach((e=>{e.selected=false}));this.selected=[...this.selected,this.hitField];this.selectFields.emit([...this.selected.map((e=>e.dataItem)),this.hitField.dataItem])}const{height:i,width:o}=this.hitField.getBoundingClientRect();const n={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:i,width:o,x:e.screenX,y:e.screenY};this.startMouse=n;this.startLocations=this.selected.map((e=>{const{height:t,width:r}=e.getBoundingClientRect();const i=e;return{top:i.offsetTop,left:i.offsetLeft,height:t,width:r}}));this.selectionBox=null}else{this.startLocations=null;this.startMouse=null;this.selectionBox={x:e.clientX,y:e.clientY};this.unselect();this.selectFields.emit([]);this.selected=[];this.component.style.cursor="crosshair"}}function mouseMove(e){e.preventDefault();if(this.hitField&&this.edgeSide&&this.startMouse&&e.buttons===1){const t=e.screenX-this.startMouse.x;const r=e.screenY-this.startMouse.y;switch(this.edgeSide){case"n":this.hitField.style.top=this.startMouse.top+r+"px";this.hitField.style.height=this.startMouse.height-r+"px";this.hitField.dataItem={...this.hitField.dataItem,top:this.startMouse.top+r,height:this.startMouse.height-r};break;case"s":this.hitField.style.height=this.startMouse.height+r+"px";this.hitField.dataItem={...this.hitField.dataItem,height:this.startMouse.height+r};break;case"e":this.hitField.style.width=this.startMouse.width+t+"px";this.hitField.dataItem={...this.hitField.dataItem,width:this.startMouse.width+t};break;case"w":this.hitField.style.left=this.startMouse.left+t+"px";this.hitField.style.width=this.startMouse.width-t+"px";this.hitField.dataItem={...this.hitField.dataItem,left:this.startMouse.left+t,width:this.startMouse.width-t};break}debounce.bind(this)({action:"update",data:recalculateCoordinates(this.hitField.dataItem)},700)}else if(this.selectionBox&&e.buttons===1){this.isBoxing=true;var t=this.component.shadowRoot.getElementById("ls-box-selector");var r=this.component.shadowRoot.getElementById("ls-document-frame");var i=r.getBoundingClientRect().left;var o=r.getBoundingClientRect().top;const n=e.clientX-this.selectionBox.x;const s=e.clientY-this.selectionBox.y;t.style.visibility="visible";t.style.left=(this.selectionBox.x>e.clientX?e.clientX:this.selectionBox.x)-i+r.scrollLeft+"px";t.style.top=(this.selectionBox.y>e.clientY?e.clientY:this.selectionBox.y)-o+r.scrollTop+"px";t.style.width=Math.abs(n)+"px";t.style.height=Math.abs(s)+"px"}else if(this.startLocations&&!this.edgeSide&&this.startMouse&&e.buttons===1){this.isMoving=true;var t=this.component.shadowRoot.getElementById("ls-box-selector");t.style.visibility="hidden";const r=e.screenX-this.startMouse.x;const i=e.screenY-this.startMouse.y;if(this.selected?.length){for(let e=0;e<this.selected.length;e++){this.selected[e].style.left=this.startLocations[e].left+r+"px";this.selected[e].style.top=this.startLocations[e].top+i+"px"}}}}function mouseUp(e){this.edgeSide=null;this.startMouse=null;this.component.style.cursor="auto";if(this.selectionBox&&this.isBoxing){this.isBoxing=false;var t=this.component.shadowRoot.getElementById("ls-box-selector");var r=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.style.visibility="hidden";this.selectionBox=null;const i=findIn(r,t,true,e.shiftKey);this.selected=Array.from(i);this.selectFields.emit(i.map((e=>e.dataItem)))}}function mouseClick(e){if(this.isMoving){this.isMoving=false;const e=this.component.shadowRoot.querySelectorAll("ls-editor-field");const t=this.component.shadowRoot.getElementById("ls-document-frame");const r=Array.from(e).filter((e=>e.selected));this.mutate.emit(Array.from(e).filter((e=>e.selected)).map((e=>{const r={...e.dataItem,...findDimensions(t,e,this.pageDimensions[this.pageNum-1].height,this.pageDimensions[this.pageNum-1].width,this.zoom)};e.dataItem=r;return{action:"update",data:r}})));this.selectFields.emit(r.map((e=>e.dataItem)))}else{this.selectionBox={x:e.clientX,y:e.clientY};const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");t.forEach((r=>{const{left:i,top:o,bottom:n,right:s}=r.getBoundingClientRect();if(e.clientY<=n&&e.clientY>=o&&e.clientX>=i&&e.clientX<=s){this.edgeSide=null;this.hitField=r;if(!e.shiftKey)t.forEach((e=>e.selected=false));r.selected=true}}));this.selected=Array.from(t).filter((e=>e.selected));this.selectFields.emit(this.selected.map((e=>e.dataItem)))}}function mouseDrop(e){e.preventDefault();try{const r=JSON.parse(e.dataTransfer.getData("application/json"));this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((e=>e.selected=false));var t=this.component.shadowRoot.getElementById("ls-document-frame");const i=btoa("ele"+crypto.randomUUID());const o=e.offsetY/this.zoom+t.scrollTop;const n=e.offsetX/this.zoom+t.scrollLeft;const s={action:"create",data:{id:i,value:"",formElementType:r.formElementType,elementType:r.elementType,validation:r.validation,substantive:false,top:o,left:n,hideBorder:false,height:r.defaultHeight,width:r.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:"arial",fontSize:10,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:false,options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:n>0?n/this.pageDimensions[this.pageNum-1].width:0,ay:o>0?o/this.pageDimensions[this.pageNum-1].height:0,bx:(n+r.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(o+r.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([s]);this.update.emit([s])}catch(e){console.error(e)}}
|
|
44
|
+
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */var axios_1;var hasRequiredAxios;function requireAxios(){if(hasRequiredAxios)return axios_1;hasRequiredAxios=1;function e(e,t){return function r(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype;const{getPrototypeOf:r}=Object;const{iterator:i,toStringTag:o}=Symbol;const n=(e=>r=>{const i=t.call(r);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null));const s=e=>{e=e.toLowerCase();return t=>n(t)===e};const l=e=>t=>typeof t===e;const{isArray:a}=Array;const d=l("undefined");function c(e){return e!==null&&!d(e)&&e.constructor!==null&&!d(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h=s("ArrayBuffer");function u(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&h(e.buffer)}return t}const f=l("string");const p=l("function");const g=l("number");const v=e=>e!==null&&typeof e==="object";const C=e=>e===true||e===false;const m=e=>{if(n(e)!=="object"){return false}const t=r(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(o in e)&&!(i in e)};const w=e=>{if(!v(e)||c(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return false}};const b=s("Date");const y=s("File");const x=s("Blob");const k=s("FileList");const M=e=>v(e)&&p(e.pipe);const L=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||p(e.append)&&((t=n(e))==="formdata"||t==="object"&&p(e.toString)&&e.toString()==="[object FormData]"))};const H=s("URLSearchParams");const[V,A,Z,S]=["ReadableStream","Request","Response","Headers"].map(s);const O=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let i;let o;if(typeof e!=="object"){e=[e]}if(a(e)){for(i=0,o=e.length;i<o;i++){t.call(null,e[i],i,e)}}else{if(c(e)){return}const o=r?Object.getOwnPropertyNames(e):Object.keys(e);const n=o.length;let s;for(i=0;i<n;i++){s=o[i];t.call(null,e[s],s,e)}}}function B(e,t){if(c(e)){return null}t=t.toLowerCase();const r=Object.keys(e);let i=r.length;let o;while(i-- >0){o=r[i];if(t===o.toLowerCase()){return o}}return null}const P=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:commonjsGlobal})();const _=e=>!d(e)&&e!==P;function j(){const{caseless:e,skipUndefined:t}=_(this)&&this||{};const r={};const i=(i,o)=>{const n=e&&B(r,o)||o;if(m(r[n])&&m(i)){r[n]=j(r[n],i)}else if(m(i)){r[n]=j({},i)}else if(a(i)){r[n]=i.slice()}else if(!t||!d(i)){r[n]=i}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&T(arguments[e],i)}return r}const E=(t,r,i,{allOwnKeys:o}={})=>{T(r,((r,o)=>{if(i&&p(r)){t[o]=e(r,i)}else{t[o]=r}}),{allOwnKeys:o});return t};const R=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const D=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};const I=(e,t,i,o)=>{let n;let s;let l;const a={};t=t||{};if(e==null)return t;do{n=Object.getOwnPropertyNames(e);s=n.length;while(s-- >0){l=n[s];if((!o||o(l,e,t))&&!a[l]){t[l]=e[l];a[l]=true}}e=i!==false&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t};const F=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r};const N=e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};const z=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&r(Uint8Array));const $=(e,t)=>{const r=e&&e[i];const o=r.call(e);let n;while((n=o.next())&&!n.done){const r=n.value;t.call(e,r[0],r[1])}};const W=(e,t)=>{let r;const i=[];while((r=e.exec(t))!==null){i.push(r)}return i};const U=s("HTMLFormElement");const G=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,i){return r.toUpperCase()+i}));const q=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);const Y=s("RegExp");const X=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const i={};T(r,((r,o)=>{let n;if((n=t(r,o,e))!==false){i[o]=n||r}}));Object.defineProperties(e,i)};const J=e=>{X(e,((t,r)=>{if(p(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const i=e[r];if(!p(i))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}}))};const Q=(e,t)=>{const r={};const i=e=>{e.forEach((e=>{r[e]=true}))};a(e)?i(e):i(String(e).split(t));return r};const K=()=>{};const ee=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function te(e){return!!(e&&p(e.append)&&e[o]==="FormData"&&e[i])}const re=e=>{const t=new Array(10);const r=(e,i)=>{if(v(e)){if(t.indexOf(e)>=0){return}if(c(e)){return e}if(!("toJSON"in e)){t[i]=e;const o=a(e)?[]:{};T(e,((e,t)=>{const n=r(e,i+1);!d(n)&&(o[t]=n)}));t[i]=undefined;return o}}return e};return r(e,0)};const ie=s("AsyncFunction");const oe=e=>e&&(v(e)||p(e))&&p(e.then)&&p(e.catch);const ne=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{P.addEventListener("message",(({source:r,data:i})=>{if(r===P&&i===e){t.length&&t.shift()()}}),false);return r=>{t.push(r);P.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",p(P.postMessage));const se=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(P):typeof process!=="undefined"&&process.nextTick||ne;const le=e=>e!=null&&p(e[i]);var ae={isArray:a,isArrayBuffer:h,isBuffer:c,isFormData:L,isArrayBufferView:u,isString:f,isNumber:g,isBoolean:C,isObject:v,isPlainObject:m,isEmptyObject:w,isReadableStream:V,isRequest:A,isResponse:Z,isHeaders:S,isUndefined:d,isDate:b,isFile:y,isBlob:x,isRegExp:Y,isFunction:p,isStream:M,isURLSearchParams:H,isTypedArray:z,isFileList:k,forEach:T,merge:j,extend:E,trim:O,stripBOM:R,inherits:D,toFlatObject:I,kindOf:n,kindOfTest:s,endsWith:F,toArray:N,forEachEntry:$,matchAll:W,isHTMLForm:U,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:X,freezeMethods:J,toObjectSet:Q,toCamelCase:G,noop:K,toFiniteNumber:ee,findKey:B,global:P,isContextDefined:_,isSpecCompliantForm:te,toJSONObject:re,isAsyncFn:ie,isThenable:oe,setImmediate:ne,asap:se,isIterable:le};function de(e,t,r,i,o){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);i&&(this.request=i);if(o){this.response=o;this.status=o.status?o.status:null}}ae.inherits(de,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const ce=de.prototype;const he={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{he[e]={value:e}}));Object.defineProperties(de,he);Object.defineProperty(ce,"isAxiosError",{value:true});de.from=(e,t,r,i,o,n)=>{const s=Object.create(ce);ae.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));const l=e&&e.message?e.message:"Error";const a=t==null&&e?e.code:t;de.call(s,l,a,r,i,o);if(e&&s.cause==null){Object.defineProperty(s,"cause",{value:e,configurable:true})}s.name=e&&e.name||"Error";n&&Object.assign(s,n);return s};var ue=null;function fe(e){return ae.isPlainObject(e)||ae.isArray(e)}function pe(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,i){t=pe(t);return!r&&i?"["+t+"]":t})).join(r?".":"")}function ve(e){return ae.isArray(e)&&!e.some(fe)}const Ce=ae.toFlatObject(ae,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function me(e,t,r){if(!ae.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=ae.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!ae.isUndefined(r[t])}));const i=r.metaTokens;const o=r.visitor||c;const n=r.dots;const s=r.indexes;const l=r.Blob||typeof Blob!=="undefined"&&Blob;const a=l&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o)){throw new TypeError("visitor must be a function")}function d(e){if(e===null)return"";if(ae.isDate(e)){return e.toISOString()}if(ae.isBoolean(e)){return e.toString()}if(!a&&ae.isBlob(e)){throw new de("Blob is not supported. Use a Buffer instead.")}if(ae.isArrayBuffer(e)||ae.isTypedArray(e)){return a&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,o){let l=e;if(e&&!o&&typeof e==="object"){if(ae.endsWith(r,"{}")){r=i?r:r.slice(0,-2);e=JSON.stringify(e)}else if(ae.isArray(e)&&ve(e)||(ae.isFileList(e)||ae.endsWith(r,"[]"))&&(l=ae.toArray(e))){r=pe(r);l.forEach((function e(i,o){!(ae.isUndefined(i)||i===null)&&t.append(s===true?ge([r],o,n):s===null?r:r+"[]",d(i))}));return false}}if(fe(e)){return true}t.append(ge(o,r,n),d(e));return false}const h=[];const u=Object.assign(Ce,{defaultVisitor:c,convertValue:d,isVisitable:fe});function f(e,r){if(ae.isUndefined(e))return;if(h.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}h.push(e);ae.forEach(e,(function e(i,n){const s=!(ae.isUndefined(i)||i===null)&&o.call(t,i,ae.isString(n)?n.trim():n,r,u);if(s===true){f(i,r?r.concat(n):[n])}}));h.pop()}if(!ae.isObject(e)){throw new TypeError("data must be an object")}f(e);return t}function we(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function be(e,t){this._pairs=[];e&&me(e,this,t)}const ye=be.prototype;ye.append=function e(t,r){this._pairs.push([t,r])};ye.toString=function e(t){const r=t?function(e){return t.call(this,e,we)}:we;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function xe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ke(e,t,r){if(!t){return e}const i=r&&r.encode||xe;if(ae.isFunction(r)){r={serialize:r}}const o=r&&r.serialize;let n;if(o){n=o(t,r)}else{n=ae.isURLSearchParams(t)?t.toString():new be(t,r).toString(i)}if(n){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+n}return e}class Me{constructor(){this.handlers=[]}use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){ae.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))}}var Le=Me;var He={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ve=typeof URLSearchParams!=="undefined"?URLSearchParams:be;var Ae=typeof FormData!=="undefined"?FormData:null;var Ze=typeof Blob!=="undefined"?Blob:null;var Se={isBrowser:true,classes:{URLSearchParams:Ve,FormData:Ae,Blob:Ze},protocols:["http","https","file","blob","url","data"]};const Oe=typeof window!=="undefined"&&typeof document!=="undefined";const Te=typeof navigator==="object"&&navigator||undefined;const Be=Oe&&(!Te||["ReactNative","NativeScript","NS"].indexOf(Te.product)<0);const Pe=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const _e=Oe&&window.location.href||"http://localhost";var je=Object.freeze({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserWebWorkerEnv:Pe,hasStandardBrowserEnv:Be,navigator:Te,origin:_e});var Ee={...je,...Se};function Re(e,t){return me(e,new Ee.classes.URLSearchParams,{visitor:function(e,t,r,i){if(Ee.isNode&&ae.isBuffer(e)){this.append(t,e.toString("base64"));return false}return i.defaultVisitor.apply(this,arguments)},...t})}function De(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function Ie(e){const t={};const r=Object.keys(e);let i;const o=r.length;let n;for(i=0;i<o;i++){n=r[i];t[n]=e[n]}return t}function Fe(e){function t(e,r,i,o){let n=e[o++];if(n==="__proto__")return true;const s=Number.isFinite(+n);const l=o>=e.length;n=!n&&ae.isArray(i)?i.length:n;if(l){if(ae.hasOwnProp(i,n)){i[n]=[i[n],r]}else{i[n]=r}return!s}if(!i[n]||!ae.isObject(i[n])){i[n]=[]}const a=t(e,r,i[n],o);if(a&&ae.isArray(i[n])){i[n]=Ie(i[n])}return!s}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};ae.forEachEntry(e,((e,i)=>{t(De(e),i,r,0)}));return r}return null}function Ne(e,t,r){if(ae.isString(e)){try{(0,JSON.parse)(e);return ae.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const ze={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function e(t,r){const i=r.getContentType()||"";const o=i.indexOf("application/json")>-1;const n=ae.isObject(t);if(n&&ae.isHTMLForm(t)){t=new FormData(t)}const s=ae.isFormData(t);if(s){return o?JSON.stringify(Fe(t)):t}if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)||ae.isReadableStream(t)){return t}if(ae.isArrayBufferView(t)){return t.buffer}if(ae.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let l;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1){return Re(t,this.formSerializer).toString()}if((l=ae.isFileList(t))||i.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return me(l?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(n||o){r.setContentType("application/json",false);return Ne(t)}return t}],transformResponse:[function e(t){const r=this.transitional||ze.transitional;const i=r&&r.forcedJSONParsing;const o=this.responseType==="json";if(ae.isResponse(t)||ae.isReadableStream(t)){return t}if(t&&ae.isString(t)&&(i&&!this.responseType||o)){const e=r&&r.silentJSONParsing;const i=!e&&o;try{return JSON.parse(t,this.parseReviver)}catch(e){if(i){if(e.name==="SyntaxError"){throw de.from(e,de.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ee.classes.FormData,Blob:Ee.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};ae.forEach(["delete","get","head","post","put","patch"],(e=>{ze.headers[e]={}}));var $e=ze;const We=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ue=e=>{const t={};let r;let i;let o;e&&e.split("\n").forEach((function e(n){o=n.indexOf(":");r=n.substring(0,o).trim().toLowerCase();i=n.substring(o+1).trim();if(!r||t[r]&&We[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(i)}else{t[r]=[i]}}else{t[r]=t[r]?t[r]+", "+i:i}}));return t};const Ge=Symbol("internals");function qe(e){return e&&String(e).trim().toLowerCase()}function Ye(e){if(e===false||e==null){return e}return ae.isArray(e)?e.map(Ye):String(e)}function Xe(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=r.exec(e)){t[i[1]]=i[2]}return t}const Je=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qe(e,t,r,i,o){if(ae.isFunction(i)){return i.call(this,t,r)}if(o){t=r}if(!ae.isString(t))return;if(ae.isString(i)){return t.indexOf(i)!==-1}if(ae.isRegExp(i)){return i.test(t)}}function Ke(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function et(e,t){const r=ae.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+r,{value:function(e,r,o){return this[i].call(this,t,e,r,o)},configurable:true})}))}class tt{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(e,t,r){const o=qe(t);if(!o){throw new Error("header name must be a non-empty string")}const n=ae.findKey(i,o);if(!n||i[n]===undefined||r===true||r===undefined&&i[n]!==false){i[n||t]=Ye(e)}}const n=(e,t)=>ae.forEach(e,((e,r)=>o(e,r,t)));if(ae.isPlainObject(e)||e instanceof this.constructor){n(e,t)}else if(ae.isString(e)&&(e=e.trim())&&!Je(e)){n(Ue(e),t)}else if(ae.isObject(e)&&ae.isIterable(e)){let r={},i,o;for(const t of e){if(!ae.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[o=t[0]]=(i=r[o])?ae.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}n(r,t)}else{e!=null&&o(t,e,r)}return this}get(e,t){e=qe(e);if(e){const r=ae.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return Xe(e)}if(ae.isFunction(t)){return t.call(this,e,r)}if(ae.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=qe(e);if(e){const r=ae.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Qe(this,this[r],r,t)))}return false}delete(e,t){const r=this;let i=false;function o(e){e=qe(e);if(e){const o=ae.findKey(r,e);if(o&&(!t||Qe(r,r[o],o,t))){delete r[o];i=true}}}if(ae.isArray(e)){e.forEach(o)}else{o(e)}return i}clear(e){const t=Object.keys(this);let r=t.length;let i=false;while(r--){const o=t[r];if(!e||Qe(this,this[o],o,e,true)){delete this[o];i=true}}return i}normalize(e){const t=this;const r={};ae.forEach(this,((i,o)=>{const n=ae.findKey(r,o);if(n){t[n]=Ye(i);delete t[o];return}const s=e?Ke(o):String(o).trim();if(s!==o){delete t[o]}t[s]=Ye(i);r[s]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);ae.forEach(this,((r,i)=>{r!=null&&r!==false&&(t[i]=e&&ae.isArray(r)?r.join(", "):r)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach((e=>r.set(e)));return r}static accessor(e){const t=this[Ge]=this[Ge]={accessors:{}};const r=t.accessors;const i=this.prototype;function o(e){const t=qe(e);if(!r[t]){et(i,e);r[t]=true}}ae.isArray(e)?e.forEach(o):o(e);return this}}tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(tt.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}));ae.freezeMethods(tt);var rt=tt;function it(e,t){const r=this||$e;const i=t||r;const o=rt.from(i.headers);let n=i.data;ae.forEach(e,(function e(i){n=i.call(r,n,o.normalize(),t?t.status:undefined)}));o.normalize();return n}function ot(e){return!!(e&&e.__CANCEL__)}function nt(e,t,r){de.call(this,e==null?"canceled":e,de.ERR_CANCELED,t,r);this.name="CanceledError"}ae.inherits(nt,de,{__CANCEL__:true});function st(e,t,r){const i=r.config.validateStatus;if(!r.status||!i||i(r.status)){e(r)}else{t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}function lt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function at(e,t){e=e||10;const r=new Array(e);const i=new Array(e);let o=0;let n=0;let s;t=t!==undefined?t:1e3;return function l(a){const d=Date.now();const c=i[n];if(!s){s=d}r[o]=a;i[o]=d;let h=n;let u=0;while(h!==o){u+=r[h++];h=h%e}o=(o+1)%e;if(o===n){n=(n+1)%e}if(d-s<t){return}const f=c&&d-c;return f?Math.round(u*1e3/f):undefined}}function dt(e,t){let r=0;let i=1e3/t;let o;let n;const s=(t,i=Date.now())=>{r=i;o=null;if(n){clearTimeout(n);n=null}e(...t)};const l=(...e)=>{const t=Date.now();const l=t-r;if(l>=i){s(e,t)}else{o=e;if(!n){n=setTimeout((()=>{n=null;s(o)}),i-l)}}};const a=()=>o&&s(o);return[l,a]}const ct=(e,t,r=3)=>{let i=0;const o=at(50,250);return dt((r=>{const n=r.loaded;const s=r.lengthComputable?r.total:undefined;const l=n-i;const a=o(l);const d=n<=s;i=n;const c={loaded:n,total:s,progress:s?n/s:undefined,bytes:l,rate:a?a:undefined,estimated:a&&s&&d?(s-n)/a:undefined,event:r,lengthComputable:s!=null,[t?"download":"upload"]:true};e(c)}),r)};const ht=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]};const ut=e=>(...t)=>ae.asap((()=>e(...t)));var ft=Ee.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,Ee.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>true;var pt=Ee.hasStandardBrowserEnv?{write(e,t,r,i,o,n){const s=[e+"="+encodeURIComponent(t)];ae.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());ae.isString(i)&&s.push("path="+i);ae.isString(o)&&s.push("domain="+o);n===true&&s.push("secure");document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ct(e,t,r){let i=!gt(t);if(e&&(i||r==false)){return vt(e,t)}return t}const mt=e=>e instanceof rt?{...e}:e;function wt(e,t){t=t||{};const r={};function i(e,t,r,i){if(ae.isPlainObject(e)&&ae.isPlainObject(t)){return ae.merge.call({caseless:i},e,t)}else if(ae.isPlainObject(t)){return ae.merge({},t)}else if(ae.isArray(t)){return t.slice()}return t}function o(e,t,r,o){if(!ae.isUndefined(t)){return i(e,t,r,o)}else if(!ae.isUndefined(e)){return i(undefined,e,r,o)}}function n(e,t){if(!ae.isUndefined(t)){return i(undefined,t)}}function s(e,t){if(!ae.isUndefined(t)){return i(undefined,t)}else if(!ae.isUndefined(e)){return i(undefined,e)}}function l(r,o,n){if(n in t){return i(r,o)}else if(n in e){return i(undefined,r)}}const a={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(e,t,r)=>o(mt(e),mt(t),r,true)};ae.forEach(Object.keys({...e,...t}),(function i(n){const s=a[n]||o;const d=s(e[n],t[n],n);ae.isUndefined(d)&&s!==l||(r[n]=d)}));return r}var bt=e=>{const t=wt({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:n,headers:s,auth:l}=t;t.headers=s=rt.from(s);t.url=ke(Ct(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);if(l){s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")))}if(ae.isFormData(r)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv){s.setContentType(undefined)}else if(ae.isFunction(r.getHeaders)){const e=r.getHeaders();const t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{if(t.includes(e.toLowerCase())){s.set(e,r)}}))}}if(Ee.hasStandardBrowserEnv){i&&ae.isFunction(i)&&(i=i(t));if(i||i!==false&&ft(t.url)){const e=o&&n&&pt.read(n);if(e){s.set(o,e)}}}return t};const yt=typeof XMLHttpRequest!=="undefined";var xt=yt&&function(e){return new Promise((function t(r,i){const o=bt(e);let n=o.data;const s=rt.from(o.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:d}=o;let c;let h,u;let f,p;function g(){f&&f();p&&p();o.cancelToken&&o.cancelToken.unsubscribe(c);o.signal&&o.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,true);v.timeout=o.timeout;function C(){if(!v){return}const t=rt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());const o=!l||l==="text"||l==="json"?v.responseText:v.response;const n={data:o,status:v.status,statusText:v.statusText,headers:t,config:e,request:v};st((function e(t){r(t);g()}),(function e(t){i(t);g()}),n);v=null}if("onloadend"in v){v.onloadend=C}else{v.onreadystatechange=function e(){if(!v||v.readyState!==4){return}if(v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)){return}setTimeout(C)}}v.onabort=function t(){if(!v){return}i(new de("Request aborted",de.ECONNABORTED,e,v));v=null};v.onerror=function t(r){const o=r&&r.message?r.message:"Network Error";const n=new de(o,de.ERR_NETWORK,e,v);n.event=r||null;i(n);v=null};v.ontimeout=function t(){let r=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const n=o.transitional||He;if(o.timeoutErrorMessage){r=o.timeoutErrorMessage}i(new de(r,n.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,v));v=null};n===undefined&&s.setContentType(null);if("setRequestHeader"in v){ae.forEach(s.toJSON(),(function e(t,r){v.setRequestHeader(r,t)}))}if(!ae.isUndefined(o.withCredentials)){v.withCredentials=!!o.withCredentials}if(l&&l!=="json"){v.responseType=o.responseType}if(d){[u,p]=ct(d,true);v.addEventListener("progress",u)}if(a&&v.upload){[h,f]=ct(a);v.upload.addEventListener("progress",h);v.upload.addEventListener("loadend",f)}if(o.cancelToken||o.signal){c=t=>{if(!v){return}i(!t||t.type?new nt(null,e,v):t);v.abort();v=null};o.cancelToken&&o.cancelToken.subscribe(c);if(o.signal){o.signal.aborted?c():o.signal.addEventListener("abort",c)}}const m=lt(o.url);if(m&&Ee.protocols.indexOf(m)===-1){i(new de("Unsupported protocol "+m+":",de.ERR_BAD_REQUEST,e));return}v.send(n||null)}))};const kt=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let i;const o=function(e){if(!i){i=true;s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof de?t:new nt(t instanceof Error?t.message:t))}};let n=t&&setTimeout((()=>{n=null;o(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))}),t);const s=()=>{if(e){n&&clearTimeout(n);n=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}));e=null}};e.forEach((e=>e.addEventListener("abort",o)));const{signal:l}=r;l.unsubscribe=()=>ae.asap(s);return l}};var Mt=kt;const Lt=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0;let o;while(i<r){o=i+t;yield e.slice(i,o);i=o}};const Ht=async function*(e,t){for await(const r of Vt(e)){yield*Lt(r,t)}};const Vt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const At=(e,t,r,i)=>{const o=Ht(e,t);let n=0;let s;let l=e=>{if(!s){s=true;i&&i(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await o.next();if(t){l();e.close();return}let s=i.byteLength;if(r){let e=n+=s;r(e)}e.enqueue(new Uint8Array(i))}catch(e){l(e);throw e}},cancel(e){l(e);return o.return()}},{highWaterMark:2})};const Zt=64*1024;const{isFunction:St}=ae;const Ot=(({Request:e,Response:t})=>({Request:e,Response:t}))(ae.global);const{ReadableStream:Tt,TextEncoder:Bt}=ae.global;const Pt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const _t=e=>{e=ae.merge.call({skipUndefined:true},Ot,e);const{fetch:t,Request:r,Response:i}=e;const o=t?St(t):typeof fetch==="function";const n=St(r);const s=St(i);if(!o){return false}const l=o&&St(Tt);const a=o&&(typeof Bt==="function"?(e=>t=>e.encode(t))(new Bt):async e=>new Uint8Array(await new r(e).arrayBuffer()));const d=n&&l&&Pt((()=>{let e=false;const t=new r(Ee.origin,{body:new Tt,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const c=s&&l&&Pt((()=>ae.isReadableStream(new i("").body)));const h={stream:c&&(e=>e.body)};o&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!h[e]&&(h[e]=(t,r)=>{let i=t&&t[e];if(i){return i.call(t)}throw new de(`Response type '${e}' is not supported`,de.ERR_NOT_SUPPORT,r)})}))})();const u=async e=>{if(e==null){return 0}if(ae.isBlob(e)){return e.size}if(ae.isSpecCompliantForm(e)){const t=new r(Ee.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(ae.isArrayBufferView(e)||ae.isArrayBuffer(e)){return e.byteLength}if(ae.isURLSearchParams(e)){e=e+""}if(ae.isString(e)){return(await a(e)).byteLength}};const f=async(e,t)=>{const r=ae.toFiniteNumber(e.getContentLength());return r==null?u(t):r};return async e=>{let{url:o,method:s,data:l,signal:a,cancelToken:u,timeout:p,onDownloadProgress:g,onUploadProgress:v,responseType:C,headers:m,withCredentials:w="same-origin",fetchOptions:b}=bt(e);let y=t||fetch;C=C?(C+"").toLowerCase():"text";let x=Mt([a,u&&u.toAbortSignal()],p);let k=null;const M=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let L;try{if(v&&d&&s!=="get"&&s!=="head"&&(L=await f(m,l))!==0){let e=new r(o,{method:"POST",body:l,duplex:"half"});let t;if(ae.isFormData(l)&&(t=e.headers.get("content-type"))){m.setContentType(t)}if(e.body){const[t,r]=ht(L,ct(ut(v)));l=At(e.body,Zt,t,r)}}if(!ae.isString(w)){w=w?"include":"omit"}const t=n&&"credentials"in r.prototype;const a={...b,signal:x,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:l,duplex:"half",credentials:t?w:undefined};k=n&&new r(o,a);let u=await(n?y(k,b):y(o,a));const p=c&&(C==="stream"||C==="response");if(c&&(g||p&&M)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=u[t]}));const t=ae.toFiniteNumber(u.headers.get("content-length"));const[r,o]=g&&ht(t,ct(ut(g),true))||[];u=new i(At(u.body,Zt,r,(()=>{o&&o();M&&M()})),e)}C=C||"text";let H=await h[ae.findKey(h,C)||"text"](u,e);!p&&M&&M();return await new Promise(((t,r)=>{st(t,r,{data:H,headers:rt.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:k})}))}catch(t){M&&M();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new de("Network Error",de.ERR_NETWORK,e,k),{cause:t.cause||t})}throw de.from(t,t&&t.code,e,k)}}};const jt=new Map;const Et=e=>{let t=e?e.env:{};const{fetch:r,Request:i,Response:o}=t;const n=[i,o,r];let s=n.length,l=s,a,d,c=jt;while(l--){a=n[l];d=c.get(a);d===undefined&&c.set(a,d=l?new Map:_t(t));c=d}return d};Et();const Rt={http:ue,xhr:xt,fetch:{get:Et}};ae.forEach(Rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Dt=e=>`- ${e}`;const It=e=>ae.isFunction(e)||e===null||e===false;var Ft={getAdapter:(e,t)=>{e=ae.isArray(e)?e:[e];const{length:r}=e;let i;let o;const n={};for(let s=0;s<r;s++){i=e[s];let r;o=i;if(!It(i)){o=Rt[(r=String(i)).toLowerCase()];if(o===undefined){throw new de(`Unknown adapter '${r}'`)}}if(o&&(ae.isFunction(o)||(o=o.get(t)))){break}n[r||"#"+s]=o}if(!o){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let t=r?e.length>1?"since :\n"+e.map(Dt).join("\n"):" "+Dt(e[0]):"as no adapter specified";throw new de(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return o},adapters:Rt};function Nt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new nt(null,e)}}function zt(e){Nt(e);e.headers=rt.from(e.headers);e.data=it.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Ft.getAdapter(e.adapter||$e.adapter,e);return t(e).then((function t(r){Nt(e);r.data=it.call(e,e.transformResponse,r);r.headers=rt.from(r.headers);return r}),(function t(r){if(!ot(r)){Nt(e);if(r&&r.response){r.response.data=it.call(e,e.transformResponse,r.response);r.response.headers=rt.from(r.response.headers)}}return Promise.reject(r)}))}const $t="1.12.2";const Wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Wt[e]=function r(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const Ut={};Wt.transitional=function e(t,r,i){function o(e,t){return"[Axios v"+$t+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(e,i,n)=>{if(t===false){throw new de(o(i," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED)}if(r&&!Ut[i]){Ut[i]=true;console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,i,n):true}};Wt.spelling=function e(t){return(e,r)=>{console.warn(`${r} is likely a misspelling of ${t}`);return true}};function Gt(e,t,r){if(typeof e!=="object"){throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE)}const i=Object.keys(e);let o=i.length;while(o-- >0){const n=i[o];const s=t[n];if(s){const t=e[n];const r=t===undefined||s(t,n,e);if(r!==true){throw new de("option "+n+" must be "+r,de.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new de("Unknown option "+n,de.ERR_BAD_OPTION)}}}var qt={assertOptions:Gt,validators:Wt};const Yt=qt.validators;class Xt{constructor(e){this.defaults=e||{};this.interceptors={request:new Le,response:new Le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=wt(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;if(r!==undefined){qt.assertOptions(r,{silentJSONParsing:Yt.transitional(Yt.boolean),forcedJSONParsing:Yt.transitional(Yt.boolean),clarifyTimeoutError:Yt.transitional(Yt.boolean)},false)}if(i!=null){if(ae.isFunction(i)){t.paramsSerializer={serialize:i}}else{qt.assertOptions(i,{encode:Yt.function,serialize:Yt.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}qt.assertOptions(t,{baseUrl:Yt.spelling("baseURL"),withXsrfToken:Yt.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=o&&ae.merge(o.common,o[t.method]);o&&ae.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]}));t.headers=rt.concat(n,o);const s=[];let l=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}l=l&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));const a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));let d;let c=0;let h;if(!l){const e=[zt.bind(this),undefined];e.unshift(...s);e.push(...a);h=e.length;d=Promise.resolve(t);while(c<h){d=d.then(e[c++],e[c++])}return d}h=s.length;let u=t;while(c<h){const e=s[c++];const t=s[c++];try{u=e(u)}catch(e){t.call(this,e);break}}try{d=zt.call(this,u)}catch(e){return Promise.reject(e)}c=0;h=a.length;while(c<h){d=d.then(a[c++],a[c++])}return d}getUri(e){e=wt(this.defaults,e);const t=Ct(e.baseURL,e.url,e.allowAbsoluteUrls);return ke(t,e.params,e.paramsSerializer)}}ae.forEach(["delete","get","head","options"],(function e(t){Xt.prototype[t]=function(e,r){return this.request(wt(r||{},{method:t,url:e,data:(r||{}).data}))}}));ae.forEach(["post","put","patch"],(function e(t){function r(e){return function r(i,o,n){return this.request(wt(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Xt.prototype[t]=r();Xt.prototype[t+"Form"]=r(true)}));var Jt=Xt;class Qt{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(r){t=r}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=e=>{let t;const i=new Promise((e=>{r.subscribe(e);t=e})).then(e);i.cancel=function e(){r.unsubscribe(t)};return i};e((function e(i,o,n){if(r.reason){return}r.reason=new nt(i,o,n);t(r.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new Qt((function t(r){e=r}));return{token:t,cancel:e}}}var Kt=Qt;function er(e){return function t(r){return e.apply(null,r)}}function tr(e){return ae.isObject(e)&&e.isAxiosError===true}const rr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rr).forEach((([e,t])=>{rr[t]=e}));var ir=rr;function or(t){const r=new Jt(t);const i=e(Jt.prototype.request,r);ae.extend(i,Jt.prototype,r,{allOwnKeys:true});ae.extend(i,r,null,{allOwnKeys:true});i.create=function e(r){return or(wt(t,r))};return i}const nr=or($e);nr.Axios=Jt;nr.CanceledError=nt;nr.CancelToken=Kt;nr.isCancel=ot;nr.VERSION=$t;nr.toFormData=me;nr.AxiosError=de;nr.Cancel=nr.CanceledError;nr.all=function e(t){return Promise.all(t)};nr.spread=er;nr.isAxiosError=tr;nr.mergeConfig=wt;nr.AxiosHeaders=rt;nr.formToJSON=e=>Fe(ae.isHTMLForm(e)?new FormData(e):e);nr.getAdapter=Ft.getAdapter;nr.HttpStatusCode=ir;nr.default=nr;axios_1=nr;return axios_1}var axiosExports=requireAxios();var axios=getDefaultExportFromCjs(axiosExports);const Parameters={endpoints:{graphQL:"https://dypxviim4zgwtpev7valhchaem.appsync-api.eu-west-2.amazonaws.com/graphql"}};const createElement=e=>`\n mutation AddField {\n createTemplateElement(input: {\n templateId: "${e.templateId}", \n ax: ${e.ax}, \n ay: ${e.ay}, \n bx: ${e.bx}, \n by: ${e.by}, \n elementType: ${JSON.stringify(e.elementType)}, \n role: "1",\n label: ${JSON.stringify(e.label)}, \n page: ${e.page}, \n fieldOrder: ${e.fieldOrder}, \n fontName: ${JSON.stringify(e.fontName)}, \n fontSize: ${e.fontSize}, \n helpText: ${JSON.stringify(e.helpText)}, \n hideBorder: ${e.hideBorder}, \n logicGroup: ${JSON.stringify(e.logicGroup)}, \n mapTo: ${JSON.stringify(e.mapTo)}, \n optional: ${e.optional}, \n options: ${JSON.stringify(e.options)}, \n substantive: ${e.substantive}, \n validation: ${e.validation}, \n value: ${JSON.stringify(e.value)}, \n align: ${JSON.stringify(e.align)}, \n signer: ${e.signer}, \n logicAction: ${e.logicAction}, \n labelExtra: ${JSON.stringify(e.labelExtra)}})\n }`;const updateElement=e=>`mutation ChangeField {\n updateTemplateElement(input: {\n templateElementId: "${e.id}", \n ax: ${e.ax}, \n ay: ${e.ay}, \n bx: ${e.bx}, \n by: ${e.by}, \n elementType: ${JSON.stringify(e.elementType)}, \n label: ${JSON.stringify(e.label)}, \n page: ${e.page}, \n fieldOrder: ${e.fieldOrder?e.fieldOrder:null}, \n fontName: ${JSON.stringify(e.fontName)}, \n fontSize: ${e.fontSize}, \n helpText: "${e.helpText}", \n hideBorder: ${e.hideBorder}, \n logicGroup: ${JSON.stringify(e.logicGroup)}, \n mapTo: "${e.mapTo}", \n optional: ${e.optional}, \n options: ${JSON.stringify(e.options)}, \n role: "1", \n substantive: ${e.substantive}, \n validation: ${e.validation==="0"?"null":e.validation}, \n value: "${e.value}", \n align: "${e.align}", \n signer: ${e.signer}, \n logicAction: ${e.logicAction}, \n labelExtra: "${e.labelExtra}"})\n}`;const deleteElement=e=>`mutation DeleteField {\n deleteTemplateElement(input: {\n templateElementId: "${e.id}"})\n }`;const createRole=e=>{const t=e?.signerParent?`"${e.signerParent}"`:"null";return`\n mutation LDVAddRole {\n createTemplateRole(input: {\n templateId: "${e.templateId}" \n signerIndex: ${e.signerIndex}\n signerParent: ${t}\n name: ${JSON.stringify(e.name)}\n ordinal: ${e.ordinal}\n roleType: ${e.roleType}\n experience: "${e.experience}"\n })\n }`};const deleteRole=e=>`\n mutation LDVremoveRole {\n deleteTemplateRole(input: {\n templateRoleId: "${e.id}" \n })\n }`;const updateRole=e=>{const t=e?.signerParent?`"${e.signerParent}"`:"null";return`\n mutation LDVupdateRole {\n updateTemplateRole(input: {\n templateRoleId: "${e.id}" \n signerIndex: ${e.signerIndex}\n ordinal: ${e.ordinal}\n signerParent: ${t}\n name: ${JSON.stringify(e.name)}\n roleType: ${e.roleType}\n experience: "${e.experience}"\n })\n }`};const swapRoles=(e,t)=>`\n mutation LDVswapRole {\n swapRoles(input: {\n roleId1: "${e.id}" \n roleId2: "${t.id}"\n })\n }`;class LsDocumentAdapter{endpoint;constructor(e){this.endpoint=e}handleEvent=async(e,t)=>{axios.defaults.headers.common["Authorization"]=t;const r=e.data;if(!r?.id)return"invalid";const i=atob(r.id);if(i.length<3)return"invalid";const o=atob(r.id).substring(0,3);let n="";switch(o){case"ele":switch(e.action){case"create":n=createElement(r);break;case"update":n=updateElement(recalculateCoordinates(r));break;case"delete":n=deleteElement(r);break}break;case"rol":switch(e.action){case"create":n=createRole(r);break;case"update":n=updateRole(r);break;case"delete":n=deleteRole(r);break;case"swap":console.log(r,e);n=swapRoles(r,e.data2);break}break;case"tpl":switch(e.action){case"update":n=updateTemplate(r);break}break}const s=await this.execute(t,n);return{result:s,obj:r,event:e}};async execute(e,t,r){if(e){const i=await axios.post(this.endpoint||Parameters.endpoints.graphQL,{query:t,variables:r?r:{}},{headers:{Authorization:e}});return i.data.data}else{console.warn("UNASSIGNED ACCESS TOKEN")}return Promise.reject()}}const getGroupData=e=>`\n query LDVgetGroupData {\n group(id: "${e}"){\n id \n standardMessageConnection{\n messages {\n id\n name\n default\n body\n created\n modified\n }\n }\n scheduleConnection {\n schedules {\n id\n name\n items {\n id\n daysAfter\n frequency\n subject\n message\n when\n timeOfDay\n skipWeekend\n }\n default\n }\n }\n experienceConnection{\n experiences {\n id\n name\n language\n defaultExperience\n witnessSameDevice\n allowSignatureReuse\n attachDraft\n canReassign\n defaultReminderSubject\n defaultSubject\n finalSignerEmailSubHeader\n finalSignerEmailText\n footerTextColour\n forwarding\n penDiameter\n postSignAttach\n postSignEmail\n rejectedEmailSubheader\n senderName\n signatureAppendDate\n signatureDoneText\n signatureMouse\n signatureType\n signatureCertifiedType\n signatureUpload\n signatureAppend\n signatureAppendExtra\n signingPageText\n textBackgroundColour\n textFontColour\n typedSignatureFixedSize\n created\n modified\n witnessingRequiresSignerSMS\n witnessingRequiresWitnessSMS\n }\n }\n attachmentConnection {\n attachments {\n id\n filename\n autoAttach\n description\n created\n }\n }\n contactConnection {\n contacts{\n id\n firstName\n lastName\n email\n phoneNumber\n name\n }\n }\n }\n }\n `;const lsDocumentViewerCss="*,*::before,*::after{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion: no-preference){html{interpolate-size:allow-keywords}}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate}:host{display:flex;flex-direction:row;width:100vw;height:100vh;margin:0px;padding:0px}.validation-tag-wrapper{position:fixed;top:0.375rem;right:0.375rem;z-index:2000}#my-field-panel{position:relative;height:calc(100% - 4.313rem)}.leftBox{position:relative;border-radius:16px;border:1px solid var(--gray-30, #edeff2);background:var(--white, #fff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);width:21.25rem;margin:1rem;min-width:21.25rem;max-height:100%;z-index:1000;left:0;top:0}.left-box-inner{position:relative;display:flex;height:100%;padding:0.75rem;gap:0.75rem}.rightBox{width:200px;border:1px gray solid;width:470px;min-width:390px;padding:4px;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:8px;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.ls-editor-infobox{padding:2px 8px 2px 8px}#pdf-canvas{top:0px;left:0px;width:100px;height:100px;box-shadow:0 8px 32px 0 rgba(0, 0, 0, 0.12)}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw;height:100%}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:visible;max-height:100%;width:100vw;overflow:scroll;padding:5rem 380px 2rem 380px}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:30px}.nextButton{position:relative;bottom:30px}.fieldBox{z-index:1000}#ls-box-selector{position:absolute;visibility:hidden;background-color:transparent;border:1px rgba(71, 71, 71, 0.716) dashed}#ls-editor-form{display:flex;width:100vw;height:calc(100vh - 2.25rem);position:relative;background:var(--gray-10, #f7f8fa);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.04) inset, 0 10px 15px 0 rgba(0, 0, 0, 0.04) inset}.hidden{visibility:hidden;display:none;width:0px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.fields-box{display:flex;flex-direction:column;gap:0.75rem}.page-header{display:flex;height:2.25rem;gap:0.5rem;padding:0.25rem 0.75rem;justify-content:center;align-items:center}.header-text-1{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem}.header-text-2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem}.properties-header{display:flex;padding:1rem;gap:0.75rem;align-items:center;border-bottom:1px solid var(--gray-20, #edeff2)}.properties-header-title{color:var(--gray-100, #45484d);width:100%;font-size:1.5rem;font-style:normal;font-weight:500;line-height:2rem;}.properties-header-icon{display:flex;padding:0.5rem;border-radius:0.625rem;background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.field-properties-outer{position:relative;height:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";pdfExports.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js";const LsDocumentViewer=class{constructor(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.pageChange=createEvent(this,"pageChange");this.selectFields=createEvent(this,"selectFields");this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}isPageRendering;pdfDocument;pageNumPending=null;canvas;ctx;pageDimensions;isMoving=false;isBoxing=false;selectionBox=null;hitField;edgeSide;startLocations;startMouse;template;token;userpool;endpoint;templateid;zoom=1;pageNum=1;signer=0;_template;validationErrors=[];status;groupInfo;selected=[];isLoading=true;mode="editor";modeHandler(e,t){if(e==="preview"){this.showtoolbar=false;this.showtoolbox=false;this.showstatusbar=false;this.readonly=true}else if(e==="editor"){this.showtoolbar=true;this.showtoolbox=true;this.showstatusbar=true;this.readonly=false}else if(e==="compose"){this.showtoolbar=true;this.showtoolbox=true;this.showstatusbar=true;this.readonly=false}}tableViewHandler(e,t){if(e===true){this.showPageFields(-1)}else if(e==="editor"){this.showPageFields(this.pageNum)}this.queueRenderPage(this.pageNum)}manager="toolbox";displayTable=false;showtoolbox=false;showtoolbar=false;showstatusbar=false;showpagepreview=false;expandfields=false;readonly=false;showtableview=false;toolboxFilter=null;pageRendered;pageChange;selectFields;mutate;update;adapter;mutateHandler(e){if(this.token&&this.adapter)e.detail.forEach((e=>this.adapter.handleEvent(e,this.token).then((e=>matchData.bind(this)(e)))))}updateHandler(e){if(e.detail)e.detail.forEach((e=>this.syncChange(e)))}addParticpantHandler(e){const t=this.groupInfo.experienceConnection.experiences.find((e=>e.defaultExperience===true));const r=this._template.roles.find((t=>t.id===e.detail.parent));const i=[{action:"create",data:{id:btoa("rol"+crypto.randomUUID()),name:"Signer "+(this._template.roles.length+1),roleType:e.detail.type,signerIndex:e.detail.type==="WITNESS"?100+r.signerIndex:this._template.roles.length,ordinal:e.detail.type==="WITNESS"?r.ordinal+1:this._template.roles.length,signerParent:e.detail.parent,experience:t.id,templateId:this._template.id}}];this.update.emit(i);this.mutate.emit(i)}selectFieldsHandler(e){const t=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:t.map((e=>e.dataItem))}};var r=this.component.shadowRoot.getElementById("ls-toolbar");if(r){r.dataItem=e.detail}var i=this.component.shadowRoot.getElementById("my-field-panel");if(i){i.dataItem=e.detail}e.detail.forEach((e=>{const t=this.component.shadowRoot.getElementById("ls-field-"+e.id);t.selected=true}));this.selected.forEach((t=>t.selected=e.detail.map((e=>e.id)).includes(t.dataItem.id)));this.validationErrors=validate.bind(this)(this._template)}roleHandler(e){this.signer=e.detail}async pageNext(){if(this.pageNum>=this.pdfDocument.numPages){return}this.pageNum+=1;this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}async pagePrev(){if(this.pageNum<=1){return}this.pageNum-=1;this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}async unselect(){const e=this.component.shadowRoot.querySelectorAll("ls-editor-field");e.forEach((e=>{e.selected=false}));this.selected=[]}async setZoom(e){this.zoom=e;this.canvas=this.component.shadowRoot.getElementById("pdf-canvas");const t=this.component.shadowRoot.getElementById("ls-document-frame");this.canvas.style.height=this.pageDimensions[this.pageNum-1].height*e+"px";this.canvas.style.width=this.pageDimensions[this.pageNum-1].width*e+"px";t.style.height=this.pageDimensions[this.pageNum-1].height*e+"px";t.style.width=this.pageDimensions[this.pageNum-1].width*e+"px";this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((e=>moveField.bind(this)(e,e.dataItem)));this.queueRenderPage(this.pageNum);this.showPageFields(this.pageNum)}clip(e,t=0){return e>1?t:e}parseTemplate(e){const t=JSON.parse(e);const r=JSON.parse(JSON.parse(t.pageDimensions));this.pageDimensions=r.map((e=>({height:e[1],width:e[0]})));const i=t.elementConnection.templateElements.map((e=>({...e,top:this.clip(e.ay)*this.pageDimensions[0].height,left:this.clip(e.ax)*this.pageDimensions[0].width,height:(this.clip(e.by,.1)-this.clip(e.ay))*this.pageDimensions[0].height,width:(this.clip(e.bx,.2)-this.clip(e.ax))*this.pageDimensions[0].width,templateId:t.id})));const o=t.roles.map((e=>({...e,templateId:t.id})));this.signer=o.length>0?1:0;this._template={...t,elementConnection:{...t.elementConnection,templateElements:i},roles:o}}renderPage(e){this.isPageRendering=true;this.pdfDocument.getPage(e).then((e=>{const t=e.getViewport({scale:this.zoom});this.canvas.height=Math.floor(t.height);this.canvas.width=Math.floor(t.width);const r={viewport:t,canvasContext:this.ctx};const i=e.render(r);i.promise.then((()=>{this.isPageRendering=false;this.pageRendered.emit(this.pageNum);if(this.pageNumPending!==null){this.renderPage(this.pageNumPending);this.pageChange.emit(this.pageNumPending);this.pageNumPending=null}}))}))}queueRenderPage(e){if(this.isPageRendering){this.pageNumPending=e}else{this.renderPage(e)}}loadAndRender(e){pdfExports.getDocument(e).promise.then((e=>{this.pdfDocument=e;this.renderPage(this.pageNum)}))}prepareElement(e){return{...e,top:Math.floor(this.clip(e.ay)*this.pageDimensions[e.page-1].height),left:Math.floor(this.clip(e.ax)*this.pageDimensions[e.page-1].width),height:Math.floor((this.clip(e.by,.05)-this.clip(e.ay))*this.pageDimensions[e.page-1].height),width:Math.floor((this.clip(e.bx,.2)-this.clip(e.ax))*this.pageDimensions[e.page-1].width),pageDimensions:this.pageDimensions[e.page-1],templateId:this._template.id}}syncChange(e){if(e?.select==="clear"){this.unselect()}if(getApiType(e.data)==="element"){if(e.action==="create"){const t={...e.data,page:this.pageNum};addField.bind(this)(this.component.shadowRoot.getElementById("ls-document-frame"),t)}else if(e.action==="update"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);if(t){moveField.bind(this)(t,e.data);const r=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);r.dataItem=e.data;this.selectFields.emit(this.selected.map((e=>e.dataItem)));this.selected=this.selected.map((t=>t.dataItem.id===e.data.id?r:t))}const r=this.component.shadowRoot.querySelectorAll("ls-editor-field");this.selected=Array.from(r).filter((e=>e.selected))}else if(e.action==="delete"){const t=this.component.shadowRoot.getElementById("ls-field-"+e.data.id);const r=this._template.elementConnection.templateElements;this._template={...this._template,elementConnection:{...this._template.elementConnection,templateElements:r.filter((t=>t.id!==e.data.id))}};this.component.shadowRoot.getElementById("ls-document-frame").removeChild(t);this.selected=[]}else{console.warn("Unrecognised action, check Legalesign documentation. `create`, `update` and `delete` allowed.")}}this.validationErrors=validate.bind(this)(this._template)}initViewer(){this.canvas=this.component.shadowRoot.getElementById("pdf-canvas");this.canvas.style.height=this.pageDimensions[this.pageNum-1].height*this.zoom+"px";this.canvas.style.width=this.pageDimensions[this.pageNum-1].width*this.zoom+"px";this.ctx=this.canvas.getContext("2d");if(this._template?.link)this.loadAndRender(this._template?.link);var e=this.component.shadowRoot.getElementById("ls-document-frame");e.addEventListener("click",mouseClick.bind(this));e.addEventListener("mousedown",mouseDown.bind(this));e.addEventListener("mousemove",mouseMove.bind(this));e.addEventListener("mouseup",mouseUp.bind(this));document.addEventListener("keydown",keyDown.bind(this));e.addEventListener("dragenter",(e=>{e.preventDefault()}));e.addEventListener("dragover",(e=>{e.preventDefault()}));e.addEventListener("drop",mouseDrop.bind(this));this.generateFields()}generateFields(e=true){if(e){const e=this.component.shadowRoot.querySelectorAll("ls-editor-field");e.forEach((e=>this.component.shadowRoot.getElementById("ls-document-frame").removeChild(e)))}this._template.elementConnection.templateElements.forEach((e=>{addField.bind(this)(this.component.shadowRoot.getElementById("ls-document-frame"),this.prepareElement(e))}))}showPageFields(e){const t=this.component.shadowRoot.querySelectorAll("ls-editor-field");Array.from(t).forEach((t=>{t.className=t.dataItem.page===e?"":"hidden"}))}async load(){this.isLoading=true;try{this.adapter=new LsDocumentAdapter(this.endpoint);const e=await this.adapter.execute(this.token,getTemplate(this.templateid));this.parseTemplate(JSON.stringify(e.template));const t=await this.adapter.execute(this.token,getGroupData(this._template.groupId));this.groupInfo=t.group;this.initViewer();this.validationErrors=validate.bind(this)(this._template);this.selected=[];this.setZoom(1);this.isLoading=false}catch(e){console.error("Your access token is invalid.",e)}}componentWillLoad(){if(this.token&&!this._template)this.load()}handleSelectedField(e){const t=this.component.shadowRoot.querySelectorAll("ls-toolbox-field");t.forEach((t=>{const r=t.formElementType===e.detail;t.isSelected=r}))}render(){return h(Host,{key:"81fb162f62eee08b7e9608ab01a662b8692ced19"},h(h.Fragment,null,this.isLoading&&h("ls-page-loader",{key:"8d72275abac9bf7b7c60dc0f3bf359b61da2bfa8"}),h("div",{key:"9403504084bfeee0569896524971a8b0b1e7a227",class:"validation-tag-wrapper"},h("ls-validation-tag",{key:"989610b8316de91ccbde6ad01c13e8159edc584c",validationErrors:this.validationErrors})),h("div",{key:"f22196cecc91276d4df7c632b5c4a9412f2a53eb",class:"page-header"},h("p",{key:"5bda0c223072135232f648d28e59bd79145fe349",class:"header-text-1"},"Template Creation"),h("p",{key:"129f5a82ea8e5afb4a992687e121bde326908b97"},"/"),h("p",{key:"e1f00b84543a3e8a9baee098742c6519d7d2bcde",class:"header-text-2"},this._template?.title)),h("form",{key:"38f0cbd650c8f45a4b415ee20b5fc2dd73345442",id:"ls-editor-form"},this.showtoolbox===true?h("div",{id:"ls-left-box",class:"leftBox"},h("div",{class:!this.selected||this.selected.length===0?"left-box-inner":"hidden"},h("ls-feature-column",{onManage:e=>{if(e.detail==="document"){var t=this.component.shadowRoot.getElementById("ls-document-options");t.template=this._template}else if(e.detail==="participant"){var r=this.component.shadowRoot.getElementById("ls-participant-manager");r.template=this._template}this.manager=e.detail}}),h("div",{id:"ls-toolbox",class:this.manager==="toolbox"?"toolbox":"hidden"},h("div",{class:"ls-editor-infobox"},h("h2",{class:"toolbox-section-title"},"Participant Fields"),h("p",{class:"toolbox-section-description"},"Select and Click to place Signature fields where you’d like on the Document.")),h("div",{class:"fields-box"},this.signer>0?h("ls-toolbox-field",{elementType:"signature",formElementType:"signature",label:"Signature",defaultHeight:27,defaultWidth:120,validation:0,icon:"signature",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}):h("ls-toolbox-field",{elementType:"auto sign",formElementType:"auto sign",label:"Auto Sign",defaultHeight:27,defaultWidth:120,validation:3e3,icon:"auto-sign",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"text",formElementType:"text",label:"Text",defaultHeight:27,defaultWidth:100,validation:0,icon:"text",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"signing date",formElementType:"signing date",label:"Signing Date",defaultHeight:27,defaultWidth:120,validation:30,icon:"auto-date",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"date",formElementType:"date",label:"Date",defaultHeight:27,defaultWidth:80,validation:2,icon:"calender",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"email",formElementType:"email",label:"Email",defaultHeight:27,defaultWidth:120,validation:1,icon:"at-symbol",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"initials",formElementType:"initials",label:"Initials",defaultHeight:27,defaultWidth:120,validation:2e3,icon:"initials",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("div",{class:"fields-box"},h("ls-toolbox-field",{elementType:"number",formElementType:"number",label:"Number",defaultHeight:27,defaultWidth:80,validation:50,icon:"hashtag",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"dropdown",formElementType:"dropdown",label:"Dropdown",defaultHeight:27,defaultWidth:80,validation:20,icon:"hashtag",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"checkbox",formElementType:"checkbox",label:"Checkbox",defaultHeight:27,defaultWidth:27,validation:25,icon:"check",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"regex",formElementType:"regex",label:"Regex",defaultHeight:27,defaultWidth:120,validation:93,icon:"code",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"image",formElementType:"image",label:"Image",defaultHeight:27,defaultWidth:120,validation:90,icon:"photograph",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}}),h("ls-toolbox-field",{elementType:"file",formElementType:"file",label:"File",defaultHeight:27,defaultWidth:120,validation:74,icon:"upload",signer:this.signer,onSelected:e=>{this.handleSelectedField.bind(this)(e)}})))),h("ls-participant-manager",{id:"ls-participant-manager",class:this.manager==="participant"?"toolbox":"hidden",editor:this}),h("ls-document-options",{id:"ls-document-options",class:this.manager==="document"?"toolbox":"hidden"})),!this.displayTable&&h("div",{class:this.selected.length>0?"field-properties-outer":"hidden"},h("div",{class:"properties-header"},h("div",{class:"properties-header-icon"},h("ls-icon",{name:"pre-filled-content"})),h("h1",{class:"properties-header-title"},"Field Properties"),h("button",{class:"tertiaryGrey",onClick:e=>{this.selected=[];e.preventDefault()}},h("ls-icon",{name:"x",size:"20"}))),h("ls-field-properties",{id:"my-field-panel"}),h("slot",null))):h(h.Fragment,null),h("ls-toolbar",{key:"f64bad623489b4f7b56c08d7c1e1fbd2264df854",id:"ls-toolbar",template:this._template,editor:this,groupInfo:this.groupInfo}),h("div",{key:"b1d691f755d4ea7a913ab5bf3b6d22bcc02e9464",id:"ls-mid-area"},h("div",{key:"985b96b3b721d206a0e099ffef062f502d633b32",class:"document-frame-wrapper",id:"document-frame-wrapper"},h("div",{key:"85db5a30105e084d55e962c1a9d74b267d2a332f",id:"ls-document-frame"},h("canvas",{key:"39041d335b556218f7fb2718e26d018ec596afe7",id:"pdf-canvas",class:this.displayTable||this.isLoading?"hidden":""}),h("ls-editor-table",{key:"1580ed3da6d3fd5a5ca81b0da0fb733e6a6ced1f",editor:this,class:this.displayTable?"":"hidden"}),h("div",{key:"6282c570b3d0051adcf46642999516694f3f7996",id:"ls-box-selector"}))),h("ls-statusbar",{key:"236c388bea733eb6eef71e3ae0f8e97e20822261",editor:this})))))}static get watchers(){return{mode:["modeHandler"],displayTable:["tableViewHandler"]}}};LsDocumentViewer.style=lsDocumentViewerCss;const defaultRolePalette=[{description:"gray",s10:"#f7f8fa",s20:"#edeff2",s30:"#e0e2e5",s40:"#d8d9dc",s50:"#c8c9cc",s60:"#afb0b2",s70:"#939599",s80:"#6f7176",s90:"#5e6066",s100:"#45484d"},{description:"blue",s10:"#f0f6ff",s20:"#e0ecff",s30:"#bed4fa",s40:"#a2bdf5",s50:"#78a3fa",s60:"#5684f0",s70:"#4368e0",s80:"#2d4dcc",s90:"#233ead",s100:"#14287a"},{description:"green",s10:"#effff9",s20:"#c5fde8",s30:"#9df5d4",s40:"#72f0c2",s50:"#57e5b1",s60:"#46dbaa",s70:"#33b88c",s80:"#15946a",s90:"#177559",s100:"#125241"},{description:"yellow",s10:"#fffcef",s20:"#fff3c2",s30:"#fcec9d",s40:"#ffe561",s50:"#fad232",s60:"#f0b618",s70:"#cc8904",s80:"#9e5913",s90:"#8a3f0e",s100:"#70350d"},{description:"purple",s10:"#f4f0ff",s20:"#eee5ff",s30:"#d6befa",s40:"#c6a2f5",s50:"#b078fa",s60:"#9956f0",s70:"#8743e0",s80:"#722dcc",s90:"#5f23ad",s100:"#40147a"},{description:"teal",s10:"#effffc",s20:"#c5fcf1",s30:"#a5fae9",s40:"#76f5db",s50:"#54ebcd",s60:"#46dbbd",s70:"#33b8a2",s80:"#148f7e",s90:"#17756c",s100:"#15524c"},{description:"pink",s10:"#fff0f9",s20:"#ffe5f5",s30:"#fabee2",s40:"#f5a2d4",s50:"#fa78c6",s60:"#f056b2",s70:"#e043a2",s80:"#cc2d8c",s90:"#ad2376",s100:"#7a1451"},{description:"lime",s10:"#fafff0",s20:"#f6ffe5",s30:"#e6fabe",s40:"#d9f5a2",s50:"#cffa78",s60:"#bdf056",s70:"#ace043",s80:"#97cc2d",s90:"#7fad23",s100:"#587a14"},{description:"red",s10:"#fff0f0",s20:"#ffe1e0",s30:"#ffc9c7",s40:"#ffa19e",s50:"#ff706b",s60:"#f64a44",s70:"#dc2721",s80:"#c1140e",s90:"#990500",s100:"#7a1714"},{description:"lightblue",s10:"#effbff",s20:"#c7f1ff",s30:"#9de4fc",s40:"#79dbfc",s50:"#51d3ff",s60:"#48c5f0",s70:"#20a6d6",s80:"#0b80b2",s90:"#19648a",s100:"#0c3e57"},{description:"aubergine",s10:"#fcf0ff",s20:"#fae5ff",s30:"#eebefa",s40:"#e4a2f5",s50:"#e078fa",s60:"#d156f0",s70:"#c143e0",s80:"#ac2dcc",s90:"#9223ad",s100:"#66147a"},{description:"burnt",s10:"#fff6f0",s20:"#fff0e5",s30:"#fad6be",s40:"#f5c3a2",s50:"#faac78",s60:"#f09456",s70:"#e08243",s80:"#cc6d2d",s90:"#ad5a23",s100:"#7a3d14"},{description:"trueGreen",s10:"#f0fff0",s20:"#e5ffe5",s30:"#befabe",s40:"#a2f5a2",s50:"#78fa78",s60:"#56f056",s70:"#43e043",s80:"#2dcc2d",s90:"#23ad23",s100:"#147a14"},{description:"indigo",s10:"#f2f0ff",s20:"#e9e5ff",s30:"#c6befa",s40:"#ada2f5",s50:"#8978fa",s60:"#6b56f0",s70:"#5843e0",s80:"#422dcc",s90:"#3523ad",s100:"#21147a"},{description:"cyan",s10:"#efffff",s20:"#c5fcfc",s30:"#a0fafa",s40:"#76f5f5",s50:"#54ebeb",s60:"#46dbdb",s70:"#33b3b8",s80:"#11868f",s90:"#166a70",s100:"#11474d"},{s60:"rgb(70, 219, 170)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(239, 255, 249)",description:"overflowcolor"},{s60:"rgb(240, 182, 24)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 252, 239)",description:"overflowcolor"},{s60:"rgb(238, 229, 255)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(244, 240, 255)",description:"overflowcolor"},{s60:"rgb(240, 86, 178)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 240, 249)",description:"overflowcolor"},{s60:"rgb(189, 240, 86)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(250, 255, 240)",description:"overflowcolor"},{s60:"rgb(246, 74, 68)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(246, 190, 188)",description:"overflowcolor"},{s60:"rgb(58, 0, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(188, 169, 240)",description:"overflowcolor"},{s60:"rgba(1, 179, 34, 0.69)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(135, 173, 158)",description:"overflowcolor"},{s60:"rgb(201, 204, 0)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgba(246, 247, 203, 0.77)",description:"overflowcolor"},{s60:"rgb(249, 55, 129)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(255, 237, 244)",description:"overflowcolor"},{s60:"rgb(0, 14, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(209, 212, 243)",description:"overflowcolor"},{s60:"rgb(135, 173, 158)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(205, 244, 228)",description:"overflowcolor"},{s60:"rgb(86, 199, 240)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(202, 236, 248)",description:"overflowcolor"},{s60:"rgb(246, 205, 68)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(244, 240, 255)",description:"overflowcolor"},{s60:"rgb(0, 94, 166)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(188, 169, 240)",description:"overflowcolor"},{s60:"rgba(179, 1, 63, 0.69)",s100:"#",s90:"#",s30:"#",s40:"#",s80:"#",s50:"#",s10:"#",s20:"rgb(135, 173, 158)",description:"overflowcolor"}];const lsEditorFieldCss=":host{display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate}.ls-editor-field-editable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;margin:0;padding:0px 0px 0px 0px;min-width:2em;height:100%;width:100%}.ls-editor-field{opacity:0.7}.ls-editor-field-editable:focus{outline:none}.ls-editor-field-draggable{display:block;font-family:inherit;font-size:inherit;overflow:hidden;white-space:nowrap;min-width:2px;height:98%;width:98%}.hidden-field{display:none}input{all:unset}.draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.editing-input{caret-color:rgb(15 23 42);caret-shape:auto;height:100%;width:100%}.required-icon{position:absolute;top:2px;right:2px;color:var(--red-60, #f64a44)}";const LsEditorField=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}dataItem;selected=false;readonly;type;page;isEditing=false;heldEdge=null;isEdgeDragging=false;innerValue;sizeObserver;mutate;update;handleInput(e){if(e.code==="Enter"){this.isEditing=false;this.sizeObserver.observe(this.component.shadowRoot.getElementById("field-info"))}}handleMouseMove(e){if(this.readonly)return;if(!e.clientX)return;if(Math.abs(e.offsetX)<5){this.component.style.cursor="ew-resize"}else if(Math.abs(e.offsetX-this.component.clientWidth)<5){this.component.style.cursor="ew-resize"}else if(Math.abs(e.offsetY)<5){this.component.style.cursor="ns-resize"}else if(Math.abs(e.offsetY-this.component.clientHeight)<5){this.component.style.cursor="ns-resize"}else{this.component.style.cursor="move"}}handleDoubleClick(){if(this.readonly)return;this.isEditing=true;this.heldEdge=null;this.isEdgeDragging=false;this.sizeObserver.disconnect();this.innerValue=this.innerValue?this.innerValue:this.dataItem?.value;const e=this.component.shadowRoot.getElementById("editing-input");console.log(this.dataItem);if(e){e.className="ls-editor-field-editable";e.focus()}}handleDragStart(e){e.dataTransfer.setData("application/json",JSON.stringify({type:this.type}));e.dataTransfer.dropEffect="move"}watchSelectedHandler(e,t){if(e){this.component.style.background=defaultRolePalette[this.dataItem?.signer%100].s20;this.component.style.opacity="0.7";this.component.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}else{this.component.style.background="#ffffff";this.component.style.opacity="0.7";this.component.style.boxShadow="none"}}componentDidLoad(){this.sizeObserver=new ResizeObserver((e=>{for(const t of e){if(t.contentRect){const e=this.component.shadowRoot.getElementById("field-info");e.style.height=t.contentRect.height+"px";e.style.width=t.contentRect.width+"px"}}}));this.sizeObserver.observe(this.component);if(this.selected){this.component.style.background=defaultRolePalette[this.dataItem?.signer%100].s20;this.component.style.opacity="0.7";this.component.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}else{this.component.style.background="#ffffff";this.component.style.opacity="0.7";this.component.style.boxShadow="none"}}alter(e){this.dataItem={...this.dataItem,...e};this.debounce(this.dataItem,900)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=[{action:"update",data:e}];this.mutate.emit(t);this.update.emit(t)}),t)}render(){return h(Host,{key:"3ad1a3a7480b3fc1394db18a60acc7af63f7df98",style:{border:`2px ${defaultRolePalette[this.dataItem?.signer%100].s60} solid`}},h("div",{key:"16fe59242c50fd50bb96d65c6b3ffa2fa47c5e54",class:{"ls-editor-field":true,"is-selected":this.selected}},!this.dataItem?.optional&&h("ls-icon",{key:"47c188b577ab99a83b9d84b5401a20a51865f10a",name:"required",size:"12",class:"required-icon",customStyle:{verticalAlign:"top"}}),h("input",{key:"ffc948a18ace160ce07f8400ee5cf49b33062b00",id:"editing-input",class:this.isEditing?"ls-editor-field-editable":"hidden-field",type:getInputType(this.dataItem.validation).inputType,value:this.dataItem?.value,checked:this.dataItem?.value?true:false,onInput:e=>this.alter({value:e.target.value})}),h("div",{key:"1d0bec72edda583a92fff8d23c8a57c0c2433347",id:"field-info",class:this.isEditing?"hidden-field":"ls-editor-field-draggable"},this.dataItem.value.length&&this.dataItem.value||this.dataItem?.label||this.dataItem?.formElementType)))}static get watchers(){return{selected:["watchSelectedHandler"]}}};LsEditorField.style=lsEditorFieldCss;const lsEditorTableCss=":host{display:block;z-index:100;position:absolute;top:0px;left:0px}table{background-color:azure;border:1px solid black}td{border:1px solid black}";const LsEditorTable=class{constructor(e){registerInstance(this,e)}get component(){return getElement(this)}editor;componentDidLoad(){var e=this.component.shadowRoot.getElementById("ls-editor-table");Array.from(this.editor.component.shadowRoot.querySelectorAll("ls-editor-field")).forEach((t=>{const r=document.createElement("tr");const i=document.createElement("td");i.innerText=t.dataItem.id;r.appendChild(i);const o=document.createElement("td");o.innerText=t.dataItem.value;r.appendChild(o);const n=document.createElement("td");n.innerText=t.dataItem.label;r.appendChild(n);e.appendChild(r)}))}render(){return h(Host,{key:"5843064d233783ed3c491d399c415d281ed35e11"},h("table",{key:"8a6d6d1dc717876eb4401f76f8dc280b957fdeb7",id:"ls-editor-table"}),h("slot",{key:"334d466e08ed2490fa88ef774912b469fde0a287"}))}};LsEditorTable.style=lsEditorTableCss;const lsFeatureColumnCss=":host{display:flex;flex-direction:column;gap:0.5rem}.activeIcon,.defaultIcon{padding:0.75rem;border-radius:0.75rem;color:var(--gray-80, #787A80)}.defaultIcon:hover{background-color:var(--primary-10, #EFF4FF);color:var(--primary-100, #0C1457);cursor:pointer}.activeIcon{background-color:var(--primary-60, #4456F6);color:var(--white, #fff)}";const LsFeatureColoumn=class{constructor(e){registerInstance(this,e);this.manage=createEvent(this,"manage")}manager="toolbox";manage;render(){return h(Host,{key:"c153ff8227ffe959671bd72b62eef1be0d6ea0a5"},h("div",{key:"febf78c0ccc42e2511b52419955e28017b6d617c",class:this.manager==="document"?"activeIcon":"defaultIcon",onClick:()=>{console.log("document");this.manage.emit("document");this.manager="document"}},h("ls-icon",{key:"027568b936d809b03eecc895fcfab24cd65e7fa3",name:"document",size:"24"})),h("div",{key:"3fe1542a7c2053dcca881682eb29859f4bf7a914",class:this.manager==="toolbox"?"activeIcon":"defaultIcon",onClick:()=>{this.manage.emit("toolbox");this.manager="toolbox"}},h("ls-icon",{key:"2656bb9ebbcec8dbf2a5519e9f80ceb734413828",name:"typing-input",size:"24"})),h("div",{key:"46abc8a29b3488273d669089602ed902752b1145",class:this.manager==="participant"?"activeIcon":"defaultIcon",onClick:()=>{this.manage.emit("participant");this.manager="participant"}},h("ls-icon",{key:"173f5cc9556a37f7502fb7c02e1644659dd65b16",name:"user-group",size:"24"})),h("slot",{key:"856f4c459eb86ae32eb564c5024f64231f9cc8a1"}))}};LsFeatureColoumn.style=lsFeatureColumnCss;const lsFieldAlignmentCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldAlignment=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}right(){const e=this.dataItem.reduce(((e,t)=>t.left+t.width<e?e:t.left+t.width),0);console.log(e);const t=this.dataItem.map((t=>{const r=e-t.width;return{action:"update",data:{...t,left:r,ax:r,bx:r+t.width}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}center(){const e=this.dataItem.reduce(((e,t)=>{console.log(e+(t.left+t.width/2));return e+(t.left+t.width/2)}),0);console.log(e);const t=e/this.dataItem.length;console.log("centerposition",t);const r=this.dataItem.map((e=>{const r=e.left+(t-(e.left+e.width/2));return{action:"update",data:{...e,left:r,ax:r,bx:r+e.width}}}));console.log(r);this.dataItem=r.map((e=>e.data));this.mutate.emit(r);this.update.emit(r)}top(){const e=this.dataItem.reduce(((e,t)=>t.top<e?e:t.top),0);this.alter({top:e})}left(){const e=this.dataItem.reduce(((e,t)=>t.left<e?t.left:e),this.dataItem[0].left);this.alter({left:e})}middle(){const e=this.dataItem.reduce(((e,t)=>{console.log(e+(t.top+t.height/2));return e+(t.top+t.height/2)}),0);const t=e/this.dataItem.length;const r=this.dataItem.map((e=>{const r=e.top+(t-(e.top+e.height/2));return{action:"update",data:{...e,top:r,ay:r,by:r+e.height}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r);this.update.emit(r)}bottom(){const e=this.dataItem.reduce(((e,t)=>e>t.top+t.height?e:t.top+t.height),0);const t=this.dataItem.map((t=>{const r=e-t.height;return{action:"update",data:{...t,top:r,ay:r,by:r+t.height}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"276514255f8b1da24cffe917638d0e79196cd4c9"},h("div",{key:"0e4af454e1789c6b5ee4dd443c69eb700428bee6",class:"ls-field-properties-section"},h("div",{key:"958a851c77101f9146c3947fd31d56b9ad0d1c84",class:"ls-field-properties-section-text"},h("p",{key:"7d8add53a07a7b453feedffcd45dd6129f57de37",class:"ls-field-properties-section-title"},"Alignment"),h("p",{key:"a072da1f7284f3e3162af00431eb86b103a6d139",class:"ls-field-properties-section-description"},"Align your Fields relative to the page or multi-select and align then to each other.")),h("div",{key:"6bf9c9285cdbdab4ed8b51de45b8199d2e2d1770",class:"multi-button-group-row"},h("div",{key:"ba5a3e3e98211666a962c20c6de73aca844c4af5",class:"button-group"},h("button",{key:"31c378287314c164517274f0ab2905b127ca3049",onClick:()=>this.left(),"aria-label":"Align selected fields vertically about their left edge.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"97dbc0e12710ca5dea47d8da193ab238ee5ae9dd",name:"field-alignment-left"})),h("button",{key:"fa22bb526248b17a3bd47a482ba1309fb4874d87",onClick:()=>this.center(),"aria-label":"Align selected fields vertically about their centre.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"be176582cc48aaf636e7590224fcddf8a39bb7ef",name:"field-alignment-centre"})),h("button",{key:"9b7ac33e30f711b2aa806cfc87ae1e85fe3158f8",onClick:()=>{this.right()},"aria-label":"Align selected fields vertically about their right edge.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"81953cc88fadc80c0df9a53d367edf4240ba1225",name:"field-alignment-right"}))),h("div",{key:"88274bcb8a4f0df2de472e006470f47741448cfe",class:"button-group"},h("button",{key:"bb784cb991e0fb26f6610c3fde6cf3b4630dc468",onClick:()=>this.top(),"aria-label":"Align selected fields by their top.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"69e5a9a07882a5038e56f574cbe4f5a844ff2400",name:"field-alignment-top"})),h("button",{key:"bb5b5d922ec9b21a17e133ecfb60267636bfa0a1",onClick:()=>this.middle(),"aria-label":"Align selected fields by their middles.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"0b4c455c31330de80905f8522baf9e7db621fd0f",name:"field-alignment-middle"})),h("button",{key:"e951fd98037f208e3ceb4da04a406e50332fd634",onClick:()=>this.bottom(),"aria-label":"Align selected fields by their bottoms.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Shift + Select multiple fields to access this control","data-tooltip-place":"top"},h("ls-icon",{key:"3faf90ae35dc58ff59d899c74b3d2e8f24755dd5",name:"field-alignment-bottom"}))))),h("slot",{key:"427224b21fa432083716c6cee3d7d0483ddbd0f4"}))}};LsFieldAlignment.style=lsFieldAlignmentCss;const lsFieldContentCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldContent=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}dataItem;showValidationTypes=true;mutate;update;alter(e){this.dataItem={...this.dataItem,...e};this.debounce(this.dataItem,500)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=[{action:"update",data:e}];this.mutate.emit(t);this.update.emit(t)}),t)}supportsValue(){const e=["signature","intials","image","file","signing","date","autosign","regex"];return!e.includes(this.dataItem?.elementType)}render(){return h(Host,{key:"20ce159dc4152f65e0b0210eccb2eab973af8241"},h("ls-props-section",{key:"c9d8025b354e166b16699ac10a7699d6a3780c03",sectionTitle:"Field Type",sectionDescription:"The Field you currently have selected"},h("ls-field-type-display",{key:"ff03c5571b4b19a22059d34eeea633568635bb9f",fieldType:this.dataItem?.elementType,assignee:this.dataItem?.signer})),h("ls-props-section",{key:"1dc8dd9b52e20ca794b8a326250ddf81b6bf9355",sectionTitle:"Required Field",row:true},h("ls-toggle",{key:"1406c81a96e437b9f4757f6bd1654f7508387b61",id:"toggle-required",checked:!this.dataItem?.optional,onValueChange:e=>this.alter({optional:!e.detail})})),h("ls-props-section",{key:"e247625d206cf48ce9903f213bc3568d333e7b98",sectionTitle:"Field Label",sectionDescription:"Add a label to clarify the information required from the Recipient."},h("input",{key:"8e94c624afc3af83fc448aed69af434cb9c43e35",value:this.dataItem?.label,placeholder:"eg. Sign Here",onInput:e=>this.alter({label:e.target.value})})),this.supportsValue()&&h("ls-props-section",{key:"b729f4eea9b1a6097f7efbb62178d8684c4fbca4",sectionTitle:"Value",sectionDescription:"A prefilled value that can be altered by the signer."},h("input",{key:"ac48703e8da2d666c6804ba050483255432bdb7c",value:this.dataItem?.value,placeholder:"e.g. Gordon Smith",onInput:e=>this.alter({value:e.target.value})})),this.dataItem.validation===20&&h("ls-props-section",{key:"9226d7ebef28ee13f365eb8d6e756a783550898e",sectionTitle:"Options",sectionDescription:"Define the options available in the dropdown. One option per line."},h("textarea",{key:"0238600016c642bc0b9e3a44c083086bab56c063",value:this.dataItem?.options,placeholder:"Option 1\nOption 2\nOption 3",onInput:e=>this.alter({options:e.target.value})})),this.showValidationTypes&&h("ls-props-section",{key:"4651e3e667c092921f227badbb4286ff1b3c54ef",sectionTitle:"Content Format",sectionDescription:"Select the specific format you want the Recipient to enter."},h("ls-input-wrapper",{key:"b66ae98ebd1a27180c6099346fad20aafe677e5e",select:true},h("select",{key:"fec14e36d47672718cf656542c2447abd9358967",onChange:e=>this.alter({validation:parseInt(e.target.value)})},validationTypes.filter((e=>e.formType===this.dataItem?.elementType)).map((e=>h("option",{selected:this.dataItem?.validation===e.id,value:e.id},e.description)))))),h("slot",{key:"8b96944ac071c6b4041d3389cefe8e4712c984fb"}))}};LsFieldContent.style=lsFieldContentCss;const lsFieldDimensionsCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldDimensions=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}alter(e){console.log(e);if(this.isMultiple(this.dataItem)){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}else{const t={action:"update",data:{...this.dataItem,...e}};this.dataItem=t.data;this.mutate.emit([t]);this.update.emit([t])}}render(){return h(Host,{key:"53678e7fc68e795616c51e7cb7325a5cd45761de"},this.isMultiple(this.dataItem)&&h("div",{key:"f5a073c2039858e3b69162a1d1e599ae559dc2d6",class:"ls-field-properties-section"},h("div",{key:"f707c71fc9623bf6fc290ab3bb14451ba98e5454",class:"ls-field-properties-section-text"},h("p",{key:"c000b0fb97cb50712463b4973b8d395df30f0704",class:"ls-field-properties-section-title"},"Height and Width"),h("p",{key:"4443d09dd3358da331437d83db4080e7b7a6407b",class:"ls-field-properties-section-description"},"Define the height and width of one or multiple fields")),h("div",{key:"efa8b8ec8030846f073c147879dfab93ba135a02",class:"input-row"},h("div",{key:"c6e3345f3fc87d539ac35a85c0b8c47042795b59",class:"input-wrapper"},h("ls-icon",{key:"9033883167f51a83f41039dc9da682de3954cd17",id:"selectLeadingIcon",name:"field-match-width"}),h("input",{key:"a18a60327e5766e2c109af6dd95f080a5d0aa3b9",class:"has-leading-icon",aria:"field-width",id:"field-width",onChange:e=>this.alter({width:e.target.value})})),h("div",{key:"7d3464a547cdf5938311a5f9ffc2995be604035e",class:"input-wrapper"},h("ls-icon",{key:"0e413fc72b08cf785b33c56041fe0c638b86bc70",id:"selectLeadingIcon",name:"field-match-height"}),h("input",{key:"bb8a36bfe49680bbe7183d8cc524d1be95f6d87c",class:"has-leading-icon",aria:"field-height",id:"field-height",onChange:e=>this.alter({height:e.target.value})})))),this.isSingle(this.dataItem)&&h("div",{key:"5f73b3b84f25b2072374fc6ca27d0b59dfc3314e",class:"field-set"},h("div",{key:"ee6d5b21c0957acee288252e35165868cc0db0ba",class:"ls-field-properties-section"},h("div",{key:"5edddb346091bb34859f258630ea959492c64ac4",class:"ls-field-properties-section-text"},h("p",{key:"3a90f8a2e72a099fe297dfbcc0b269bd61268ad6",class:"ls-field-properties-section-title"},"Height and Width"),h("p",{key:"0c336dc47d35dd3a629b766e87046463e19a9522",class:"ls-field-properties-section-description"},"Define the height and width of one or multiple fields")),h("div",{key:"494929a5bbb6eae61c2d82aa1e3442ca2c1dabb1",class:"input-row"},h("div",{key:"ce3002cfcf8344556895ed9d237e8dfb359a27a4",class:"input-wrapper"},h("ls-icon",{key:"dca359e82e3733fec34ee138006ef8d63cd7025c",id:"selectLeadingIcon",name:"field-match-width"}),h("input",{key:"421cd8faa380b84cb57d0dc0e76d92a3abd38162",type:"number",class:"has-leading-icon",aria:"field-width",id:"field-width",value:this.dataItem?.width,onChange:e=>this.alter({width:e.target.value})})),h("div",{key:"90b66ca4284e84ddb8b22de8d144ae24e757c74c",class:"input-wrapper"},h("ls-icon",{key:"438f4022c0b55db6f6131bcf57c957fd644f4661",id:"selectLeadingIcon",name:"field-match-height"}),h("input",{key:"d936659987860f79cba8e5ada8f28a437eaba4f5",type:"number",class:"has-leading-icon",aria:"field-height",id:"field-height",value:this.dataItem?.height,onChange:e=>this.alter({height:e.target.value})})))),h("div",{key:"6b1bafdcf631c2ec00acc7afe7fdfe03b0b6600e",class:"ls-field-properties-section"},h("div",{key:"70731c167c84621672059ab5a8ab28c266029525",class:"ls-field-properties-section-text"},h("p",{key:"81fbb63a29e0f432765f00beedc4683d3f464a03",class:"ls-field-properties-section-title"},"Scale and Resize"),h("p",{key:"1ba477c5b9076364870cdd5f6106a4d40f74189f",class:"ls-field-properties-section-description"},"Multi-select fields and match their dimensions")),h("div",{key:"62ba3006a435142653751e81b153b833dafa9801",class:"button-group"},h("button",{key:"9dec26a9e8ed19d2c21ea273afd2e655a0e1b6cc",disabled:true},h("ls-icon",{key:"04777dc3bfdc0b81bce904d4f56108749e0c47c8",name:"field-scale"})),h("button",{key:"709baed52decc30ffebd96b14b02a54466ac7824",disabled:true},h("ls-icon",{key:"cf6b733cb6fcda50b39faf12b208cc1d5fa4a8b0",name:"field-match-width"})),h("button",{key:"6ef87f9641f2cc45a679afc73eb49920abdc7822",disabled:true},h("ls-icon",{key:"28ee6b1d779df43ad15f4041271ec85ac9e95903",name:"field-match-height"}))))))}};LsFieldDimensions.style=lsFieldDimensionsCss;const lsFieldDistributeCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-toolbar-numeric{width:45px;max-height:18px;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldDistribute=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;get component(){return getElement(this)}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}distributeHorizontal(){var e=this.component.shadowRoot.getElementById("ls-fix-horizontal-space");var t=0;const r=this.dataItem.sort(((e,t)=>e.left-t.left));if(e.value!==""){t=parseInt(e.value)}else{var i=0;for(var o=1;o<r.length;o++){const e=r[o-1];const t=r[o];i=i+(t.left-e.left-e.width<=0?0:t.left-e.left-e.width)}t=Math.floor(i/r.length)}var n=r[0].left;const s=r.map((e=>{const r=n;n=n+e.width+t;return{action:"update",data:{...e,left:r}}}));this.dataItem=s.map((e=>e.data));this.mutate.emit(s);this.update.emit(s)}gapVertical(e){const t=this.dataItem.sort(((e,t)=>e.top-t.top));var r=t[0].top;const i=t.map((t=>{const i=r;r=r+t.height+e;const o={...t,top:i};return{action:"update",data:oob(o)?{...t,left:t.pageDimensions.height-t.height-1}:o}}));this.dataItem=i.map((e=>e.data));this.mutate.emit(i);this.update.emit(i)}gapHorizontal(e){const t=this.dataItem.sort(((e,t)=>e.top-t.top));var r=t[0].left;const i=t.map((t=>{const i=r;r=r+t.width+e;const o={...t,left:i};console.log(o,oob(o));return{action:"update",data:oob(o)?{...t,left:t.pageDimensions.width-t.width-1}:o}}));this.dataItem=i.map((e=>e.data));this.mutate.emit(i);this.update.emit(i)}distributeVertical(){var e=this.component.shadowRoot.getElementById("ls-fix-vertical-space");var t=0;const r=this.dataItem.sort(((e,t)=>e.top-t.top));if(e.value!=="")t=parseInt(e.value);else{var i=0;for(var o=1;o<r.length;o++){const e=r[o-1];const t=r[o];i=i+(t.top-e.top-e.height<=0?0:t.top-e.top-e.height)}t=Math.floor(i/r.length)}var n=r[0].top;const s=r.map((e=>{const r=n;n=n+e.height+t;const i={...e,top:r};return{action:"update",data:oob(i)?{...e,top:e.pageDimensions.height-e.height}:i}}));this.dataItem=s.map((e=>e.data));this.mutate.emit(s);this.update.emit(s)}render(){return h(Host,{key:"6b56e29ef6606020392f6345eeab99a79201ca39"},h("div",{key:"dd54237204e0a3cb3e5e7106fa3c217f1bd4783c",class:"ls-field-properties-section"},h("div",{key:"4211d0435d809c161875ec80ed36c8c3fe6e2d09",class:"ls-field-properties-section-text"},h("p",{key:"9f6bf5f1c684a17fb20fb5e8b44e2fd193e1c428",class:"ls-field-properties-section-title"},"Distribution"),h("p",{key:"7b8da49375a5bc764b3f910a8e625569911aa7b7",class:"ls-field-properties-section-description"},"Multi-select fields and evenly space them out")),h("div",{key:"618ac328f320cd4299289fa072d62640964e6b5f",class:"button-group"},h("button",{key:"ae5e15c9947486772f978e028b71d1f0901cb4ef",onClick:()=>{this.distributeVertical()},"aria-label":"Distribute selected fields vertically.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Distribute selected fields vertically.","data-tooltip-place":"top"},h("ls-icon",{key:"30452ccd64d0e2a3d0ebcf7125a37abfa2996610",name:"field-distribute-vertically"})),h("button",{key:"ced0890fec909ecd9d6c42426eeb5f291303b6b9",onClick:()=>{this.distributeHorizontal()},"aria-label":"Distribute selected fields horizontally.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Distribute selected fields horizontally.","data-tooltip-place":"top"},h("ls-icon",{key:"8c4925974e0f22a0222f0e403a913a03bef27475",name:"field-distribute-horizontally"})))),h("div",{key:"6080eed10a0a7f7b8bc1566936df072ad67c5437",class:"ls-field-properties-section"},h("div",{key:"261f4b45dec8cc55bebe5aa9e58524f4077a756a",class:"ls-field-properties-section-text"},h("p",{key:"9702708febe79b8f20179dd90fb1b4d839876862",class:"ls-field-properties-section-title"},"Gap"),h("p",{key:"226c8c2508c1540aa20ac806522c57e6c374dc98",class:"ls-field-properties-section-description"},"Define the exact gap between multi-select fields.")),h("div",{key:"857724c65a60b251df274c41ef3167cb9ce39fa9",class:"input-row"},h("div",{key:"e90426b59b908488a8d456fa2cd43984e0da5253",class:"input-wrapper"},h("ls-icon",{key:"1977d4be8956afc9de41ead5b6957e4fe3669c4f",id:"selectLeadingIcon",name:"field-distribute-vertically"}),h("input",{key:"2e61592539c3453cf345a2798f75e979ed17fa75",type:"number",class:"has-leading-icon",id:"ls-fix-vertical-space",onChange:e=>{this.gapVertical(parseInt(e.target.value))},value:"",size:4,min:0,max:9999})),h("div",{key:"9384373f0bb26414c1375f8786624c7aff12ed36",class:"input-wrapper"},h("ls-icon",{key:"31e062fb69c324d2571df1d62e2ba3549245acc4",id:"selectLeadingIcon",name:"field-distribute-horizontally"}),h("input",{key:"20352f4de63216cc737f7cf469493381282bef32",type:"number",class:"has-leading-icon",id:"ls-fix-horizontal-space",onChange:e=>{this.gapHorizontal(parseInt(e.target.value))},value:"",size:4,min:0,max:9999})))),h("slot",{key:"33b53eb78125407c869e7ae32eba9a23ac77001b"}))}};LsFieldDistribute.style=lsFieldDistributeCss;const lsFieldFooterCss=":host{display:block}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}";const LsFieldFooter=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update");this.selectFields=createEvent(this,"selectFields")}dataItem;mutate;update;selectFields;deleteField=()=>{this.update.emit([{action:"delete",data:this.dataItem}]);this.mutate.emit([{action:"delete",data:this.dataItem}])};duplicateField=()=>{const e={...this.dataItem,id:btoa("ele"+crypto.randomUUID())};const t=this.dataItem.top+this.dataItem.height;if(t+this.dataItem.height<this.dataItem.pageDimensions.height){e.top=t}this.update.emit([{action:"create",data:e,select:"clear"}]);this.mutate.emit([{action:"create",data:e}])};render(){return h(Host,{key:"8cb31207e999dc865fb83cb472d77519cd957fdb"},h("div",{key:"cdb9ade290c3c1cbe613d5c2f04698d16cf2131e",class:"button-footer"},h("button",{key:"6f8db1780d9f860a7d3fa407355fde33cd48c11c",class:"secondary",onClick:()=>this.duplicateField()},h("ls-icon",{key:"7b01415cc8b7be376445c97e4d2b24788afb3e3a",name:"field-duplicate",size:"20"}),"Duplicate"),h("button",{key:"0447898646ae162dd58ca46befcd468b39af2a1a",class:"destructive",onClick:()=>this.deleteField()},h("ls-icon",{key:"65074ed995a57053602d665f036fd7280708860d",name:"trash",size:"20"}),"Delete")),h("slot",{key:"c786084652dfac87fad5ada66808496a3b1aa1dd"}))}};LsFieldFooter.style=lsFieldFooterCss;const lsFieldFormatCss=":host{display:flex;flex-direction:row}.ls-field-format-bar{display:flex;flex-direction:row;gap:0.5rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldFormat=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;get component(){return getElement(this)}selectFieldsHandler(){if(this.dataItem.length>0){var e=this.component.shadowRoot.getElementById("ls-toolbar-font-select");if(e)e.value=this.dataItem[0].fontName;var t=this.component.shadowRoot.getElementById("ls-toolbar-font-size");if(t)t.value=this.dataItem[0].fontSize.toString()}}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"db560de41ff6135ddfc7cd24bee0428393612506"},this.dataItem&&this.dataItem.length>1&&h("div",{key:"4ea46f8e884a76f7683707f02fd175bbb841a7c4",class:"ls-field-format-bar"},h("div",{key:"8004f0b99e69619878b40a4f6a25ccffb76f64cc",class:" input-wrapper"},h("ls-icon",{key:"8c2a1ecc4b2895217b1a5fbc06b765ee640f57f6",id:"selectLeadingIcon",name:"typeface"}),h("select",{key:"e9d63ce0c9bf0f807f8843a546615663f6fe0810",id:"ls-toolbar-font-select",onChange:e=>{this.alter({fontName:e.target.value})},class:"has-leading-icon"},h("option",{key:"57414b268d83f98ba372970a44b01e6564e3f204",value:"arial"},"Arial"),h("option",{key:"0ea33343c8b48361730103a0f57b451ce9e2b082",value:"liberation sans"},"Liberation Sans"),h("option",{key:"41594d03ec8bfb0d30374ab12f524ef083982ab0",value:"courier"},"Courier"),h("option",{key:"266d0e85da5f80b73fedbadb2c1d049bff226036",value:"helvetica"},"Helvetica"),h("option",{key:"75078832a92fb69d4e6dbe175f9fefb6ba7b36b8",value:"verdana"},"Verdana")),h("ls-icon",{key:"82e48e668a00ab951a5ab0a8cc8f4704a19d7a08",id:"selectorIcon",name:"selector"})),h("div",{key:"c017c1fb108b13f531efcf75264a4d7a4871d6e1",class:"input-wrapper"},h("ls-icon",{key:"84bd33a74b0332b795d921b481f805a57ef2cfef",id:"selectLeadingIcon",name:"typesize"}),h("input",{key:"f5e5ac7505bef63d6dc46ab6b6839bac1f8cd74b",id:"ls-toolbar-font-size",width:"30",size:4,class:"has-leading-icon"})),h("div",{key:"9e662def8efd6e8bace2f279ea4b5b15a2fe94ca",class:"button-group"},h("button",{key:"3d4ad30a8ec41eb4a1d525eeb53bc8f8757f0c69",onClick:()=>{this.alter({align:"left"})}},h("ls-icon",{key:"338e02bcf2b1ee58167fb54a1cf0c168a45ab80d",name:"menu-alt-2"})),h("button",{key:"594f8af91b7a82b3c67c5e86e0d41307beeb2e71",onClick:()=>{this.alter({align:"center"})}},h("ls-icon",{key:"00eb405987271237bf93ec03df7b37cc0d1bdd53",name:"menu-alt-5"})),h("button",{key:"a27269a2a51b8fe5bccc15f83628d68251006f70",onClick:()=>{this.alter({align:"right"})}},h("ls-icon",{key:"b4403cf793697fa578ba4948339959bced93a936",name:"menu-alt-3"})))),this.dataItem&&this.dataItem.length===1&&h("div",{key:"c71a0a7dbf4965db5083c2e31892c7d5376ee512",class:"ls-field-format-bar"},h("div",{key:"c182854d46457e7fce5806042bb81ad2a9e2a0cd",class:"input-wrapper"},h("ls-icon",{key:"c37ea1cf1fea476864a869aac0ac69147d33e5b6",id:"selectorIcon",name:"selector"}),h("ls-icon",{key:"499ef3629da6bb05dc85bfad4e22f778a1df00a6",id:"selectLeadingIcon",name:"typeface"}),h("select",{key:"fc9fbf6d744d2e255c252494a8666e461704cb63",id:"ls-toolbar-font-select",onChange:e=>{this.alter({fontName:e.target.value})},class:"has-leading-icon"},h("option",{key:"40bb53d54f3b5f62ec744ae52bea51d7d5e3ffd1",value:"arial"},"Arial"),h("option",{key:"0883cd66f56fd0ed76f48c36203cf4e50f5af980",value:"liberation sans"},"Liberation Sans"),h("option",{key:"72187239ec4a7c296b5ab277d0f19253fc1ac0b6",value:"courier"},"Courier"),h("option",{key:"cd43e5e9858a58ed2a4f1b99924c5746c75c438d",value:"helvetica"},"Helvetica"),h("option",{key:"3a20de6b6937525ae0ec6208888d3956d39bf598",value:"verdana"},"Verdana"))),h("div",{key:"85d7ee0da79d69fcb24495bff20d6683670f0240",class:"input-wrapper"},h("ls-icon",{key:"4c9ca20bf707f7a0a7dbebda0cdb7db36db0b289",id:"selectLeadingIcon",name:"typesize"}),h("input",{key:"2489d93094f314de173a1a466f0a4d13a0d34373",id:"ls-toolbar-font-size",width:"30",size:4,value:this.dataItem[0].fontSize,onChange:e=>{this.alter({fontSize:e.target.value})},class:"has-leading-icon"})),h("div",{key:"f8e5d4822460f11eca96b422a5e9d72191421afc",class:"button-group"},h("button",{key:"547af4eb1d1c0872dd1dbc3ca68eb92621476ae1",onClick:()=>{this.alter({align:"left"})}},h("ls-icon",{key:"8ba5aecb7fc976ef40aea370d00da31e333566c3",name:"menu-alt-2"})),h("button",{key:"c1bd4b5bf403e2b88a0a2169b4123aa9d143aa22",onClick:()=>{this.alter({align:"center"})}},h("ls-icon",{key:"598a82c0edc4997d22d9decae45286877c43f136",name:"menu-alt-5"})),h("button",{key:"9f39d1337f27b0d74ef557836d4bcd86eb508696",onClick:()=>{this.alter({align:"right"})}},h("ls-icon",{key:"c3518f2e0f2fa51592660a94a1fd49037422a8eb",name:"menu-alt-3"})))))}static get watchers(){return{dataItem:["selectFieldsHandler"]}}};LsFieldFormat.style=lsFieldFormatCss;const lsFieldPlacementCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPlacement=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}getValue(e){if(this.isMultiple(this.dataItem)){return""}else if(this.isSingle(this.dataItem)){return this.dataItem[e]}return""}alter(e){if(this.isMultiple(this.dataItem)){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}else{const t={action:"update",data:{...this.dataItem,...e}};this.dataItem=t.data;this.mutate.emit([t]);this.update.emit([t])}}center(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].width/2-this.dataItem[0].width/2}right(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].width-this.dataItem[0].width}middle(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].height/2-this.dataItem[0].height/2}bottom(){return this.dataItem[0].pageDimensions[this.dataItem[0].page].height-this.dataItem[0].height}render(){return h(Host,{key:"c9dc68e4e38efb9c800c3162750fda48a679f24d"},this.isMultiple(this.dataItem)&&h("div",{key:"b8000d7a209d1b48483c567b9476d264df95cfb8",class:"ls-field-properties-section"},h("div",{key:"63b627e957a7cc4e498f4d647d7f097ab46447d0",class:"ls-field-properties-section-text"},h("p",{key:"b2b4d8cabf3b4136bfd8f24a971e37915f831130",class:"ls-field-properties-section-title"},"Location"),h("p",{key:"39036ea300acacb68af52a8a7f3c74bfab636ca9",class:"ls-field-properties-section-description"},"Use coordinates to move your fields on the page")),h("div",{key:"406a42a6eba6512b4a0aab8af66c7f6c3dba7389",class:"input-row"},h("div",{key:"3c1f0599222c5105f345202a453dbe47459e3d08",class:"input-wrapper"},h("ls-icon",{key:"1b72436b61075143fcf71aa25c560dda48729b93",id:"selectLeadingIcon",name:"x-letter"}),h("input",{key:"dbc911eb99b0fb11f618b853610ea61501f248e4",type:"number",class:"has-leading-icon",aria:"top-location",id:"top-location",onChange:e=>this.alter({left:e.target.value})})),h("div",{key:"6f805235eedb1ed975a1dd124ed306785cfbc738",class:"input-wrapper"},h("ls-icon",{key:"a09edcec36df6f3541bb99744c1c03b9ac25809d",id:"selectLeadingIcon",name:"y"}),h("input",{key:"aafc5b2376c78ac269f3bcbec76f654132a1ed31",type:"number",class:"has-leading-icon",aria:"left-location",id:"left-location",onChange:e=>this.alter({top:e.target.value})})))),this.isSingle(this.dataItem)&&h("div",{key:"e6aefc1f92c9052740ef11a7b68cd437e6cacb62",class:"field-set"},h("div",{key:"998c00036ff931841dbee535816d70cc1c13f341",class:"ls-field-properties-section"},h("div",{key:"859c5e6195da6aae05f212325cc887a9e6d98b5a",class:"ls-field-properties-section-text"},h("p",{key:"fe1e0776b11bc989a025c598910ab3881876de5a",class:"ls-field-properties-section-title"},"Alignment"),h("p",{key:"43a1ae930fd8e07e99af9e03adc82d4032a33fd2",class:"ls-field-properties-section-description"},"Align your Fields relative to the page or multi-select and align then to each other.")),h("div",{key:"7a95a01f785eb50a9287457906a6889b7d6a3033",class:"multi-button-group-row"},h("div",{key:"504071b40528fd4399755a0af9b1a9ff4f279c5f",class:"button-group"},h("button",{key:"efd3e2aa445a03fce18474c28a07fa7b8687a0c7",onClick:()=>{this.alter({left:0})}},h("ls-icon",{key:"e11ff3e4dbe3d6677e117e9b683ee9840f870c26",name:"field-alignment-left"})),h("button",{key:"258b9fb3c78c835fd1e281df90e2984cfb08ef40",onClick:()=>{this.alter({left:this.center()})}},h("ls-icon",{key:"f22b23fd59c5c74baeb42bf60614a06cb4483178",name:"field-alignment-centre"})),h("button",{key:"0b80020e7d7d775c48634d5cb5754f3edce44008",onClick:()=>{this.alter({left:this.right()})}},h("ls-icon",{key:"d8ae12c4670eb1e6e1cf65cfa5c2a5e9f123c261",name:"field-alignment-right"}))),h("div",{key:"2519a99c8563e99c118a250da6747f2b6076de61",class:"button-group"},h("button",{key:"6d92cb364078ad0f33e3d22e8753d43d49c96663",onClick:()=>this.alter({top:0})},h("ls-icon",{key:"21468552b013129c3df35c09871ba9132fb91873",name:"field-alignment-top"})),h("button",{key:"f040000cfca80f27a5e0bb6169a2111c71a8f1d4",onClick:()=>{this.alter({top:this.middle()})}},h("ls-icon",{key:"b6c5d151dda019ea8d6d912a9fe2677646b7374b",name:"field-alignment-middle"})),h("button",{key:"a9246e1659fe5e4e0fdd0a03ed5772408bbc7c02",onClick:()=>{this.alter({top:this.bottom()})}},h("ls-icon",{key:"1f7933380d6fbfc524cdebc7f86fa1f74ebf1395",name:"field-alignment-bottom"}))))),h("div",{key:"8bf879e9ce04d81f0f5b6df99566a41be51ed470",class:"ls-field-properties-section"},h("div",{key:"a7fee5248dab7322aa5fef2ff2f1dcf91728ee33",class:"ls-field-properties-section-text"},h("p",{key:"b8eb47ce94ec9d00e776ac505686666c430aac61",class:"ls-field-properties-section-title"},"Location"),h("p",{key:"17f950776fa0207b9c66a6d6a911e67b1b66c86d",class:"ls-field-properties-section-description"},"Use coordinates to move your fields on the page")),h("div",{key:"da01c959b6265147ed9d90a050401f36228a283d",class:"input-row"},h("div",{key:"4dac7c60fdaa4493de9b42401dfacdb031c38a25",class:"input-wrapper"},h("ls-icon",{key:"11e8d9bacb897bb04f12b818448eeb039bbf7a47",id:"selectLeadingIcon",name:"x-letter"}),h("input",{key:"24b67407ed28079cf4f5d873c2c771b8f15d8a9c",type:"number",class:"has-leading-icon",aria:"top-location",id:"top-location",value:this.dataItem?.left,onChange:e=>this.alter({left:e.target.value})})),h("div",{key:"f80ae951bd8f5e8e219aa480a4a16ff55f46d8ab",class:"input-wrapper"},h("ls-icon",{key:"b86661a641e357a9b0867d65b4ccee62bea4e44e",id:"selectLeadingIcon",name:"y"}),h("input",{key:"d2357ca6884f20d72bfb3dbbaa1a14ed797f646b",type:"number",class:"has-leading-icon",aria:"left-location",id:"left-location",value:this.dataItem?.top,onChange:e=>this.alter({top:e.target.value}),width:"30"})))),h("div",{key:"5a10ba1fa5515601b24343d0b1bf54a97ca29bb3",class:"ls-field-properties-section"},h("div",{key:"4b23811405359d00533810851c817939258e7e25",class:"ls-field-properties-section-text"},h("p",{key:"328d03492253d0aa58e1155b02fc29efb057c9f8",class:"ls-field-properties-section-title"},"Distribution"),h("p",{key:"e2fecc82d431ee3756d502d45b143b900313ac15",class:"ls-field-properties-section-description"},"Multi-select fields and evenly space them out")),h("div",{key:"2c8ba1520ce6aad2c6d96c97b00c3f54e6820b51",class:"button-group"},h("button",{key:"69187c8725b6b545ae9cb724b1deaf74e8d9cc88",disabled:true},h("ls-icon",{key:"c3d9cdccfb4fb61acd39d941f4d8a4cec449f075",name:"field-distribute-vertically"})),h("button",{key:"72bdb68d15e0e10233dd763c1428cad730a744c7",disabled:true},h("ls-icon",{key:"1d07a51d8b73bf486f286bfc2d6adfa09038305d",name:"field-distribute-horizontally"})))),h("div",{key:"0776885c8c491e8717548a2e4287403a96488cc4",class:"ls-field-properties-section"},h("div",{key:"3ba1d1ea93a606de7b7a533326465e18487e5560",class:"ls-field-properties-section-text"},h("p",{key:"c31cba25f48fdcfe8883443ddecc82e7be4378f4",class:"ls-field-properties-section-title"},"Gap"),h("p",{key:"5f6998f21adb8803857a79e6da129022905a8c87",class:"ls-field-properties-section-description"},"Define the exact gap between multi-select fields.")),h("div",{key:"194a8a16e88493b7b4960fa7ab5ceba6e95b78d9",class:"input-row"},h("div",{key:"19862c6084d6fd681ce71bf0e5ba6c2141807d49",class:"input-wrapper"},h("ls-icon",{key:"fc168bd1174daddec9d761b1d8692b69d37cf331",id:"selectLeadingIconDisabled",name:"field-distribute-vertically"}),h("input",{key:"9ce4fe9e1ea759eb867adde5d5360dd3534ebbd0",type:"number",value:"0",class:"has-leading-icon",aria:"vertical-gap",id:"vertical-gap",disabled:true})),h("div",{key:"54eea8b43335fe796755f36f66ce6828479c137f",class:"input-wrapper"},h("ls-icon",{key:"9f94c55ced5a9d3fe43b472a7fcc9f9d7c830fad",id:"selectLeadingIconDisabled",name:"field-distribute-horizontally"}),h("input",{key:"eb65a84f010fc9f5abfa8fd5fd369cdad2b9670d",type:"number",value:"0",class:"has-leading-icon",aria:"horizontal-gap",id:"horizontal-gap",disabled:true}))))))}};LsFieldPlacement.style=lsFieldPlacementCss;const lsFieldPropertiesCss=":host{display:block;width:100%;padding:1rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldProperties=class{constructor(e){registerInstance(this,e)}dataItem;renderFields(){if(this.dataItem&&this.dataItem?.length===1){switch(this.dataItem[0].formElementType){case"signature":return h("ls-field-properties-signature",{dataItem:this.dataItem[0]});case"date":return h("ls-field-properties-date",{dataItem:this.dataItem[0]});case"autodate":return h("ls-field-properties-date",{dataItem:this.dataItem[0]});case"text":return h("ls-field-properties-text",{dataItem:this.dataItem[0]});case"number":return h("ls-field-properties-number",{dataItem:this.dataItem[0]});case"autosign":return h("ls-field-properties-autosign",{dataItem:this.dataItem[0]});case"email":return h("ls-field-properties-email",{dataItem:this.dataItem[0]});case"image":return h("ls-field-properties-image",{dataItem:this.dataItem[0]});case"file":return h("ls-field-properties-file",{dataItem:this.dataItem[0]});case"dropdown":return h("ls-field-properties-file",{dataItem:this.dataItem[0]});default:return h("ls-field-properties-general",{dataItem:this.dataItem[0]})}}else if(this.dataItem&&this.dataItem?.length>1)return h("ls-field-properties-multiple",{dataItem:this.dataItem})}handleKeyDown=e=>{e.stopPropagation()};handleKeyUp=e=>{e.stopPropagation()};render(){return h(Host,{key:"1e03ad4e124276ccfa66cea66dce135720ae6f53",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp},this.dataItem&&this.renderFields(),h("slot",{key:"af5b649c1263811b7e6ccd7780d102eab5cb57f8"}))}};LsFieldProperties.style=lsFieldPropertiesCss;const lsFieldPropertiesAdvancedCss=":host,.field-set{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.25rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesAdvanced=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;expanded=false;mutate;update;isSingle(e){return e.length===undefined}isMultiple(e){return typeof e.length==="number"}alter(e,t=0){console.log("Altering advanced props:",e);let r=[];if(this.isMultiple(this.dataItem)){this.dataItem=this.dataItem.map((t=>({...t,...e})));r=this.dataItem.map((t=>({action:"update",data:{...t,...e}})))}else if(this.isSingle(this.dataItem)){this.dataItem={...this.dataItem,...e};r=[{action:"update",data:{...this.dataItem,...e}}]}if(t===0){this.update.emit(r);this.mutate.emit(r)}else{this.debounce(r,t)}}titletimer;debounce(e,t){if(this.titletimer)clearTimeout(this.titletimer);this.titletimer=setTimeout((()=>{this.update.emit(e);this.mutate.emit(e)}),t)}getValue(e){if(this.isMultiple(this.dataItem)){return""}else if(this.isSingle(this.dataItem)){return this.dataItem[e]}return""}render(){return h(Host,{key:"b41038d099fa8bfead03ceb60f847a5ccd709ca7"},h("div",{key:"f445b43700361da1e2c24f48a4fe5e75d970496f",class:"expand-fields-row",onClick:()=>this.expanded=!this.expanded},h("ls-icon",{key:"e971c83d54da07adb10c054d18771571039afb57",name:this.expanded?"expand":"collapse",size:"20",solid:true}),h("p",{key:"9964a2e018d92ed41f3c2582496e3d6a3e3ef1ae"},"Advanced Properties")),this.expanded&&h("div",{key:"1082b8d65cd9a8d7b534057d950934c8220aaee7",class:"field-set"},h("ls-props-section",{key:"b87b473dd3b58d970fe99c31023183cda2c3c812",sectionTitle:"Field Order",sectionDescription:"Determines what order fields will be filled in by the user"},h("input",{key:"65a71d05074ba7f81efa37c501f3ec896b808ea7",value:this.getValue("fieldOrder"),type:"number",placeholder:"eg. 1",onInput:e=>{console.log(e);this.alter({fieldOrder:e.target.value},100)},onChange:()=>{console.log("onchange")}})),h("ls-props-section",{key:"7cb8a2f4b7f52654ab545973f47bb1817f029d42",sectionTitle:"Ref. Name"},h("input",{key:"c78bc57e27a15cca0ca3f5882cbb026c664b4367",value:this.getValue("link"),placeholder:"eg. checkbox group",onInput:e=>this.alter({link:e.target.value},300)})),h("ls-props-section",{key:"77ade8f9d070dc35cf4967b09e57d886b6330549",sectionTitle:"Link Type",sectionDescription:"Determines in what way this field is linked to other fields"},h("select",{key:"538ffba753725e206b29cbba37cc31798a8aed43",onChange:e=>this.alter({linkType:e.target.value}),name:"Link Field","aria-label":"Link Field"},h("option",{key:"4e91e476d038bd2c36cd32d7d2aefe81bba5c5be",value:"0",selected:this.getValue("linkType")==="0"},"None"),h("option",{key:"41960a580f6776a8d7b3cadf21c2fe94487389cf",value:"1",selected:this.getValue("linkType")==="1"},"One of a group (e.g. select one checkbox)"),h("option",{key:"23a0a2b5f6e081247e4d816aa3e506baa570d242",value:"2",selected:this.getValue("linkType")==="2"},"Add to a total"),h("option",{key:"f9e20adc34266415b8851ee63b774b7e6bf7d3b5",value:"3",selected:this.getValue("linkType")==="3"},"Make this conditional upon..."))),h("ls-props-section",{key:"d4656287b628b8c6cdfcc11e1edef07b328ca5ee",sectionTitle:"Link Value",sectionDescription:"Fields with the same Link Value will be linked together"},h("input",{key:"ec571add5025c9767d738f84d9033492279472d6",value:this.getValue("logicAction"),width:"30",placeholder:"eg. checkbox group",onChange:e=>this.alter({logicAction:e.target.value})}))))}};LsFieldPropertiesAdvanced.style=lsFieldPropertiesAdvancedCss;const lsFieldPropertiesAutosignCss=":host{display:block}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesAutosign=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"df46931c369890f5abf0d25bd9fa8a8ad85ad68c"},h("div",{key:"2f0d8d99305c136efd368327b8fd333435f068dd",class:"ls-field-properties-section"},"Self Sign Field"),h("div",{key:"bd70079d45b70bd3a2c18a148507757bee9f5973"},"Label: ",h("input",{key:"108a5cc6158af4cb6a37c8f5678039bb354ec591",value:this.dataItem?.label,width:"30"})),h("ls-field-dimensions",{key:"3952b6ca0af4d444243f3c1d821ff72b74ad0100",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"95df9502c26ca62a8ad46f946742c84555e9c40a",dataItem:this.dataItem}),h("ls-field-footer",{key:"8394977015e41a56d4896d6810e96c4df13c2ae2",dataItem:this.dataItem}),h("slot",{key:"c6974754a07f99372795a71d9ec370bcbd345a08"}))}};LsFieldPropertiesAutosign.style=lsFieldPropertiesAutosignCss;const lsFieldPropertiesContainerCss="*{margin:0;box-sizing:border-box}:host{display:flex;flex-direction:column;gap:1rem;width:100%;height:calc(100% - 7.25rem);position:relative}.tabs-container{display:grid;width:100%;gap:0.125rem;padding:0.125rem;border:1px solid var(--gray-30, #e0e2e5);border-radius:0.75rem;background:var(--white, #ffffff)}.ls-tab{all:unset;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0.5rem;border-radius:0.625rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;color:var(--gray-80, #6c6e73);text-transform:capitalize}.ls-tab.active{background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.ls-tab:not(.active):hover{background:var(--gray-10, #f7f8fa)}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}.scrolling-container{overflow-y:auto;padding:0 1rem;margin:0 -1rem;height:100%}";const LsFieldPropertiesContainer=class{constructor(e){registerInstance(this,e)}dataItem;tabs=[];selectedTab;componentWillLoad(){if(!this.selectedTab){this.selectedTab=this.tabs[0]||""}}render(){return h(Host,{key:"0603644fbc51f89389ddc25dd5b1371730feaeef"},this.tabs.length>1&&h("div",{key:"602100153a470e329145e69bd38d200cc62daa7b",class:"tabs-container",style:{gridTemplateColumns:`repeat(${this.tabs.length}, 1fr)`}},this.tabs.map((e=>h("button",{class:e===this.selectedTab?"ls-tab active":"ls-tab",onClick:()=>this.selectedTab=e},e)))),h("div",{key:"2e63a3beabdcbaa4e7b15651ecdd0c583229d44f",class:"scrolling-container"},h("slot",{key:"4e891478873ea12a5c91e7ba4e45cbfc1398f149",name:this.selectedTab})))}};LsFieldPropertiesContainer.style=lsFieldPropertiesContainerCss;const lsFieldPropertiesDateCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesDate=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"36e129289aa11e64e2bd75fd1309439b3a520457"},h("ls-field-properties-container",{key:"809c2b386857b610fd9e871e6579eb84e7d9feeb",tabs:["content","placement","dimensions"]},h("div",{key:"ac2c345789f21e600ecbd4f55d2b55801a8e5a80",class:"field-set",slot:"content"},h("ls-field-content",{key:"2a1aa657a4f802f4ad34baac2031b71330f2ab82",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"6032597ec4c0a36c12b044acc27da1373ede3348",dataItem:this.dataItem})),h("div",{key:"2becaa0335ce5a94dddc5f7c8dde19821801c520",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"5af127cb268acdd44e08845339fb33b8656aca96",dataItem:this.dataItem})),h("div",{key:"b35e78ff494db8e0688b7ce1c1a75f21ed176e13",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"067d2bdf244f537716d6916663357636bd551e00",dataItem:this.dataItem}))),h("ls-field-footer",{key:"53cbced3ec835b84dcd23c91ceef8345f6a040de",dataItem:this.dataItem}))}};LsFieldPropertiesDate.style=lsFieldPropertiesDateCss;const lsFieldPropertiesEmailCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesEmail=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"557c90379fcb802368e3cc9900aa1b5d795e89bb"},h("ls-field-properties-container",{key:"9406fe9d01158e2cc360a97f597c633114654d1d",tabs:["content","placement","dimensions"]},h("div",{key:"85399d641c1f731c77d67f1a83a0c9d8772e7baf",class:"field-set",slot:"content"},h("ls-field-content",{key:"3e24119b85e872c3b706e6e99c107035a4cb6353",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"7d17afd248948968abe6358d1f96798f9ecd5f3c",dataItem:this.dataItem})),h("div",{key:"bef58eca745bacad8969861db73655986135d952",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"075fd44bd77e2c3e5d380167530dc87b6b94cf8e",dataItem:this.dataItem})),h("div",{key:"421e4db23ff914c7d6b861dae38d92d115472a0c",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"7a281a15446c697d5a4da832ef09b970faf806a7",dataItem:this.dataItem}))),h("ls-field-footer",{key:"6a9a2c13c5692e15ae816c655f0a2e40f88445b8",dataItem:this.dataItem}))}};LsFieldPropertiesEmail.style=lsFieldPropertiesEmailCss;const lsFieldPropertiesFileCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesFile=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"bee6d5d0d1f6520b1784585b0ea4517faabdda70"},h("ls-field-properties-container",{key:"a37773f2fc761aac6ad779a83f833d7b268949c4",tabs:["content","placement","dimensions"]},h("div",{key:"68bc9c76ab775a782330f02da0534b4b76f842f5",class:"field-set",slot:"content"},h("ls-field-content",{key:"223ce26cb3a8afcbe12d356a346f682a07c4cbae",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"829a97eb8b576280cf9a8ce2d8497c51e293244b",dataItem:this.dataItem})),h("div",{key:"2ec54dd64c0303fd63cdeb9f9eb4263ac39e8fbe",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"111fd6c0372890cbce36e2dc22a991c8decc95d0",dataItem:this.dataItem})),h("div",{key:"425689aebfda1c89de75fe9471db3937053a2a1b",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"7bedf59453fb4083dfa2e1b1976fb139600d1325",dataItem:this.dataItem}))),h("ls-field-footer",{key:"bf6a97a46730aa15abd404a5b11737ece8acbfab",dataItem:this.dataItem}))}};LsFieldPropertiesFile.style=lsFieldPropertiesFileCss;const lsFieldPropertiesGeneralCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesGeneral=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"bae2503fd50b94ad99bfbb24f2abe5e6d5629e2e"},h("ls-field-properties-container",{key:"deceb2d1e04ab59a142a46cb9a14a8c38c82b093",tabs:["content","placement","dimensions"]},h("div",{key:"4a7e524042efba3b2f03fc82598660dd78e3613e",class:"field-set",slot:"content"},h("ls-field-content",{key:"820a9ed90d55c4138441442c08ee94c70ccd1d0c",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"c999ac86bed0fb6e220c48b7848e3ef7b4101d94",dataItem:this.dataItem})),h("div",{key:"1123d84abf45da1002b62f0d44227cb8361be661",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"4c4c2ccd243e44c36f5f9c4862a12c10e188c630",dataItem:this.dataItem})),h("div",{key:"f4b01c607e46eaf9895aa6949d3fc7071c3da3ac",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"9f7628923c352061af77363ff4fff8391b955abf",dataItem:this.dataItem}))),h("ls-field-footer",{key:"ae2d65be67e5fc3c13dbffec1e7c1a63c902c394",dataItem:this.dataItem}))}};LsFieldPropertiesGeneral.style=lsFieldPropertiesGeneralCss;const lsFieldPropertiesImageCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesImage=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"ddf83beff21acc56fc0bcdea811f8c93294bace3"},h("ls-field-properties-container",{key:"3249c39e164149e3d3c393ed40225bb06af75ab7",tabs:["content","placement","dimensions"]},h("div",{key:"6aee8f7c5a58d52c53ea0a905b99436c286cbd67",class:"field-set",slot:"content"},h("ls-field-content",{key:"b6265eb5dfb39f3283ffc2045b8460f95093771e",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"aec88fe3ca2d5fffaeb949a155d2f4dd56ba54b8",dataItem:this.dataItem})),h("div",{key:"57acc8a5f78004601c787655fe5f7ee9374f46e8",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"c75abe20033bfa8fa3526312b84bca714472df02",dataItem:this.dataItem})),h("div",{key:"ace7da4cdf9f231fbbb42ca5ada0150f073049f7",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"5fc562a92d7948974eca672bd98a891b93ec299e",dataItem:this.dataItem}))),h("ls-field-footer",{key:"537e4d7fb85548e3d366af7fe7ae4eed044bb032",dataItem:this.dataItem}))}};LsFieldPropertiesImage.style=lsFieldPropertiesImageCss;const defaultFieldIcons={signature:"signature","auto sign":"auto-sign",text:"text","signing date":"auto-date",date:"calender",initials:"initials",checkbox:"check",email:"at-symbol",number:"hashtag",image:"photograph",dropdown:"document-text",file:"upload","drawn field":"pencil","regular expression":"code"};function getFieldIcon(e){return defaultFieldIcons[e]||"view-grid"}const lsFieldPropertiesMultipleCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.properties-container{display:flex;flex-direction:column;height:100%}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-field-type-wrapper{position:relative;border-radius:0.875rem;padding:0.25rem}.ls-field-type-inner{border-radius:0.625rem;background:var(--white, #fff);display:flex;padding:0.25rem 0.5rem 0.25rem 0.25rem;align-items:center;gap:0.875rem;align-self:stretch}.ls-field-type-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.5rem;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-field-type-name{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1.5rem;text-transform:capitalize}.tabs-container{display:grid;grid-template-columns:repeat(3, 1fr);width:100%;gap:0.125rem;padding:0.125rem;border:1px solid var(--gray-30, #e0e2e5);border-radius:0.75rem;background:var(--white, #ffffff)}.ls-tab{all:unset;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0.5rem;border-radius:0.625rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;color:var(--gray-80, #6c6e73)}.ls-tab.active{background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.ls-tab:not(.active):hover{background:var(--gray-10, #f7f8fa)}.button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #f0f1f2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}.scrolling-container{overflow-y:auto;padding:0 1rem;margin:0 -1rem;height:calc(100% - 10.938rem)}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.input-wrapper{position:relative}.full-width{width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesMultiple=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){this.dataItem=this.dataItem.map((t=>({...t,...e})));this.debounce(e,500)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.mutate.emit(t);this.update.emit(t)}),t)}allSignersSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,signer:undefined};const e=this.dataItem[0].signer;const t=this.dataItem.every((t=>t.signer===e));return{isSame:t,signer:t?e:13}};allLabelsSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,label:undefined};const e=this.dataItem[0].label;const t=this.dataItem.every((t=>t.label===e));return{isSame:t,label:t?e:undefined}};allElementsSame=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,elementType:"mixed"};const e=this.dataItem[0].elementType;const t=this.dataItem.every((t=>t.elementType===e));return{isSame:t,elementType:t?e:"mixed"}};allFieldsOptional=()=>{if(!this.dataItem||this.dataItem.length===0)return{isSame:true,optional:false};const e=this.dataItem[0].optional;const t=this.dataItem.every((t=>t.optional===e));return{isSame:t,optional:t?e:false}};render(){return h(Host,{key:"f476c81a545cfa5d49517c70cfe8f12ecbf22cd7"},h("ls-field-properties-container",{key:"1a8fdf264a6d8e7eb234f64ff2903b87746c91e2",tabs:["content","placement","dimensions"]},h("div",{key:"415c57349a6ad5305b558483b65d1e3e80c4cfc1",class:"field-set",slot:"content"},h("div",{key:"3a29f3fbb697f06743f796d4e73d52af64926b40",class:"ls-field-properties-section"},h("div",{key:"cb368cfd54d6dc7a391f3c8583f7c97ac2d03639",class:"ls-field-properties-section-text"},h("p",{key:"c244f2e88969792b29a8107c75fd4ec092639185",class:"ls-field-properties-section-title"},"Field Type"),h("p",{key:"af171d75c8f0e2e568c4ab01535d49eac53630f3",class:"ls-field-properties-section-description"},"The Fields you currently have selected")),h("div",{key:"3afaaa697c6e4b381854bc10eb177b7d3b47d6c1",class:"ls-field-type-wrapper",style:{border:`1px dashed ${defaultRolePalette[this.allSignersSame().signer%100].s30}`,background:defaultRolePalette[this.allSignersSame().signer%100].s10}},h("div",{key:"d468dc7f2d3e3c626348a137fa43aba2c965cba6",class:"ls-field-type-inner"},h("div",{key:"2047648d2b18974e2ed65b94ffbf6aa397e84177",class:"ls-field-type-icon",style:{border:`1px solid ${defaultRolePalette[this.allSignersSame().signer%100].s60}`,color:defaultRolePalette[this.allSignersSame().signer%100].s60,background:defaultRolePalette[this.allSignersSame().signer%100].s10}},h("ls-icon",{key:"a3d57f28b6cd6cf372da48f53892e681a9a819cc",name:getFieldIcon(this.allElementsSame().elementType),size:"20"})),h("p",{key:"594dc697a1f908fd41e202588a7cf799e6ba201e",class:"ls-field-type-name"},this.dataItem.length," ",this.allElementsSame().elementType," ","Fields")))),h("div",{key:"c4c9baafa20cf8a7aea384ced5f41d04ec6dce17",class:"ls-field-properties-section row"},h("div",{key:"6c4e47a9e34898860fdabdf0bd7849a1de49c797",class:"ls-field-properties-section-text"},h("p",{key:"b07c560ea096a8966074c1b55b97cca62c96f404",class:"ls-field-properties-section-title"},"Required Field")),h("ls-toggle",{key:"506d4aba1e3cee00dc291a4a3e6a90328f366526",onValueChange:e=>this.alter({optional:!e.detail}),checked:!this.allFieldsOptional().optional,indeterminate:this.allFieldsOptional().isSame===false})),h("div",{key:"9a872405a537b1bdbbd69cd24344393141bb6759",class:"ls-field-properties-section"},h("div",{key:"f61b198abd3a21adaf3984ce1e0f1e234176f600",class:"ls-field-properties-section-text"},h("p",{key:"751dbeb8d45c04b182e83327c9514840c9e8f370",class:"ls-field-properties-section-title"},"Field Label"),h("p",{key:"3b87f243c3a86c1c52d8604ec3bd9411e11309ea",class:"ls-field-properties-section-description"},"Add a label to clarify the information required from the Recipient.")),h("input",{key:"faaa4bb9f9ea893eca15a4034cd582afd49a2965",value:this.allLabelsSame().label,onInput:e=>this.alter({label:e.target.value}),width:"30",placeholder:"eg. Sign Here"}))),h("div",{key:"456511585e43608a89e7d5331eb027ab71d08e98",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"0aaafaf40ce37451f6f9ea459ccd9e07e7bedc9f",dataItem:this.dataItem}),h("ls-field-size",{key:"b1aa99293901f0ade2647688bb0ea3cb7c681850",dataItem:this.dataItem})),h("div",{key:"e2901a24e8a7994169e4d146a7c3c55040802398",class:"field-set",slot:"placement"},h("ls-field-alignment",{key:"0e26ff3cdde4a50f3d6d1d326d76219bf5bdc93b",dataItem:this.dataItem}),h("ls-field-placement",{key:"f20e953cec0564b6b013d4e560f2532b29c50952",dataItem:this.dataItem}),h("ls-field-distribute",{key:"8eb4e16583a4bd3b550178f83038067a3a8412e5",dataItem:this.dataItem}))),h("ls-field-footer",{key:"b5b1b4bfaef25effda90fb0a6b9ee00e9d950d8c"}),h("slot",{key:"57f76abbe5d2e9592d88c53f66d20b074d251ac6"}))}};LsFieldPropertiesMultiple.style=lsFieldPropertiesMultipleCss;const lsFieldPropertiesNumberCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesNumber=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"68ff2165b13ccc43d6a685a7d6d42396f06b925a"},h("ls-field-properties-container",{key:"f16402f8dd1ee0e98a346b1347c938baab354846",tabs:["content","placement","dimensions"]},h("div",{key:"2b715391b5d40c3f040ff171ae2da91b4f8cffa1",class:"field-set",slot:"content"},h("ls-field-content",{key:"32846c02fcc7f55e73a432ab1cd0516ff1c23554",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"2e2b0e88c815e0e18935793fa1bb0d33389492b8",dataItem:this.dataItem})),h("div",{key:"60b2074337012d34fa809c772f9fde6deb0f3ff7",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"bc3785f75bbc19e32b51a8a904f2b2a350c10a69",dataItem:this.dataItem})),h("div",{key:"16f27469b5eb8a5695305b145dd0a63de95bbc4c",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"26219c3f7913f5c0c962fe7faf8739de119a02c6",dataItem:this.dataItem}))),h("ls-field-footer",{key:"c83c7dda209e25158808a8f1c9d37f5eaac1ddbe",dataItem:this.dataItem}))}};LsFieldPropertiesNumber.style=lsFieldPropertiesNumberCss;const lsFieldPropertiesSignatureCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesSignature=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"62a9fd4dd5535ce5bcc94fe11cb07020fe391742"},h("ls-field-properties-container",{key:"b15a383a7c51769a9c52266c91a47f65c0e85fcb",tabs:["content","placement","dimensions"]},h("div",{key:"cea89d50cb383f0468553718fe3b11c2116de837",class:"field-set",slot:"content"},h("ls-field-content",{key:"f3043200e40ef623e0686a88ee3bad50195837d3",dataItem:this.dataItem,showValidationTypes:false}),h("ls-field-properties-advanced",{key:"4df0fa78e6b9da356e25f0e6a7192b094fcf8ff3",dataItem:this.dataItem})),h("div",{key:"331a919f4521b1995a9c5e3200587b50ce34c64d",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"816c2f009afb374398640cd08a218523704a3abf",dataItem:this.dataItem})),h("div",{key:"00abad768142abdca45ad3b490cef45f40ff339e",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"ec7710454b70120172308d1c5abafd3a1f307192",dataItem:this.dataItem}))),h("ls-field-footer",{key:"0c27bcb56616a77d26017e6541bbf5a21d36a4b0",dataItem:this.dataItem}))}};LsFieldPropertiesSignature.style=lsFieldPropertiesSignatureCss;const lsFieldPropertiesTextCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;height:100%;position:relative}*{margin:0}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.destructive{border:1px solid var(--red-60, #f04438);background-color:white;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldPropertiesText=class{constructor(e){registerInstance(this,e)}dataItem;render(){return h(Host,{key:"42c376824ac0c4987319bbcd556420351c8c7abe"},h("ls-field-properties-container",{key:"2d341f1daef2b8c4cfbf1b6da7613aee0ebc6214",tabs:["content","placement","dimensions"]},h("div",{key:"11379672c5f10a25793bb1845c62d3d9f3cca9fb",class:"field-set",slot:"content"},h("ls-field-content",{key:"f8d31ed0dadefadf09b01bec1c6b06c3294662bd",dataItem:this.dataItem}),h("ls-field-properties-advanced",{key:"e48c9bfe2abbcbd7fe4075a14741a2e17b946994",dataItem:this.dataItem})),h("div",{key:"23b04bd4d66018f4ec4e9c727cd4e55ad36663e0",class:"field-set",slot:"dimensions"},h("ls-field-dimensions",{key:"03f0589f370fd86319a91a38e9ab85e3b038319f",dataItem:this.dataItem})),h("div",{key:"f9aee3ec9536ba05ea963e46e7575c254de7b154",class:"field-set",slot:"placement"},h("ls-field-placement",{key:"088523bd2b8f06eebe6c969b7a846cbfee31fe5c",dataItem:this.dataItem}))),h("ls-field-footer",{key:"d290dea659d37cd2cdad5dd5f03e71d118db9473",dataItem:this.dataItem}))}};LsFieldPropertiesText.style=lsFieldPropertiesTextCss;const lsFieldSizeCss=":host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-toolbar-numeric{width:45px;max-height:18px;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.multi-button-group-row{display:flex;gap:0.5rem}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.input-row{display:flex;gap:0.5rem}.input-row .input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #d8d9dc)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #d8d9dc);box-shadow:none}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6c6e73)}.button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #d8d9dc)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsFieldSize=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}dataItem;mutate;update;alter(e){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"3512b35c1a8bdace79f2196765e2892387a082ab"},h("div",{key:"b0535c73b7ad10b7a41d09fc3e97847802c04ea7",class:"ls-field-properties-section"},h("div",{key:"5f938c1b6f72720657fd06337cff7b2cfb7e0b18",class:"ls-field-properties-section-text"},h("p",{key:"2285e0fc40f37ac0e63f145f5111825371677114",class:"ls-field-properties-section-title"},"Scale and Resize"),h("p",{key:"79dece2d13f38f5f6473fd82a19e5574ae2152b1",class:"ls-field-properties-section-description"},"Multi-select fields and match their dimensions")),h("div",{key:"0ab5908841094a3ebc9053a4047608fdb1ceb5ea",class:"button-group"},h("button",{key:"7d711ca327b83444e3f7f7da6f308abd8de79c88",onClick:()=>this.alter({width:this.dataItem[0].width,height:this.dataItem[0].height}),"aria-label":"Make selected fields the same height and width as the first selected field.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same height and width as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"2f8262c4497b399c1f7b3331c83cbdd2da9bf7c7",name:"field-scale"})),h("button",{key:"af9ccb863f0f310b753a8b57fe4ec6bda2b984aa","aria-label":"Make selected fields the same width as the first selected field.",onClick:()=>this.alter({width:this.dataItem[0].width}),"data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same width as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"c00a7c60775de17e949063175e15af84d2d53324",name:"field-match-width"})),h("button",{key:"32236424b6bf23199df20d686b1ed3db4020ef51",onClick:()=>this.alter({height:this.dataItem[0].height}),"aria-label":"Make selected fields the same height as the first selected field.","data-tooltip-id":"le-tooltip","data-tooltip-content":"Make selected fields the same height as the first selected field.","data-tooltip-place":"top"},h("ls-icon",{key:"69e4ad1909f9c3cf82dd37f96d6a36d4508a0ab8",name:"field-match-height"})))),h("slot",{key:"de626a2771e6e5f24f9e1a445789f314223a4479"}))}};LsFieldSize.style=lsFieldSizeCss;const defaultFieldLabels={signature:"Signature","auto sign":"Auto Sign",text:"Text","signing date":"Auto Date",date:"Date",initials:"Initials",checkbox:"Checkbox",email:"Email",number:"Number",image:"Image",dropdown:"Dropdown",file:"File","drawn field":"Draw","regular expression":"RegEx"};function getFieldLabel(e){return defaultFieldLabels[e]||"Unknown"}const lsFieldTypeDisplayCss=":host{position:relative;border-radius:0.875rem;padding:0.25rem}*{margin:0}.ls-field-type-inner{border-radius:0.625rem;background:var(--white, #fff);display:flex;padding:0.25rem 0.5rem 0.25rem 0.25rem;align-items:center;gap:0.875rem;align-self:stretch}.ls-field-type-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.5rem;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-field-type-name{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1.5rem;}";const LsFieldTypeDisplay=class{constructor(e){registerInstance(this,e)}assignee;fieldType="signature";render(){const e=defaultRolePalette[this.assignee%100];return h(Host,{key:"73dd27b05de7a8477b497ee5bb79af0ca31789b2",class:"ls-field-type-wrapper",style:{border:`1px dashed ${e.s30}`,background:e.s10}},h("div",{key:"445d44e52106148630629b0fafab019422f1a05d",class:"ls-field-type-inner"},h("div",{key:"2abde211fce10f59df054f70bcfd5f7cd21cd624",class:"ls-field-type-icon",style:{border:`1px solid ${e.s60}`,color:e.s60,background:e.s10}},h("ls-icon",{key:"e521264b748012a137d3246f9d539e9e93704d4c",name:getFieldIcon(this.fieldType),size:"20"})),h("p",{key:"3da29fd61c972c9cee454bccd69d70736fe22a2a",class:"ls-field-type-name"},getFieldLabel(this.fieldType))))}};LsFieldTypeDisplay.style=lsFieldTypeDisplayCss;const html=String.raw;const icons=[{name:"mail",svgSolid:html`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
|
|
45
45
|
<path d="M2.00333 5.88355L9.99995 9.88186L17.9967 5.8835C17.9363 4.83315 17.0655 4 16 4H4C2.93452 4 2.06363 4.83318 2.00333 5.88355Z" fill="currentColor" />
|
|
46
46
|
<path d="M18 8.1179L9.99995 12.1179L2 8.11796V14C2 15.1046 2.89543 16 4 16H16C17.1046 16 18 15.1046 18 14V8.1179Z" fill="currentColor" />
|
|
47
47
|
</svg>`,svgOutline:html`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">
|
|
@@ -4919,4 +4919,4 @@ import{r as registerInstance,c as createEvent,a as getElement,h,H as Host}from".
|
|
|
4919
4919
|
fill="currentColor"
|
|
4920
4920
|
/>
|
|
4921
4921
|
</svg>`,svgOutline:html`No Outline`}];var IconEnum;(function(e){e["MailIcon"]="mail";e["AutoSign"]="auto-sign";e["BellIcon"]="bell";e["HomeIcon"]="home";e["BriefcaseIcon"]="briefcase";e["ShieldCheckIcon"]="shield-check";e["ShieldExclamationIcon"]="shield-exclamation";e["CogIcon"]="cog";e["CheckIcon"]="check";e["TranslateIcon"]="translate";e["CashIcon"]="cash";e["LocationMarkerIcon"]="location-marker";e["UserIcon"]="user";e["UsersIcon"]="users";e["UserGroupIcon"]="user-group";e["OfficeBuildingIcon"]="office-building";e["ScaleIcon"]="scale";e["PencilAltIcon"]="pencil-alt";e["PencilIcon"]="pencil";e["EyeIcon"]="eye";e["BookmarkIcon"]="bookmark";e["ColorSwatchIcon"]="color-swatch";e["InboxIcon"]="inbox";e["InboxInIcon"]="inbox-in";e["ArchiveIcon"]="archive";e["ClockIcon"]="clock";e["PhotographIcon"]="photograph";e["TagIcon"]="tag";e["PhoneIcon"]="phone";e["PhoneIncomingIcon"]="phone-incoming";e["PhoneOutgoingIcon"]="phone-outgoing";e["MenuIcon"]="menu";e["MenuAlt1Icon"]="menu-alt-1";e["MenuAlt2Icon"]="menu-alt-2";e["MenuAlt3Icon"]="menu-alt-3";e["MenuAlt4Icon"]="menu-alt-4";e["SwitchVerticalIcon"]="switch-vertical";e["SwitchHorizontalIcon"]="switch-horizontal";e["XIcon"]="x";e["PlusIcon"]="plus";e["RefreshIcon"]="refresh";e["QuestionMarkCircleIcon"]="question-mark-circle";e["ExclamationIcon"]="exclamation";e["CloudUploadIcon"]="cloud-upload";e["CloudDownloadIcon"]="cloud-download";e["ChartPieIcon"]="chart-pie";e["DocumentIcon"]="document";e["DocumentDownloadIcon"]="document-download";e["DocumentAddIcon"]="document-add";e["DocumentRemoveIcon"]="document-remove";e["CalenderIcon"]="calender";e["CameraIcon"]="camera";e["GlobeAltIcon"]="globe-alt";e["DuplicateIcon"]="duplicate";e["ShareIcon"]="share";e["HeartIcon"]="heart";e["GlobeIcon"]="globe";e["VolumeUpIcon"]="volume-up";e["VolumeOffIcon"]="volume-off";e["AdjustmentsIcon"]="adjustments";e["LinkIcon"]="link";e["MailOpenIcon"]="mail-open";e["DocumentDuplicateIcon"]="document-duplicate";e["CreditCardIcon"]="credit-card";e["LockClosedIcon"]="lock-closed";e["TrendingUpIcon"]="trending-up";e["TrendingDownIcon"]="trending-down";e["FilterIcon"]="filter";e["AtSymbolIcon"]="at-symbol";e["TrashIcon"]="trash";e["InformationCircleIcon"]="information-circle";e["ArrowUpIcon"]="arrow-up";e["ArrowRightIcon"]="arrow-right";e["ArrowDownIcon"]="arrow-down";e["ArrowLeftIcon"]="arrow-left";e["ArrowCircleRightIcon"]="arrow-circle-right";e["ArrowCircleDownIcon"]="arrow-circle-down";e["ArrowCircleLeftIcon"]="arrow-circle-left";e["ArrowCircleUpIcon"]="arrow-circle-up";e["SortAscendingIcon"]="sort-ascending";e["SortDescendingIcon"]="sort-descending";e["XCircleIcon"]="x-circle";e["CheckCircleIcon"]="check-circle";e["ExclamationCircleIcon"]="exclamation-circle";e["PlusCircleIcon"]="plus-circle";e["MinusCircleIcon"]="minus-circle";e["UserCircleIcon"]="user-circle";e["ZoomInIcon"]="zoom-in";e["ZoomOutIcon"]="zoom-out";e["SearchIcon"]="search";e["UserAddIcon"]="user-add";e["DotsHorizontalIcon"]="dots-horizontal";e["DotsVerticalIcon"]="dots-vertical";e["UploadIcon"]="upload";e["DownloadIcon"]="download";e["ViewListIcon"]="view-list";e["ViewBoardsIcon"]="view-boards";e["PaperClipIcon"]="paper-clip";e["EmojiHappyIcon"]="emoji-happy";e["EmojiSadIcon"]="emoji-sad";e["PrinterIcon"]="printer";e["CurrencyDollarIcon"]="currency-dollar";e["CurrencyYenIcon"]="currency-yen";e["CurrencyEuroIcon"]="currency-euro";e["CurrencyPoundIcon"]="currency-pound";e["CurrencyRupeeIcon"]="currency-rupee";e["ChevronDownIcon"]="chevron-down";e["ChevronRightIcon"]="chevron-right";e["ChevronUpIcon"]="chevron-up";e["ChevronLeftIcon"]="chevron-left";e["SelectorIcon"]="selector";e["ChatIcon"]="chat";e["ReceiptRefundIcon"]="receipt-refund";e["TicketIcon"]="ticket";e["LockOpenIcon"]="lock-open";e["DotsCircleHorizontalIcon"]="dots-circle-horizontal";e["HashtagIcon"]="hashtag";e["QRCodeIcon"]="qrcode";e["ClipboardCheckIcon"]="clipboard-check";e["ClipboardListIcon"]="clipboard-list";e["ClipboardIcon"]="clipboard";e["ExternalLinkIcon"]="external-link";e["SunIcon"]="sun";e["MoonIcon"]="moon";e["ClipboardCopyIcon"]="clipboard-copy";e["AnnotationIcon"]="annotation";e["FlagIcon"]="flag";e["CollectionIcon"]="collection";e["BookOpenIcon"]="book-open";e["CodeIcon"]="code";e["LightningBoltIcon"]="lightning-bolt";e["FolderIcon"]="folder";e["SparklesIcon"]="sparkles";e["UserRemoveIcon"]="user-remove";e["ArrowNarrowUpIcon"]="arrow-narrow-up";e["ArrowNarrowRightIcon"]="arrow-narrow-right";e["ArrowNarrowDownIcon"]="arrow-narrow-down";e["ArrowNarrowLeftIcon"]="arrow-narrow-left";e["TemplateIcon"]="template";e["ReplyIcon"]="reply";e["LightBulbIcon"]="light-bulb";e["ChatAltIcon"]="chat-alt";e["DocumentReportIcon"]="document-report";e["LogOutIcon"]="logout";e["KeyIcon"]="key";e["BanIcon"]="ban";e["ShoppingCartIcon"]="shopping-cart";e["CursorClickIcon"]="cursor-click";e["MicrophoneIcon"]="microphone";e["SpeakerphoneIcon"]="speakerphone";e["BadgeCheckIcon"]="badge-check";e["DesktopComputerIcon"]="desktop-computer";e["ChatAlt2Icon"]="chat-alt-2";e["SupportIcon"]="support";e["NewspaperIcon"]="newspaper";e["BookmarkAltIcon"]="bookmark-alt";e["ViewGridAddIcon"]="view-grid-add";e["LibraryIcon"]="library";e["PlayIcon"]="play";e["PauseIcon"]="pause";e["StopIcon"]="stop";e["StarIcon"]="star";e["TerminalIcon"]="terminal";e["ChartSquareBarIcon"]="chart-square-bar";e["EyeOffIcon"]="eye-off";e["ChartBarIcon"]="chart-bar";e["FireIcon"]="fire";e["ShoppingBagIcon"]="shopping-bag";e["ThumbUpIcon"]="thumb-up";e["ThumbDownIcon"]="thumb-down";e["HandIcon"]="hand";e["ArrowsExpandIcon"]="arrows-expand";e["ViewGridIcon"]="view-grid";e["PuzzleIcon"]="puzzle";e["FolderDownloadIcon"]="folder-download";e["FolderAddIcon"]="folder-add";e["FolderRemoveIcon"]="folder-remove";e["MapIcon"]="map";e["IdentificationIcon"]="identification";e["RSSIcon"]="rss";e["ScissorsIcon"]="scissors";e["MusicNoteIcon"]="music-note";e["FilmIcon"]="film";e["DatabaseIcon"]="database";e["ServerIcon"]="server";e["LogInIcon"]="login";e["WiFiIcon"]="wifi";e["BackspaceIcon"]="backspace";e["PaperAirplaneIcon"]="paper-airplane";e["DeviceMobileIcon"]="device-mobile";e["DeviceTabletIcon"]="device-tablet";e["ChevronDoubleRightIcon"]="chevron-double-right";e["ChevronDoubleDownIcon"]="chevron-double-down";e["ChevronDoubleLeftIcon"]="chevron-double-left";e["ChevronDoubleUpIcon"]="chevron-double-up";e["FingerPrintIcon"]="finger-print";e["CubeIcon"]="cube";e["FolderOpenIcon"]="folder-open";e["SaveIcon"]="save";e["SaveAsIcon"]="save-as";e["DocumentTextIcon"]="document-text";e["TableIcon"]="table";e["CalculatorIcon"]="calculator";e["BeakerIcon"]="beaker";e["GiftIcon"]="gift";e["TruckIcon"]="truck";e["CurrencyBangladeshiIcon"]="currency-bangladeshi";e["VideoCameraIcon"]="video-camera";e["CloudIcon"]="cloud";e["CubeTransparentIcon"]="cube-transparent";e["CakeIcon"]="cake";e["PhoneMissedCallIcon"]="phone-missed-call";e["PlusSmIcon"]="plus-sm";e["MinusSmIcon"]="minus-sm";e["ReceiptTaxIcon"]="receipt-tax";e["StatusOnlineIcon"]="status-online";e["StatusOfflineIcon"]="status-offline";e["PresentationChartLineIcon"]="presentation-chart-line";e["PresentationChartBarIcon"]="presentation-chart-bar";e["FastForwardIcon"]="fast-forward";e["RewindIcon"]="rewind";e["ChipIcon"]="chip";e["AcademicCapIcon"]="academic-cap";e["VariableIcon"]="variable";e["DocumentSearchIcon"]="document-search";e["SearchCircleIcon"]="search-circle";e["MinusIcon"]="minus";e["ArrowSmUpIcon"]="arrow-sm-up";e["ArrowSmRightIcon"]="arrow-sm-right";e["ArrowSmDownIcon"]="arrow-sm-down";e["ArrowSmLeftIcon"]="arrow-sm-left";e["BaseCircleIcon"]="base-circle";e["DragVerticalIcon"]="drag-vertical";e["InitialsIcon"]="initials";e["TextIcon"]="text";e["MenuAlt5Icon"]="menu-alt-5";e["TextSizeIcon"]="text-size";e["PinIcon"]="pin";e["KeyboardIcon"]="keyboard";e["MoveVerticalIcon"]="move-vertical";e["MoveHorizontalIcon"]="move-horizontal";e["RotateLeftIcon"]="rotate-left";e["RotateRightIcon"]="rotate-right";e["UndoIcon"]="undo";e["RedoIcon"]="redo";e["DragHorizontalIcon"]="drag-horizontal";e["SidePanelCloseLeftIcon"]="side-panel-close-left";e["SidePanelCloseRightIcon"]="side-panel-close-right";e["SidePanelOpenLeftIcon"]="side-panel-open-left";e["SidePanelOpenRightIcon"]="side-panel-open-right";e["ContactsIcon"]="contacts";e["ArrowUpLinkOutIcon"]="arrow-up-link-out";e["DeviceLockIcon"]="device-lock";e["AutoDateIcon"]="auto-date";e["RevertIcon"]="revert";e["GuidesIcon"]="guides";e["BulkSendIcon"]="bulk-send";e["FieldAlignmentLeftIcon"]="field-alignment-left";e["FieldAlignmentCentreIcon"]="field-alignment-centre";e["FieldAlignmentRightIcon"]="field-alignment-right";e["AccessibilityIcon"]="accessibility";e["ArrowsMinimiseIcon"]="arrows-minimise";e["DocumentInfoIcon"]="document-info";e["DocumentImportFieldsIcon"]="document-import-fields";e["DocumentMergeAlt2Icon"]="document-merge-alt2";e["DocumentCombineIcon"]="document-combine";e["FieldAlignmentTopIcon"]="field-alignment-top";e["FieldAlignmentMiddleIcon"]="field-alignment-middle";e["FieldAlignmentBottomIcon"]="field-alignment-bottom";e["BoxEmptyIcon"]="box-empty";e["BoxTickedIcon"]="box-ticked";e["BoxCrossedIcon"]="box-crossed";e["SortAlphabeticallyAZIcon"]="sort-alphabetically-a-z";e["SortAlphabeticallyZAIcon"]="sort-alphabetically-z-a";e["LinkedDocumentIcon"]="linked-document";e["DocumentReplaceIcon"]="document-replace";e["FieldScaleIcon"]="field-scale";e["FieldMatchWidthIcon"]="field-match-width";e["FieldMatchHeightIcon"]="field-match-height";e["RecipientLinkIcon"]="recipient-link";e["RecipientLinkBrokenIcon"]="recipient-link-broken";e["WitnessArrowIcon"]="witness-arrow";e["BranchIcon"]="branch";e["VariantIcon"]="variant";e["RecipientDetailsCardIcon"]="recipient-details-card";e["RecipientDetailsIcon"]="recipient-details";e["FieldDistributeVerticallyIcon"]="field-distribute-vertically";e["FieldDistributeHorizontallyIcon"]="field-distribute-horizontally";e["FieldDuplicateIcon"]="field-duplicate";e["PreFilledContentIcon"]="pre-filled-content";e["TypingInputIcon"]="typing-input";e["TableSplitIcon"]="table-split";e["AddColumnLeftIcon"]="add-column-left";e["AddColumnRightIcon"]="add-column-right";e["RecipientLinksIcon"]="recipient-links";e["ListOrderIcon"]="list-order";e["FieldScalingOffIcon"]="field-scaling-off";e["FitWidthIcon"]="fit-width";e["FitHeightIcon"]="fit-height";e["TableQuickEditIcon"]="table-quick-edit";e["TableColumnsIcon"]="table-columns";e["TableRowsIcon"]="table-rows";e["ApplyAllRowsIcon"]="apply-all-rows";e["PagescrollPreviewIcon"]="pagescroll-preview";e["PageInsertVerticalIcon"]="page-insert-vertical";e["PageInsertHorizontalIcon"]="page-insert-horizontal";e["SignatureIcon"]="signature";e["CircleQuarterIcon"]="circle-quarter";e["CircleHalfIcon"]="circle-half";e["CircleThreeQuarterIcon"]="circle-three-quarter";e["TimeSortAscendingIcon"]="time-sort-ascending";e["TimeSortDescendingIcon"]="time-sort-descending";e["DateSortAscendingIcon"]="date-sort-ascending";e["DateSortDescendingIcon"]="date-sort-descending";e["SidePanelClosedIcon"]="side-panel-closed";e["SidePanelOpenIcon"]="side-panel-open";e["DateSentSortAscendingIcon"]="date-sent-sort-ascending";e["DateSentSortDescendingIcon"]="date-sent-sort-descending";e["SortAlphabeticallyAZAltIcon"]="sort-alphabetically-a-z-alt";e["SortAlphabeticallyZAAltIcon"]="sort-alphabetically-z-a-alt";e["TemplateSentIcon"]="template-sent";e["TemplateNotSentIcon"]="template-not-sent";e["GridIcon"]="grid";e["LinkedIcon"]="linked";e["LinkBrokenIcon"]="link-broken";e["UserAssignIcon"]="user-assign";e["XLetterIcon"]="x-letter";e["YIcon"]="y";e["FieldSelectedIcon"]="field-selected";e["DesignationIcon"]="designation";e["TextAlignmentIcon"]="text-alignment";e["FieldPlacementIcon"]="field-placement";e["RequiredIcon"]="required";e["TypefaceIcon"]="typeface";e["TypesizeIcon"]="typesize";e["PageLayoutIcon"]="page-layout";e["FieldSpecialIcon"]="field-special";e["LinkValueIcon"]="link-value";e["TargetIcon"]="target";e["FieldOrderIcon"]="field-order";e["DropdownIcon"]="dropdown";e["SendArrowIcon"]="send-arrow";e["SentProgressIcon"]="sent-progress";e["CircleFilledQuarterIcon"]="circle-filled-quarter";e["CircleFilledHalfIcon"]="circle-filled-half";e["CircleFilledThreeQuarterIcon"]="circle-filled-three-quarter";e["DocumentViewedIcon"]="document-viewed";e["CollapseIcon"]="collapse";e["ExpandIcon"]="expand";e["LogoIcon"]="logo"})(IconEnum||(IconEnum={}));const iconNames=[...icons.map((e=>e.name)).sort()];const LsIcon=class{constructor(e){registerInstance(this,e)}name;solid=false;size="20";customStyle;arraysAreIdentical(e,t){const r=e[0]==="none"?e.slice(1):e;const i=t[0]==="none"?t.slice(1):t;if(r.length!==i.length){return false}const o=[...r].sort();const n=[...i].sort();return o.every(((e,t)=>e===n[t]))}iconNamesFromEnum=Object.values(IconEnum);componentDidLoad(){const e=this.arraysAreIdentical(iconNames,this.iconNamesFromEnum);if(!e)console.warn("Icons in src/components/ls-icon/icons.ts should be identical to the enum type in src/types/Icon.ts. Please add all icons to the enum type.")}render(){return h("host",{key:"22d3c71a636675912fa1ca782a1603f01249c86b"},icons?.filter((e=>e.name===this.name))?.map((e=>h("div",{key:e?.name,class:"iconContainer",style:{height:`${this.size}px`,width:`${this.size}px`,...this.customStyle}},this.solid?h("div",{innerHTML:e.svgSolid,style:{top:"0px"}}):h("div",{innerHTML:e.svgOutline,style:{top:"0px"}})))))}};const lsInputWrapperCss="*{margin:0;padding:0;box-sizing:border-box}:host{position:relative}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}";const LsInputWrapper=class{constructor(e){registerInstance(this,e)}leadingIcon;select=false;render(){return h(Host,{key:"27d8e1cd87ced072110e49eec513181b4b2a31fc"},h("ls-icon",{key:"f98e5fd1998af46901c8b4443d96ca3eacd9670b",id:"selectLeadingIcon",name:this.leadingIcon}),this.select&&h("ls-icon",{key:"9472fb33b2df28d13ffe481fe451f2a9490e52b8",id:"selectorIcon",name:"selector"}),h("slot",{key:"99e95818e3c8f37ae3533d1b8bff73426324b5e1"}))}};LsInputWrapper.style=lsInputWrapperCss;const lsPageLoaderCss=":host{position:fixed;display:flex;top:0;left:0;align-items:center;justify-content:center;background-color:rgba(251, 251, 251, 0.3);backdrop-filter:blur(2px);height:100%;width:100%;z-index:4000}.loading-animation{position:relative;width:200px;height:200px;color:var(--primary-60, #0c7cba)}";const LsPageLoader=class{constructor(e){registerInstance(this,e)}render(){return h(Host,{key:"b8a22c0a50aa3264a4a8dc932601b7ad65321b40"},h("div",{key:"be65314af39c0d5d09bc8d66c2dc301d64c1d4da",class:"loading-animation"},h("svg",{key:"b7175fdef641e5f00729f0949b2c4f013350a596",class:"block w-full h-full",fill:"none",preserveAspectRatio:"none",viewBox:"0 0 20 20"},h("g",{key:"1e05cfca9a6c9a454fa0dc1c9f06f3f108ca48d4",id:"Icon/solid/logo"},h("g",{key:"ffc0feabedc0d90d0c072bdf56fa6b16c73cd590",id:"Icon"},h("path",{key:"30cdf1467a8f5b216ac77a84f2e713866b63c07a",class:"classic-sequential-front",d:"M9.11077 0.940012C8.98702 0.868406 8.83446 0.868297 8.71061 0.939725C8.58675 1.01115 8.51044 1.14326 8.51044 1.28623V2.34625C8.51044 2.48927 8.5868 2.62141 8.71071 2.69282L14.6321 6.10546C14.818 6.21257 14.9325 6.41078 14.9325 6.6253V13.4621C14.9325 13.6044 15.0081 13.7359 15.131 13.8076L16.0285 14.3311C16.1522 14.4033 16.305 14.4038 16.4292 14.3325C16.5534 14.2611 16.63 14.1288 16.63 13.9856V5.52152C16.63 5.37876 16.5539 5.24681 16.4303 5.17531L9.11077 0.940012Z",fill:"currentColor"}),h("path",{key:"b43f3d5dd81c338118400fc7ebf14bd59d28075a",class:"classic-sequential-middle",d:"M6.35621 2.52413C6.23246 2.45251 6.07989 2.45239 5.95603 2.52381C5.83217 2.59524 5.75585 2.72735 5.75585 2.87033V3.94156C5.75585 4.08504 5.83269 4.21752 5.95722 4.28876L8.20838 5.57659C8.39518 5.68345 8.51044 5.88218 8.51044 6.09739V9.75268C8.51044 9.89534 8.58642 10.0272 8.70984 10.0987L11.8717 11.9316C12.0569 12.0389 12.1708 12.2367 12.1708 12.4507V16.1015C12.1708 16.2434 12.2461 16.3747 12.3685 16.4465L13.2784 16.9801C13.4021 17.0526 13.5552 17.0534 13.6796 16.9821C13.804 16.9108 13.8808 16.7784 13.8808 16.635V7.10976C13.8808 6.96701 13.8047 6.83507 13.6811 6.76356L6.35621 2.52413Z",fill:"currentColor"}),h("path",{key:"c52c0916d2e82f7c0c06bc437be4c2465e6de134",class:"classic-sequential-back",d:"M3.60419 4.12505C3.48039 4.05421 3.32824 4.05465 3.20486 4.1262C3.08147 4.19776 3.00552 4.3296 3.00552 4.47223V15.0385C3.00552 15.1812 3.08151 15.3131 3.20494 15.3846L10.5339 19.6323C10.6576 19.704 10.8102 19.7042 10.9341 19.6328C11.0581 19.5614 11.1344 19.4293 11.1344 19.2862V12.9374C11.1344 12.795 11.0587 12.6634 10.9357 12.5917L7.78047 10.7551C7.59587 10.6476 7.48232 10.4501 7.48232 10.2365V6.57621C7.48232 6.43276 7.40549 6.30029 7.28098 6.22904L3.60419 4.12505Z",fill:"currentColor"})))),h("style",{key:"c58faea0d359c6b1d3fb00ff6944c9952dacbe09"},`\n @keyframes classic-sequential-back {\n 0% { opacity: 0; transform: scale(0.3); }\n 2% { opacity: 0.3; transform: scale(0.5); }\n 4% { opacity: 0.6; transform: scale(0.7); }\n 6% { opacity: 0.8; transform: scale(0.85); }\n 8% { opacity: 1; transform: scale(1); }\n 22% { opacity: 1; transform: scale(1); }\n 55% { opacity: 1; transform: scale(1); }\n 64% { opacity: 1; transform: scale(1); }\n 65% { opacity: 0.9; transform: scale(0.95); }\n 66.2% { opacity: 0.75; transform: scale(0.88); }\n 67.2% { opacity: 0.6; transform: scale(0.8); }\n 68% { opacity: 0.4; transform: scale(0.7); }\n 68.8% { opacity: 0.25; transform: scale(0.6); }\n 69.5% { opacity: 0.1; transform: scale(0.45); }\n 70% { opacity: 0.05; transform: scale(0.35); }\n 71% { opacity: 0; transform: scale(0.3); }\n 100% { opacity: 0; transform: scale(0.3); }\n }\n\n @keyframes classic-sequential-middle {\n 0%, 16% { opacity: 0; transform: scale(0.3); }\n 18% { opacity: 0.3; transform: scale(0.5); }\n 20% { opacity: 0.6; transform: scale(0.7); }\n 22% { opacity: 0.8; transform: scale(0.85); }\n 24% { opacity: 1; transform: scale(1); }\n 36%, 65%, 70% { opacity: 1; transform: scale(1); }\n 71% { opacity: 0.9; transform: scale(0.95); }\n 72.2% { opacity: 0.75; transform: scale(0.88); }\n 73.2% { opacity: 0.6; transform: scale(0.8); }\n 74% { opacity: 0.4; transform: scale(0.7); }\n 74.8% { opacity: 0.25; transform: scale(0.6); }\n 75.5% { opacity: 0.1; transform: scale(0.45); }\n 76% { opacity: 0.05; transform: scale(0.35); }\n 77%, 100% { opacity: 0; transform: scale(0.3); }\n }\n\n @keyframes classic-sequential-front {\n 0%, 32% { opacity: 0; transform: scale(0.3); }\n 34% { opacity: 0.3; transform: scale(0.5); }\n 36% { opacity: 0.6; transform: scale(0.7); }\n 38% { opacity: 0.8; transform: scale(0.85); }\n 40% { opacity: 1; transform: scale(1); }\n 60%, 76% { opacity: 1; transform: scale(1); }\n 77% { opacity: 0.9; transform: scale(0.95); }\n 78.2% { opacity: 0.75; transform: scale(0.88); }\n 79.2% { opacity: 0.6; transform: scale(0.8); }\n 80% { opacity: 0.4; transform: scale(0.7); }\n 80.8% { opacity: 0.25; transform: scale(0.6); }\n 81.5% { opacity: 0.1; transform: scale(0.45); }\n 82% { opacity: 0.05; transform: scale(0.35); }\n 83%, 100% { opacity: 0; transform: scale(0.3); }\n }\n\n .classic-sequential-back {\n animation: classic-sequential-back 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;\n transform-origin: center;\n }\n\n .classic-sequential-middle {\n animation: classic-sequential-middle 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;\n transform-origin: center;\n }\n\n .classic-sequential-front {\n animation: classic-sequential-front 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;\n transform-origin: center;\n }\n `)),h("slot",{key:"14a81aa90b119d816fc657f6a46f57ae94d0e4f2"}))}};LsPageLoader.style=lsPageLoaderCss;const lsParticipantCardCss=":host{display:block}*{box-sizing:border-box;margin:0}.participant-card{display:flex;padding:0.625rem;flex-direction:column;align-items:flex-start;gap:0.5rem;align-self:stretch}.top-card{border-radius:1rem 1rem 0 0}.full-card{border-radius:1rem}.bottom-card{border-radius:0 0 1rem 1rem}.participant-card-inner{width:100%;display:flex;flex-direction:column;gap:0.5rem}.hidden{visibility:hidden;display:none}.form-button-set{display:flex;gap:0.5rem}.role-label{display:flex;padding:0.125rem 0.5rem;justify-content:center;align-items:center;gap:0.25rem;border-radius:0.5rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.role-label.fields{border-radius:1rem;margin-top:0.5rem}.innerButton{margin:0px;padding:0px;max-height:1.25rem !important;max-width:1.25rem !important;background-color:transparent;border:none;cursor:pointer;color:var(--default-button-colour)}.innerButton:hover{color:var(--hover-button-colour)}.participant-card-top-items{display:flex;width:100%;justify-content:space-between;align-items:center}.button-set{display:flex;gap:0.125rem}.participant-text-description{font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.participant-text-type{font-style:normal;font-weight:400;line-height:1.25rem;}.titleButton{width:100%;text-align:left;background-color:transparent;border:none}.full-width{width:100%}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px;width:100%}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.tertiary{border:1px solid var(--primary-60, #4456f6);background:transparent;color:var(--primary-70, #2134dc)}button.tertiary:hover{border:1px solid var(--primary-70, #2134dc);border:1px solid var(--primary-80, #0c34b8)}button.destructive{border:1px solid var(--red-60, #f04438);background:transparent;color:var(--red-60)}button.destructive:hover{border:1px solid var(--red-70, #d92d20);background:var(--red-10, #fff1f0);background-color:var(--red-10, #fff1f0)}button.secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #fff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsParticipantCard=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update");this.opened=createEvent(this,"opened");this.addParticipant=createEvent(this,"addParticipant")}get component(){return getElement(this)}signer;index;editable=false;template;mutate;update;opened;alter(e){this.signer={...this.signer,...e};this.debounce(this.signer,500)}labeltimer;debounce(e,t){if(this.labeltimer)clearTimeout(this.labeltimer);this.labeltimer=setTimeout((()=>{const t=[{action:"update",data:e}];this.mutate.emit(t);this.update.emit(t)}),t)}deleteHandler(e){this.update.emit([{action:"delete",data:e}]);this.mutate.emit([{action:"delete",data:e}])}swapHandler(e,t){this.update.emit([{action:"swap",data:e,data2:t}]);this.mutate.emit([{action:"swap",data:e,data2:t}])}modeHandler(e){if(e){this.opened.emit(this.signer)}}addParticipant;render(){const e=this.template.elementConnection.templateElements.filter((e=>e.signer===this.signer.signerIndex))||[];const t=this.template.roles.find((e=>e.signerParent===this.signer.id));return h(Host,{key:"e948d8be468f8e81b0ea752b8c37aef7e83d5227"},h("div",{key:"445aea342b4e4397bc4e6eb8c20e171bd853d59f",class:"participant-card"+(t?" top-card":this.signer?.signerParent?" bottom-card":" full-card"),style:{background:defaultRolePalette[this.signer?.signerIndex%100].s10,border:`1px solid ${defaultRolePalette[this.signer?.signerIndex%100].s60}`,marginTop:this.signer.roleType==="WITNESS"?"-0.813rem":"0"},onMouseEnter:e=>e.currentTarget.querySelector(".button-set")?.classList.remove("hidden"),onMouseLeave:e=>e.currentTarget.querySelector(".button-set")?.classList.add("hidden"),onDblClick:()=>{this.editable=true}},h("div",{key:"b9e87febf6217ffb40c228e67dccc59a4e0a79ea",class:"participant-card-inner"},h("div",{key:"930e5dd57d2dba41214d4ae86b4520aec572e92a",class:"participant-card-top-items"},h("div",{key:"5cea99ed2038b51441e34c3be9510f7163b27e56",class:"role-label",style:{background:defaultRolePalette[this.signer?.signerIndex%100].s20,color:defaultRolePalette[this.signer?.signerIndex%100].s90}},h("ls-icon",{key:"b8bb19361e0cef64eae9bebf01a0fe73ade6be99",name:this.signer?.roleType==="APPROVER"?"check-circle":this.signer?.roleType==="SIGNER"?"signature":"eye"}),"Participant "+(this.signer?.signerIndex||"")),h("div",{key:"14bb3077badecdd639ca9221db8ff8135072f008",class:"button-set hidden"},this.index>0&&this.signer.roleType!=="WITNESS"&&h("div",{key:"eaf07f2aca39b4666ee36ed50023b198cc6695a9",class:"innerButton",onClick:()=>{this.swapHandler(this.signer,this.template.roles[this.index-1])},style:{"--default-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s40,"--hover-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s60}},h("ls-icon",{key:"48f6736e9f88b03b71dc0836141f2dce10c592da",name:"arrow-up",size:"18"})),this.signer.signerIndex!==this.template.roles.length&&this.signer.roleType!=="WITNESS"&&h("div",{key:"f1df1663aba7445c3998a10388054c38202a45d7",class:"innerButton",onClick:()=>{this.swapHandler(this.signer,this.template.roles[this.index+1])},style:{"--default-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s40,"--hover-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s60}},h("ls-icon",{key:"21f3302957048e5c218f04e6da680a5be3ac55ba",name:"arrow-down",size:"18"})),h("div",{key:"4b59e37058412bbd8d04deb4418fb3f764dbf360",class:"innerButton",onClick:()=>{this.editable=!this.editable},style:{"--default-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s40,"--hover-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s60}},h("ls-icon",{key:"ab068a9b7832b9387a006230231970dd425ae739",name:this.editable?"check":"pencil-alt",size:"18"})),h("div",{key:"acede95c9e80168f22b08e24602ade0b1fe1fdb7",class:"innerButton",onClick:()=>{this.deleteHandler(this.signer)},style:{"--default-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s40,"--hover-button-colour":defaultRolePalette[this.signer?.signerIndex%100].s60}},h("ls-icon",{key:"d72ebe8b0544eee194842f91f5d449d20ed1da56",name:"trash",size:"18"})))),this.editable?h("div",{class:"participant-card-inner"},this.signer?.roleType!=="WITNESS"?h("ls-input-wrapper",{select:true,leadingIcon:this.signer?.roleType==="APPROVER"?"check-circle":"signature"},h("select",{name:"roleType",id:"role-type",class:"has-leading-icon",onChange:e=>this.alter({roleType:e.target.value}),disabled:t?true:false},h("option",{value:"APPROVER",selected:this.signer?.roleType==="APPROVER"},"Approver"),h("option",{value:"SIGNER",selected:this.signer?.roleType==="SIGNER"},"Signer"))):h("ls-input-wrapper",{leadingIcon:"eye"},h("input",{name:"roleType",id:"role-type",class:"has-leading-icon",disabled:true,value:"Witness"})),h("input",{type:"text",id:"participant-description",name:"participantDescription",placeholder:"Description, eg. Tenant 1, Agent",defaultValue:this.signer.name,onInput:e=>this.alter({name:e.target.value}),onKeyUp:e=>{if(e.key==="Enter"||e.keyCode===13)this.editable=false}}),this.signer?.roleType==="SIGNER"&&!t?h("button",{class:"tertiary",onClick:()=>this.addParticipant.emit({type:"WITNESS",parent:this.signer.id})},h("ls-icon",{name:"plus",style:{marginRight:"0.25rem"}}),"Add Witness"):this.signer?.roleType==="SIGNER"&&t?h("button",{class:"destructive",onClick:()=>{this.deleteHandler(t)}},h("ls-icon",{name:"minus-sm",style:{marginRight:"0.25rem"}}),"Remove Witness"):this.signer?.roleType==="WITNESS"?h("button",{class:"destructive",onClick:()=>{this.deleteHandler(this.signer)}},h("ls-icon",{name:"minus-sm",style:{marginRight:"0.25rem"}}),"Remove Witness"):null):h("div",{class:"participant-card-text"},h("p",{class:"participant-text-description",style:{color:defaultRolePalette[this.signer?.signerIndex%100].s100}},this.signer.name||`${this.signer.signerIndex>100?"Witness":"Signer"} ${this.signer.signerIndex+1}`),h("p",{class:"participant-text-type",style:{color:defaultRolePalette[this.signer?.signerIndex%100].s80,textTransform:"capitalize"}},this.signer.roleType.toLowerCase()),this.signer?.roleType!=="APPROVER"&&h("div",{class:"role-label fields",style:{background:e.length===0?defaultRolePalette[this.signer?.signerIndex%100].s60:defaultRolePalette[this.signer?.signerIndex%100].s20,color:e.length===0?"white":defaultRolePalette[this.signer?.signerIndex%100].s90}},e.length===0&&h("ls-icon",{name:"exclamation-circle",size:"16",style:{marginRight:"0.125rem"}}),e.length===0?"Signature Required":`${e.length} ${e.length===1?"Field":"Fields"}`)))),h("slot",{key:"8059f6c9ce00424f838f1c073ec9b3bf62d1f25d"}))}static get watchers(){return{editable:["modeHandler"]}}};LsParticipantCard.style=lsParticipantCardCss;const lsParticipantManagerCss=".label-span{position:absolute;font-family:inherit;display:inline-flex;align-items:center;line-height:1rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.participant-list{position:relative;display:flex;flex-direction:column;gap:0.75rem}*{box-sizing:border-box;margin:0}.ls-editor-infobox{padding:2px 8px 2px 8px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.add-participant-button{position:sticky;display:flex;padding:0.75rem 0;margin-bottom:-0.75rem;margin-top:-0.75rem;bottom:-0.75rem;background-image:linear-gradient(to top, var(--gray-10, #f7f8fa) 0%, var(--gray-10, #f7f8fa) 80%, transparent 100%)}.add-participant-button button{display:flex;gap:0.75rem;justify-content:center;align-items:center;width:100%;border:2px dashed var(--gray-20, #edeff2);background:var(--white, #fff);color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsParticipantManager=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update");this.addParticipant=createEvent(this,"addParticipant")}get element(){return getElement(this)}editor;template;mutate;update;addParticipant;selectedHandler(e){}deleteHandler(e){this.update.emit([{action:"delete",data:e}]);this.mutate.emit([{action:"delete",data:e}])}swapHandler(e,t){this.update.emit([{action:"swap",data:e,data2:t}])}handleOpened(e){const t=this.element.shadowRoot.querySelectorAll("ls-participant-card");t.forEach((t=>{const r=t.signer?.id===e.detail.id;t.editable=r;if(r){t.scrollIntoView({behavior:"smooth",block:"center"})}}))}handleOpenNewWitness(e){const{parent:t}=e.detail;const r=new MutationObserver((()=>{const e=this.element.shadowRoot.querySelectorAll("ls-participant-card");e.forEach((e=>{const r=e.signer?.signerParent===t;e.editable=r;if(r){e.scrollIntoView({behavior:"smooth",block:"center"})}}));r.disconnect()}));r.observe(this.element.shadowRoot,{childList:true,subtree:true})}render(){return h(Host,{key:"edef40a6b345a99b45e4088fd44e463fa769ae8d"},h("div",{key:"211294eba6699885106d694deb2337eb51b785f8",class:"ls-editor-infobox"},h("h2",{key:"68a39092393693765bcbc497a457014cbd307580",class:"toolbox-section-title"},"Participants"),h("p",{key:"29453b8e8fce7eb39f4f34a0d876fe8dd72f6af4",class:"toolbox-section-description"},"Select and Click to place Signature fields where you’d like on the Document.")),h("div",{key:"ad9925bc37488c8f4a1cef7d3fdb59d21e92e926",class:"participant-list"},this.template&&this.template?.roles.map(((e,t)=>h("ls-participant-card",{signer:e,index:t,template:this.template,onOpened:e=>{this.handleOpened.bind(this)(e)},onAddParticipant:e=>this.handleOpenNewWitness(e)})))),h("div",{key:"3a474009f7ba0168da4af3e5807d228a36fe7fa3",class:"add-participant-button"},h("button",{key:"405528eb5bf2c30acca22254a8a2cef81f3cb673",onClick:()=>this.addParticipant.emit({type:"SIGNER"})},h("ls-icon",{key:"58aa3bf54a5b49c1fffeca956fa42e8fe6712364",name:"user-add",size:"20",color:"var(--gray-100, #45484D);"}),h("p",{key:"71bcf3329ee400624f4d6dc2577e04c4a33860b0"},"Add Participant"))),h("slot",{key:"b2894e4a772329741ff796bf0a39e1333cfa567b"}))}};LsParticipantManager.style=lsParticipantManagerCss;const lsParticipantSelectCss=":host{display:inline-block}*{margin:0}.dropdown{display:flex;align-items:center;position:relative}.dropdown-header{border-radius:0.625rem;border:1px solid var(--gray-20, #edeff2);background:var(--gray-10, #f7f8fa);display:flex;padding:0.125rem 0.125rem 0.125rem 0.5rem;align-items:center;gap:0.5rem}.placing-fields-text{color:var(--gray-90, #5e6066);text-align:center;font-size:0.875rem;font-style:normal;font-weight:500;margin:0}.selected-role-label{display:flex;padding:0.125rem 0.375rem;justify-content:center;align-items:center;gap:0.25rem;border-radius:0.25rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.dropdown-list{position:absolute;top:3rem;left:50%;transform:translateX(-50%);display:flex;width:18.5625rem;padding:0.25rem;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid var(--gray-30, #e0e2e5);background:white;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);max-height:40vh;overflow-y:auto}.dropdown-item{display:flex;padding:0.5rem 0.875rem 0.5rem 0.5rem;align-items:center;gap:0.75rem;align-self:stretch;border-radius:0.5rem}.dropdown-item.selected,.dropdown-item.selected:hover{background:var(--background-selected, #e0e2e5)}.dropdown-item:hover{background:var(--gray-10, #f7f8fa)}.add-participant-row{all:unset;display:flex;padding:0.5rem 0.875rem 0.5rem 0.5rem;align-items:center;gap:0.75rem;align-self:stretch;border-radius:0.5rem;border:1px dashed var(--gray-30, #e0e2e5);cursor:pointer}.add-participant-row:hover{background:var(--gray-10, #f7f8fa)}.plus-icon{color:var(--gray-40, #d8d9dc)}.role-icon{display:flex;padding:0.5rem;border-radius:0.625rem}.add-participant-icon{display:flex;padding:0.5rem;border-radius:0.625rem;color:white;background:var(--primary-60, #4456f6)}.role-text{display:flex;flex-direction:column;width:100%}.dropdown-item .check-icon{color:var(--gray-40, #d8d9dc)}.dropdown-item.selected .check-icon{color:var(--check-icon-selected)}.role-name{color:var(--gray-100, #45484d);font-size:0.75rem;font-style:normal;font-weight:500;line-height:1rem;}.role-type{color:var(--gray-80, #787a80);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem;}.dropdown-item.selected .role-name{color:var(--role-name-selected)}.dropdown-item.selected .role-type{color:var(--role-type-selected)}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}.expand-button{border:0;cursor:pointer;display:inline-flex;align-items:center;border-radius:0.5rem;justify-content:center;text-transform:capitalize;min-height:2rem;min-width:2rem;max-height:2rem;max-width:2rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsParticipantSelect=class{constructor(e){registerInstance(this,e);this.roleChange=createEvent(this,"roleChange");this.addParticipant=createEvent(this,"addParticipant")}selected;selectedRole={signerIndex:0,name:"Sender",roleType:"SENDER",default:true};handleRoleLoad(){if(this.selectedRole.default){if(this.roles.length>0){const e=this.roles.find((e=>e.signerIndex===1));if(e){this.selectedRole={...e,default:false}}}}else{const e=this.roles.find((e=>e.signerIndex===this.selectedRole.signerIndex));if(e){this.selectedRole={...e,default:false}}}}roles=[];isOpen=false;toggleDropdown=()=>{this.isOpen=!this.isOpen};roleChange;addParticipant;selectRole(e){this.selectedRole={...e,default:false};this.isOpen=false;this.roleChange.emit(e.signerIndex)}createHandler(){this.addParticipant.emit({type:"SIGNER"})}render(){return h(Host,{key:"09e119f89d40ae2f0c697ea6721a76a5d6e1e131"},h("div",{key:"b9b09c3702d6571572040780cff601ac6d4746c6",class:"dropdown"},h("div",{key:"e73286da66a604ebcd2aa3923730b0304726abd9",class:"dropdown-header",onClick:this.toggleDropdown},h("svg",{key:"c7d43f1e1153ee47c7512863497a93ddd9cbe013",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"e7020a015d4ba9df000578c37f296f7638c7d700",d:"M4 0.5H6.5C8.433 0.5 10 2.067 10 4V6.5C10 8.433 8.433 10 6.5 10H4C2.067 10 0.5 8.433 0.5 6.5V4C0.5 2.067 2.067 0.5 4 0.5Z",fill:"#78A3FA",stroke:"#F7F8FA"}),h("path",{key:"077b0ea3f1672163c0037f7ae6203ce8431ba71f",d:"M13.5 0.5H16C17.933 0.5 19.5 2.067 19.5 4V6.5C19.5 8.433 17.933 10 16 10H13.5C11.567 10 10 8.433 10 6.5V4C10 2.067 11.567 0.5 13.5 0.5Z",fill:"#46DBAA",stroke:"#F7F8FA"}),h("path",{key:"5595e1cd44919f359aada27b6d3d1b0ce4653610",d:"M4 10H6.5C8.433 10 10 11.567 10 13.5V16C10 17.933 8.433 19.5 6.5 19.5H4C2.067 19.5 0.5 17.933 0.5 16V13.5C0.5 11.567 2.067 10 4 10Z",fill:"#FAD232",stroke:"#F7F8FA"}),h("path",{key:"98b25a1bb30fc8e1c7e70b72936b7a3cbca7af33",d:"M14.75 12.125V14.75M14.75 14.75V17.375M14.75 14.75H17.375M14.75 14.75L12.125 14.75",stroke:"#939599","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),h("p",{key:"eae872f3ba394aadf53092194169c75997e9d53b",class:"placing-fields-text"},"Placing Fields for"),h("div",{key:"15f4384297e0e1789a15eb61db66898782a86dbc",class:"selected-role-label",style:{background:defaultRolePalette[this.selectedRole?.signerIndex%100].s20,color:defaultRolePalette[this.selectedRole?.signerIndex%100].s80}},h("ls-icon",{key:"2cd944cb7f0ca493970032faefd7f3750d580837",size:"18",name:this.selectedRole?.roleType==="SENDER"?"user":this.selectedRole?.roleType==="APPROVER"?"check-circle":this.selectedRole?.roleType==="WITNESS"?"eye":"signature"}),this.selectedRole.name||(this.selectedRole.roleType==="WITNESS"?`Witness`:`Participant ${this.selectedRole.signerIndex}`)),h("button",{key:"f339ed045bb0c6af9d2bff3304f7cf4b50721788",class:"tertiaryGrey expand-button","aria-haspopup":"listbox","aria-expanded":this.isOpen},h("ls-icon",{key:"960f7998fa7d3144c3e33381e843a0cd03ea7ffe",name:"chevron-down"}))),this.isOpen&&h("div",{key:"b6229b4379b54c37af8089f43f647b724e426e23",class:"dropdown-list"},h("div",{key:"d8804bf89d2ffc11fc5ab00acf7eb1cef22c2171",class:this.selectedRole?.signerIndex===0?"dropdown-item selected":"dropdown-item",style:{"--background-selected":defaultRolePalette[0].s10,"--check-icon-selected":defaultRolePalette[0].s50},onClick:()=>this.selectRole({signerIndex:0,name:"Sender",roleType:"SENDER"}),onMouseEnter:e=>e.currentTarget.querySelector(".check-icon")?.setAttribute("name","check-circle"),onMouseLeave:e=>e.currentTarget.querySelector(".check-icon")?.setAttribute("name",this.selectedRole?.signerIndex!==0?"base-circle":"check-circle")},h("div",{key:"367089f2590b8227a069bcb3d76cf72d22fe2344",class:"role-icon",style:{background:defaultRolePalette[0].s50,color:defaultRolePalette[0].s80}},h("ls-icon",{key:"c331ed982fc98742e132d77203edf13347f67ea2",name:"user"})),h("div",{key:"8f9c45b3ce947d3384a45070b776ee455fb21d0d",class:"role-text"},h("p",{key:"6f3a1a221e88bbed1d6d529879f271cb6141637c",class:"role-name",style:{"--role-name-selected":defaultRolePalette[0].s80}},"Sender"),h("p",{key:"11d54a7e2c98fdc647ed46ffd2ea10635b7f65b9",class:"role-type",style:{"--role-type-selected":defaultRolePalette[0].s80}},"You")),h("ls-icon",{key:"fa0d74d068b082ccd9baa728c144d27da31aa54e",class:"check-icon",name:this.selectedRole?.signerIndex===0?"check-circle":"base-circle",solid:this.selectedRole?.signerIndex===0})),this.roles.map((e=>h("div",{class:e.signerIndex===this.selectedRole?.signerIndex?"dropdown-item selected":"dropdown-item",style:{"--background-selected":defaultRolePalette[e?.signerIndex%100].s10,"--check-icon-selected":defaultRolePalette[e?.signerIndex%100].s50},onClick:()=>this.selectRole(e),onMouseEnter:e=>e.currentTarget.querySelector(".check-icon")?.setAttribute("name","check-circle"),onMouseLeave:t=>t.currentTarget.querySelector(".check-icon")?.setAttribute("name",e.signerIndex!==this.selectedRole?.signerIndex?"base-circle":"check-circle")},h("div",{class:"role-icon",style:{background:e.signerIndex>100?defaultRolePalette[e?.signerIndex%100].s30:defaultRolePalette[e?.signerIndex%100].s40,color:defaultRolePalette[e?.signerIndex%100].s90}},h("ls-icon",{name:e.roleType==="WITNESS"?"eye":e.roleType==="APPROVER"?"check-circle":"signature"})),h("div",{class:"role-text"},h("p",{class:"role-name",style:{"--role-name-selected":defaultRolePalette[e?.signerIndex%100].s100}},e.name||(e.signerIndex>100?`Participant ${e.signerIndex-100} Witness`:`Participant ${e.signerIndex}`)),h("p",{class:"role-type",style:{"--role-type-selected":defaultRolePalette[e?.signerIndex%100].s80}},e.roleType==="WITNESS"?"Witness":e.roleType==="APPROVER"?"Approver":"Signer")),h("ls-icon",{class:"check-icon",name:e.signerIndex===this.selectedRole?.signerIndex?"check-circle":"base-circle",solid:e.signerIndex===this.selectedRole?.signerIndex})))),h("button",{key:"9ce97692f5946edce1bf20876aba6a257aa75aa3",onClick:()=>this.createHandler(),class:"add-participant-row",style:{"--background-selected":defaultRolePalette[1].s10,"--check-icon-selected":defaultRolePalette[1].s50}},h("div",{key:"6986fb8bd1d4978aec4369a549eb4eb6e2300c5c",class:"add-participant-icon"},h("ls-icon",{key:"f0fdeccc4489d510ddcfcb39c54e674287d9396b",name:"user-add"})),h("div",{key:"c3a16b3fccbd5bd4e3d1e30eaf392023ed1382b0",class:"role-text"},h("p",{key:"f663b8c5885f095fde20e204301d0c692f84bb12",class:"role-name"},"Add Participant"),h("p",{key:"db7fadcf03020994b10f5b709f74e9b780e73b60",class:"role-type"},"Add a new Signer")),h("ls-icon",{key:"d9baf06a920f373d651e09dcc4468b50648d742d",class:"plus-icon",name:"plus"})))),h("slot",{key:"185c090b40670cd0ce1b9ddda3b82d20e08aae92"}))}static get watchers(){return{roles:["handleRoleLoad"]}}};LsParticipantSelect.style=lsParticipantSelectCss;const lsPropsSectionCss="*{margin:0;box-sizing:border-box}.ls-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.row{flex-direction:row;align-items:center;justify-content:space-between}.ls-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6c6e73);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}";const LsPropsSection=class{constructor(e){registerInstance(this,e)}sectionTitle;sectionDescription;row=false;render(){return h(Host,{key:"9043f4212d573cb7cae6024f0288d3589cab16ca"},h("div",{key:"73ad46475e8a1b84f775cf50ef38d96856c845ad",class:this.row?"ls-field-properties-section row":"ls-field-properties-section"},h("div",{key:"a259ac2223024e3b68e24956ac050afd1ed8ad6a",class:"ls-field-properties-section-text"},h("p",{key:"c649eeccdd07ed13d7761a7390737a7f1b27f476",class:"ls-field-properties-section-title"},this.sectionTitle),this.sectionDescription&&h("p",{key:"668ec0fbf1c9b036bbaf71469862872da1858c5e",class:"ls-field-properties-section-description"},this.sectionDescription)),h("slot",{key:"7537449cd511e7fa223c06f96b983ce69a9f6cf8"})))}};LsPropsSection.style=lsPropsSectionCss;const lsStatusbarCss=':host{position:fixed;z-index:1000;right:1rem;bottom:1rem;display:flex;flex-direction:row;background-color:white;border:1px solid var(--gray-30, #e0e2e5);box-shadow:0px 4px 16px rgba(0, 0, 0, 0.1);border-radius:1rem}*{margin:0;padding:0;box-sizing:border-box}.status-bar-section{display:flex;flex-direction:row;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem}:host>:not(:nth-child(2)){border-left:1px solid var(--gray-30, #e0e2e5)}button{border:0}button:hover{color:var(--gray-100, #45484d);border-radius:0.5rem}input[type="range"]{-webkit-appearance:none;width:100%;height:8px;background:var(--gray-20, #EDEFF2);border-radius:5px;outline:none}input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:8px;height:8px;background:var(--gray-70, #4a4c51);border-radius:50%;cursor:pointer}input[type="range"]::-moz-range-thumb{width:8px;height:8%;background:var(--gray-70, #4a4c51);border:none;border-radius:50%;cursor:pointer}input[type="range"]::-moz-range-track{background:var(--gray-20, #EDEFF2);height:8px;border-radius:5px}input[type="range"]::-webkit-slider-runnable-track{background:var(--gray-20, #EDEFF2);height:8px;border-radius:5px}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}button{all:unset;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--gray-80, #6c6e73);text-transform:capitalize}button.tertiaryGrey:hover{background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}';const LsStatusbar=class{constructor(e){registerInstance(this,e)}get component(){return getElement(this)}zoom;editor;setZoom(e){this.editor.setZoom(e);this.zoom=e}handleZoomInput(){const e=this.component.shadowRoot.getElementById("zoomRange");debounce$1(this.setZoom(parseInt(e.value)/100),700)}fitWidth(){const e=this.editor.component.shadowRoot.getElementById("ls-left-box");const t=window.screen.width-e.clientWidth-60;console.log("Space width:",t,"Page width:",this.editor.pageDimensions[0].width);const r=t/this.editor.pageDimensions[0].width;console.log(Math.round(r*100)/100);this.setZoom(Math.round(r*100)/100)}fitHeight(){const e=window.screen.height-40;const t=e/this.editor.pageDimensions[0].height;this.setZoom(Math.round(t*100)/100)}componentDidLoad(){this.zoom=this.editor.zoom}render(){return h(Host,{key:"15a8b80e0369f9cdc3aff504f55bd07532b4e84f"},h("div",{key:"8751d694e48ad6a50884e7e3f5e0df0c6701a038",class:"status-bar-section"},h("button",{key:"f4e0fefd2cf41b69cb43275b25f075433df458cc",onClick:()=>this.setZoom(this.editor.zoom*.8)},h("ls-icon",{key:"f1ae6d4f151224ea7eb2b5dfa95561800170b7de",name:"zoom-out"})),h("div",{key:"4e77bc96db5d08d97f055b495322e7b686d407ca"},h("input",{key:"b830130e346460f996ddc47b4ef4b15552168bcd",type:"range",min:"1",max:"300",value:this.zoom*100,class:"slider",id:"zoomRange",onInput:()=>this.handleZoomInput()})),h("button",{key:"4370bd3b174429b1d042f0d39679f063c7580f95",onClick:()=>this.setZoom(this.editor.zoom/.8)},h("ls-icon",{key:"dbc5d848170851a631e17ae481804f21e9f29a21",name:"zoom-in"}))),h("div",{key:"df68e41014aa2c5580cfcf1fa6e6338603865d9c",class:"status-bar-section"},h("button",{key:"40a8cade12b425c7802c6e4b6f89f8b91e7bc4aa",onClick:()=>this.fitWidth()},h("ls-icon",{key:"09fba9f625fc24c11264a1654d018e67bbd8529b",name:"fit-width"})),h("button",{key:"85e20a709e23259bf56b0c2e282ba83571dec6b4",onClick:()=>this.fitHeight()},h("ls-icon",{key:"63d499fc88f5714628ba9057c7ac40e8ea1cd315",name:"fit-height"}))),this.editor?._template?.pageCount>1&&h("div",{key:"bdebf6dc045d3251039a354b781c6dd972296b25",class:"status-bar-section"},h("button",{key:"cd173c3857786e946ec125f1ac9adf9621ea6863",onClick:()=>{this.editor.pagePrev()}},h("ls-icon",{key:"8cd55d22e01c8d9c89dadcb205194e04fba1118c",name:"chevron-left"})),h("p",{key:"21de4f4cfdd2cb567e99d8d676da10303c245245"},this.editor?.pageNum," / ",this.editor?._template?.pageCount),h("button",{key:"71786b066ad6e4287a12f20873845d3bc28de90a",onClick:()=>{this.editor.pageNext()}},h("ls-icon",{key:"139c259fe653ea229c2d099f467f9b67bfbe28de",name:"chevron-right"}))),h("slot",{key:"4b09d328c1f6be78b858cfa832eb1e6849df49d9"}))}};LsStatusbar.style=lsStatusbarCss;const lsToggleCss=":host{display:block}.switch{position:relative;display:inline-block;width:2.75rem;height:1.5rem}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--gray-20, #edeff2);-webkit-transition:0.4s;transition:0.4s}.indeterminate{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--primary-60, #4456f6);-webkit-transition:0.4s;transition:0.4s}.slider:before{position:absolute;content:'';height:1.25rem;width:1.25rem;left:0.125rem;bottom:0.125rem;background-color:white;-webkit-transition:0.4s;transition:0.4s}.indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.75rem;height:0.125rem;background-color:white}input:checked+.slider{background-color:var(--primary-60, #4456f6)}input:focus+.slider{box-shadow:0 0 1px var(--primary-60, #4456f6);outline:4px solid var(--primary-20, #e3e6ff)}input:checked+.slider:before{-webkit-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);transform:translateX(1.25rem)}.slider.round,.indeterminate.round{border-radius:34px}.slider.round:before{border-radius:50%}";const LsToggle=class{constructor(e){registerInstance(this,e);this.valueChange=createEvent(this,"valueChange")}checked;indeterminate;valueChange;changeHandler(e){this.valueChange.emit(e)}render(){return h(Host,{key:"9a4d61443f92bf65fddf05407f91a01285ccf19f"},h("label",{key:"c2bbd322dfdb1e82a99139a412ea1bbed311c92b",class:"switch"},h("input",{key:"ffbbda8820f8d42dc316ec873e1d2f1063bceedc",type:"checkbox",checked:this.checked,onChange:e=>{this.changeHandler(e.target.checked)}}),h("span",{key:"c5952ebb13c18765abb406ec0916eb26d3db51a2",class:`${this.indeterminate?"indeterminate":"slider"} round`})),h("slot",{key:"cae29b87763a90bd1b2b3f029fff63223aa4020f"}))}};LsToggle.style=lsToggleCss;const lsToolbarCss=":host{position:absolute;top:1rem;left:50%;transform:translateX(-50%);display:flex;width:100%;align-items:center;justify-content:center;padding:0.375rem;gap:0.5rem;width:fit-content;border-radius:1rem;border:1px solid var(--gray-20, #edeff2);background:var(--white, #fff);z-index:1000;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsToolbar=class{constructor(e){registerInstance(this,e);this.mutate=createEvent(this,"mutate");this.update=createEvent(this,"update")}get component(){return getElement(this)}dataItem;groupInfo;template;editor;mutate;update;alter(e){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t);this.update.emit(t)}render(){return h(Host,{key:"4a3a8c5f0ae97dae39e77134409ceeb585cc8ed2"},this.dataItem&&this.dataItem.length>1?h("div",{class:"rowbox"},h("ls-field-format",{dataItem:this?.dataItem})):h("div",{class:"rowbox"},h("ls-field-format",{dataItem:this?.dataItem,style:{visibility:this.dataItem&&this.dataItem.length===1?"visible":"hidden"}}),h("ls-participant-select",{id:"ls-participant-select",roles:this.template?.roles,style:{display:this.dataItem&&this.dataItem.length===1?"none":"block"}})),h("slot",{key:"acaf72f6d91de81ca677fbf60f7ec769cb6b1bef"}))}};LsToolbar.style=lsToolbarCss;const lsToolboxFieldCss=".ls-toolbox-field{display:flex;padding:0.5rem;align-items:center;justify-content:center;gap:0.875rem;border-radius:1rem;border:1px solid var(--gray-20, #edeff2);background:white;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-toolbox-field:hover{background:var(--gray-10, #f7f8fa);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);border:1px solid var(--gray-30, #e0e2e5)}.toolbox-field-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.5rem;border:1px solid var(--signer-color);background:var(--signer-color-light);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1);color:var(--signer-color)}.toolbox-field-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;width:100%;margin:0}p{color:var(--gray-80, #6c6e73);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:36px}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type='checkbox']{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type='checkbox']:checked,input[type='checkbox'].indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type='checkbox']:checked::after{content:'';position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type='checkbox'].indeterminate::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type='checkbox']:checked:hover,input[type='checkbox'].indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type='checkbox']:hover{border:1px solid #9ca3af}input[type='checkbox']:focus,input[type='checkbox']:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type='checkbox']:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type='checkbox']:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}";const LsToolboxField=class{constructor(e){registerInstance(this,e);this.selected=createEvent(this,"selected")}formElementType;elementType;validation=0;label;icon;defaultHeight;defaultWidth;signer=0;isSelected=false;selected;modeHandler(e){if(e){this.selected.emit(this.formElementType)}}handleDragStart(e){e.dataTransfer.setData("application/json",JSON.stringify({formElementType:this.formElementType,elementType:this.elementType,validation:this.validation,defaultHeight:this.defaultHeight,defaultWidth:this.defaultWidth}));e.dataTransfer.dropEffect="copy"}handleKeyDown(e){if(e.key==="ArrowDown"){console.log("down arrow pressed")}}render(){return h(Host,{key:"46c05581e53608ba17ccf3c50edb3e8097028b55",draggable:"true"},h("div",{key:"5f79fae515d92d0d13473cd487a0b9085f8bb093",class:"ls-toolbox-field",style:this.isSelected&&{background:defaultRolePalette[this.signer%100].s10,border:`1px solid ${defaultRolePalette[this.signer%100].s60}`,color:defaultRolePalette[this.signer%100].s80,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);`},onClick:()=>this.isSelected=!this.isSelected},h("div",{key:"7b8a2967e8e3406760944cf663edc152e4a7c12c",class:"toolbox-field-icon",style:{"--signer-color-light":defaultRolePalette[this.signer%100].s10,"--signer-color":defaultRolePalette[this.signer%100].s60}},h("ls-icon",{key:"e0ec95278d08e643544297d3f5aa26b66c3f9223",name:this.icon,size:"20"})),h("p",{key:"e5be2362129ffd4e44eba9a5530c6a9d3693561f",class:"toolbox-field-label",style:this.isSelected&&{color:defaultRolePalette[this.signer%100].s80}},this.label),h("ls-icon",{key:"287b53ec216fe60b87c6b2f69ccc3e81795d011f",name:"drag-vertical",size:"16",color:"#787a80"})))}static get watchers(){return{isSelected:["modeHandler"]}}};LsToolboxField.style=lsToolboxFieldCss;const min=Math.min;const max=Math.max;const round=Math.round;const createCoords=e=>({x:e,y:e});const oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};const oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,r){return max(e,min(t,r))}function evaluate(e,t){return typeof e==="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(e){return yAxisSides.has(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,r){if(r===void 0){r=false}const i=getAlignment(e);const o=getAlignmentAxis(e);const n=getAxisLength(o);let s=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";if(t.reference[n]>t.floating[n]){s=getOppositePlacement(s)}return[s,getOppositePlacement(s)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,(e=>oppositeAlignmentMap[e]))}const lrPlacement=["left","right"];const rlPlacement=["right","left"];const tbPlacement=["top","bottom"];const btPlacement=["bottom","top"];function getSideList(e,t,r){switch(e){case"top":case"bottom":if(r)return t?rlPlacement:lrPlacement;return t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,r,i){const o=getAlignment(e);let n=getSideList(getSide(e),r==="start",i);if(o){n=n.map((e=>e+"-"+o));if(t){n=n.concat(n.map(getOppositeAlignmentPlacement))}}return n}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(e=>oppositeSideMap[e]))}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!=="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:r,width:i,height:o}=e;return{width:i,height:o,top:r,left:t,right:t+i,bottom:r+o,x:t,y:r}}function computeCoordsFromPlacement(e,t,r){let{reference:i,floating:o}=e;const n=getSideAxis(t);const s=getAlignmentAxis(t);const l=getAxisLength(s);const a=getSide(t);const d=n==="y";const c=i.x+i.width/2-o.width/2;const h=i.y+i.height/2-o.height/2;const u=i[l]/2-o[l]/2;let f;switch(a){case"top":f={x:c,y:i.y-o.height};break;case"bottom":f={x:c,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:h};break;case"left":f={x:i.x-o.width,y:h};break;default:f={x:i.x,y:i.y}}switch(getAlignment(t)){case"start":f[s]-=u*(r&&d?-1:1);break;case"end":f[s]+=u*(r&&d?-1:1);break}return f}const computePosition$1=async(e,t,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:n=[],platform:s}=r;const l=n.filter(Boolean);const a=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o});let{x:c,y:h}=computeCoordsFromPlacement(d,i,a);let u=i;let f={};let p=0;for(let r=0;r<l.length;r++){const{name:n,fn:g}=l[r];const{x:v,y:C,data:m,reset:w}=await g({x:c,y:h,initialPlacement:i,placement:u,strategy:o,middlewareData:f,rects:d,platform:s,elements:{reference:e,floating:t}});c=v!=null?v:c;h=C!=null?C:h;f={...f,[n]:{...f[n],...m}};if(w&&p<=50){p++;if(typeof w==="object"){if(w.placement){u=w.placement}if(w.rects){d=w.rects===true?await s.getElementRects({reference:e,floating:t,strategy:o}):w.rects}({x:c,y:h}=computeCoordsFromPlacement(d,u,a))}r=-1}}return{x:c,y:h,placement:u,strategy:o,middlewareData:f}};async function detectOverflow(e,t){var r;if(t===void 0){t={}}const{x:i,y:o,platform:n,rects:s,elements:l,strategy:a}=e;const{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=false,padding:f=0}=evaluate(t,e);const p=getPaddingObject(f);const g=h==="floating"?"reference":"floating";const v=l[u?g:h];const C=rectToClientRect(await n.getClippingRect({element:((r=await(n.isElement==null?void 0:n.isElement(v)))!=null?r:true)?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:d,rootBoundary:c,strategy:a}));const m=h==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference;const w=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating));const b=await(n.isElement==null?void 0:n.isElement(w))?await(n.getScale==null?void 0:n.getScale(w))||{x:1,y:1}:{x:1,y:1};const y=rectToClientRect(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:w,strategy:a}):m);return{top:(C.top-y.top+p.top)/b.y,bottom:(y.bottom-C.bottom+p.bottom)/b.y,left:(C.left-y.left+p.left)/b.x,right:(y.right-C.right+p.right)/b.x}}const arrow$1=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:o,rects:n,platform:s,elements:l,middlewareData:a}=t;const{element:d,padding:c=0}=evaluate(e,t)||{};if(d==null){return{}}const h=getPaddingObject(c);const u={x:r,y:i};const f=getAlignmentAxis(o);const p=getAxisLength(f);const g=await s.getDimensions(d);const v=f==="y";const C=v?"top":"left";const m=v?"bottom":"right";const w=v?"clientHeight":"clientWidth";const b=n.reference[p]+n.reference[f]-u[f]-n.floating[p];const y=u[f]-n.reference[f];const x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let k=x?x[w]:0;if(!k||!await(s.isElement==null?void 0:s.isElement(x))){k=l.floating[w]||n.floating[p]}const M=b/2-y/2;const L=k/2-g[p]/2-1;const H=min(h[C],L);const V=min(h[m],L);const A=H;const Z=k-g[p]-V;const S=k/2-g[p]/2+M;const O=clamp(A,S,Z);const T=!a.arrow&&getAlignment(o)!=null&&S!==O&&n.reference[p]/2-(S<A?H:V)-g[p]/2<0;const B=T?S<A?S-A:S-Z:0;return{[f]:u[f]+B,data:{[f]:O,centerOffset:S-O-B,...T&&{alignmentOffset:B}},reset:T}}});const flip$1=function(e){if(e===void 0){e={}}return{name:"flip",options:e,async fn(t){var r,i;const{placement:o,middlewareData:n,rects:s,initialPlacement:l,platform:a,elements:d}=t;const{mainAxis:c=true,crossAxis:h=true,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=true,...v}=evaluate(e,t);if((r=n.arrow)!=null&&r.alignmentOffset){return{}}const C=getSide(o);const m=getSideAxis(l);const w=getSide(l)===l;const b=await(a.isRTL==null?void 0:a.isRTL(d.floating));const y=u||(w||!g?[getOppositePlacement(l)]:getExpandedPlacements(l));const x=p!=="none";if(!u&&x){y.push(...getOppositeAxisPlacements(l,g,p,b))}const k=[l,...y];const M=await detectOverflow(t,v);const L=[];let H=((i=n.flip)==null?void 0:i.overflows)||[];if(c){L.push(M[C])}if(h){const e=getAlignmentSides(o,s,b);L.push(M[e[0]],M[e[1]])}H=[...H,{placement:o,overflows:L}];if(!L.every((e=>e<=0))){var V,A;const e=(((V=n.flip)==null?void 0:V.index)||0)+1;const t=k[e];if(t){const r=h==="alignment"?m!==getSideAxis(t):false;if(!r||H.every((e=>getSideAxis(e.placement)===m?e.overflows[0]>0:true))){return{data:{index:e,overflows:H},reset:{placement:t}}}}let r=(A=H.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])==null?void 0:A.placement;if(!r){switch(f){case"bestFit":{var Z;const e=(Z=H.filter((e=>{if(x){const t=getSideAxis(e.placement);return t===m||t==="y"}return true})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])==null?void 0:Z[0];if(e){r=e}break}case"initialPlacement":r=l;break}}if(o!==r){return{reset:{placement:r}}}}return{}}}};const originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:r,platform:i,elements:o}=e;const n=await(i.isRTL==null?void 0:i.isRTL(o.floating));const s=getSide(r);const l=getAlignment(r);const a=getSideAxis(r)==="y";const d=originSides.has(s)?-1:1;const c=n&&a?-1:1;const h=evaluate(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};if(l&&typeof p==="number"){f=l==="end"?p*-1:p}return a?{x:f*c,y:u*d}:{x:u*d,y:f*c}}const offset$1=function(e){if(e===void 0){e=0}return{name:"offset",options:e,async fn(t){var r,i;const{x:o,y:n,placement:s,middlewareData:l}=t;const a=await convertValueToCoords(t,e);if(s===((r=l.offset)==null?void 0:r.placement)&&(i=l.arrow)!=null&&i.alignmentOffset){return{}}return{x:o+a.x,y:n+a.y,data:{...a,placement:s}}}}};const shift$1=function(e){if(e===void 0){e={}}return{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:o}=t;const{mainAxis:n=true,crossAxis:s=false,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...a}=evaluate(e,t);const d={x:r,y:i};const c=await detectOverflow(t,a);const h=getSideAxis(getSide(o));const u=getOppositeAxis(h);let f=d[u];let p=d[h];if(n){const e=u==="y"?"top":"left";const t=u==="y"?"bottom":"right";const r=f+c[e];const i=f-c[t];f=clamp(r,f,i)}if(s){const e=h==="y"?"top":"left";const t=h==="y"?"bottom":"right";const r=p+c[e];const i=p-c[t];p=clamp(r,p,i)}const g=l.fn({...t,[u]:f,[h]:p});return{...g,data:{x:g.x-r,y:g.y-i,enabled:{[u]:n,[h]:s}}}}}};function hasWindow(){return typeof window!=="undefined"}function getNodeName(e){if(isNode(e)){return(e.nodeName||"").toLowerCase()}return"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){if(!hasWindow()){return false}return e instanceof Node||e instanceof getWindow(e).Node}function isElement(e){if(!hasWindow()){return false}return e instanceof Element||e instanceof getWindow(e).Element}function isHTMLElement(e){if(!hasWindow()){return false}return e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement}function isShadowRoot(e){if(!hasWindow()||typeof ShadowRoot==="undefined"){return false}return e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!invalidOverflowDisplayValues.has(o)}const tableElements=new Set(["table","td","th"]);function isTableElement(e){return tableElements.has(getNodeName(e))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(e){return topLayerSelectors.some((t=>{try{return e.matches(t)}catch(e){return false}}))}const transformProperties=["transform","translate","scale","rotate","perspective"];const willChangeValues=["transform","translate","scale","rotate","perspective","filter"];const containValues=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit();const r=isElement(e)?getComputedStyle$1(e):e;return transformProperties.some((e=>r[e]?r[e]!=="none":false))||(r.containerType?r.containerType!=="normal":false)||!t&&(r.backdropFilter?r.backdropFilter!=="none":false)||!t&&(r.filter?r.filter!=="none":false)||willChangeValues.some((e=>(r.willChange||"").includes(e)))||containValues.some((e=>(r.contain||"").includes(e)))}function getContainingBlock(e){let t=getParentNode(e);while(isHTMLElement(t)&&!isLastTraversableNode(t)){if(isContainingBlock(t)){return t}else if(isTopLayer(t)){return null}t=getParentNode(t)}return null}function isWebKit(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(e){return lastTraversableNodeNames.has(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){if(isElement(e)){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}return{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html"){return e}const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);if(isLastTraversableNode(t)){return e.ownerDocument?e.ownerDocument.body:e.body}if(isHTMLElement(t)&&isOverflowElement(t)){return t}return getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,r){var i;if(t===void 0){t=[]}const o=getNearestOverflowAncestor(e);const n=o===((i=e.ownerDocument)==null?void 0:i.body);const s=getWindow(o);if(n){return t.concat(s,s.visualViewport||[],isOverflowElement(o)?o:[],[])}return t.concat(o,getOverflowAncestors(o,[]))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let r=parseFloat(t.width)||0;let i=parseFloat(t.height)||0;const o=isHTMLElement(e);const n=o?e.offsetWidth:r;const s=o?e.offsetHeight:i;const l=round(r)!==n||round(i)!==s;if(l){r=n;i=s}return{width:r,height:i,$:l}}function unwrapElement(e){return!isElement(e)?e.contextElement:e}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t)){return createCoords(1)}const r=t.getBoundingClientRect();const{width:i,height:o,$:n}=getCssDimensions(t);let s=(n?round(r.width):r.width)/i;let l=(n?round(r.height):r.height)/o;if(!s||!Number.isFinite(s)){s=1}if(!l||!Number.isFinite(l)){l=1}return{x:s,y:l}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);if(!isWebKit()||!t.visualViewport){return noOffsets}return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,r){if(t===void 0){t=false}if(!r||t&&r!==getWindow(e)){return false}return t}function getBoundingClientRect(e,t,r,i){if(t===void 0){t=false}if(r===void 0){r=false}const o=e.getBoundingClientRect();const n=unwrapElement(e);let s=createCoords(1);if(t){if(i){if(isElement(i)){s=getScale(i)}}else{s=getScale(e)}}const l=shouldAddVisualOffsets(n,r,i)?getVisualOffsets(n):createCoords(0);let a=(o.left+l.x)/s.x;let d=(o.top+l.y)/s.y;let c=o.width/s.x;let h=o.height/s.y;if(n){const e=getWindow(n);const t=i&&isElement(i)?getWindow(i):i;let r=e;let o=getFrameElement(r);while(o&&i&&t!==r){const e=getScale(o);const t=o.getBoundingClientRect();const i=getComputedStyle$1(o);const n=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x;const s=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;a*=e.x;d*=e.y;c*=e.x;h*=e.y;a+=n;d+=s;r=getWindow(o);o=getFrameElement(r)}}return rectToClientRect({width:c,height:h,x:a,y:d})}function getWindowScrollBarX(e,t){const r=getNodeScroll(e).scrollLeft;if(!t){return getBoundingClientRect(getDocumentElement(e)).left+r}return t.left+r}function getHTMLOffset(e,t){const r=e.getBoundingClientRect();const i=r.left+t.scrollLeft-getWindowScrollBarX(e,r);const o=r.top+t.scrollTop;return{x:i,y:o}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:r,offsetParent:i,strategy:o}=e;const n=o==="fixed";const s=getDocumentElement(i);const l=t?isTopLayer(t.floating):false;if(i===s||l&&n){return r}let a={scrollLeft:0,scrollTop:0};let d=createCoords(1);const c=createCoords(0);const h=isHTMLElement(i);if(h||!h&&!n){if(getNodeName(i)!=="body"||isOverflowElement(s)){a=getNodeScroll(i)}if(isHTMLElement(i)){const e=getBoundingClientRect(i);d=getScale(i);c.x=e.x+i.clientLeft;c.y=e.y+i.clientTop}}const u=s&&!h&&!n?getHTMLOffset(s,a):createCoords(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-a.scrollLeft*d.x+c.x+u.x,y:r.y*d.y-a.scrollTop*d.y+c.y+u.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e);const r=getNodeScroll(e);const i=e.ownerDocument.body;const o=max(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth);const n=max(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-r.scrollLeft+getWindowScrollBarX(e);const l=-r.scrollTop;if(getComputedStyle$1(i).direction==="rtl"){s+=max(t.clientWidth,i.clientWidth)-o}return{width:o,height:n,x:s,y:l}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const r=getWindow(e);const i=getDocumentElement(e);const o=r.visualViewport;let n=i.clientWidth;let s=i.clientHeight;let l=0;let a=0;if(o){n=o.width;s=o.height;const e=isWebKit();if(!e||e&&t==="fixed"){l=o.offsetLeft;a=o.offsetTop}}const d=getWindowScrollBarX(i);if(d<=0){const e=i.ownerDocument;const t=e.body;const r=getComputedStyle(t);const o=e.compatMode==="CSS1Compat"?parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0:0;const s=Math.abs(i.clientWidth-t.clientWidth-o);if(s<=SCROLLBAR_MAX){n-=s}}else if(d<=SCROLLBAR_MAX){n+=d}return{width:n,height:s,x:l,y:a}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(e,t){const r=getBoundingClientRect(e,true,t==="fixed");const i=r.top+e.clientTop;const o=r.left+e.clientLeft;const n=isHTMLElement(e)?getScale(e):createCoords(1);const s=e.clientWidth*n.x;const l=e.clientHeight*n.y;const a=o*n.x;const d=i*n.y;return{width:s,height:l,x:a,y:d}}function getClientRectFromClippingAncestor(e,t,r){let i;if(t==="viewport"){i=getViewportRect(e,r)}else if(t==="document"){i=getDocumentRect(getDocumentElement(e))}else if(isElement(t)){i=getInnerBoundingClientRect(t,r)}else{const r=getVisualOffsets(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const r=getParentNode(e);if(r===t||!isElement(r)||isLastTraversableNode(r)){return false}return getComputedStyle$1(r).position==="fixed"||hasFixedPositionAncestor(r,t)}function getClippingElementAncestors(e,t){const r=t.get(e);if(r){return r}let i=getOverflowAncestors(e,[]).filter((e=>isElement(e)&&getNodeName(e)!=="body"));let o=null;const n=getComputedStyle$1(e).position==="fixed";let s=n?getParentNode(e):e;while(isElement(s)&&!isLastTraversableNode(s)){const t=getComputedStyle$1(s);const r=isContainingBlock(s);if(!r&&t.position==="fixed"){o=null}const l=n?!r&&!o:!r&&t.position==="static"&&!!o&&absoluteOrFixed.has(o.position)||isOverflowElement(s)&&!r&&hasFixedPositionAncestor(e,s);if(l){i=i.filter((e=>e!==s))}else{o=t}s=getParentNode(s)}t.set(e,i);return i}function getClippingRect(e){let{element:t,boundary:r,rootBoundary:i,strategy:o}=e;const n=r==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(r);const s=[...n,i];const l=s[0];const a=s.reduce(((e,r)=>{const i=getClientRectFromClippingAncestor(t,r,o);e.top=max(i.top,e.top);e.right=min(i.right,e.right);e.bottom=min(i.bottom,e.bottom);e.left=max(i.left,e.left);return e}),getClientRectFromClippingAncestor(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function getDimensions(e){const{width:t,height:r}=getCssDimensions(e);return{width:t,height:r}}function getRectRelativeToOffsetParent(e,t,r){const i=isHTMLElement(t);const o=getDocumentElement(t);const n=r==="fixed";const s=getBoundingClientRect(e,true,n,t);let l={scrollLeft:0,scrollTop:0};const a=createCoords(0);function d(){a.x=getWindowScrollBarX(o)}if(i||!i&&!n){if(getNodeName(t)!=="body"||isOverflowElement(o)){l=getNodeScroll(t)}if(i){const e=getBoundingClientRect(t,true,n,t);a.x=e.x+t.clientLeft;a.y=e.y+t.clientTop}else if(o){d()}}if(n&&!i&&o){d()}const c=o&&!i&&!n?getHTMLOffset(o,l):createCoords(0);const h=s.left+l.scrollLeft-a.x-c.x;const u=s.top+l.scrollTop-a.y-c.y;return{x:h,y:u,width:s.width,height:s.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||getComputedStyle$1(e).position==="fixed"){return null}if(t){return t(e)}let r=e.offsetParent;if(getDocumentElement(e)===r){r=r.ownerDocument.body}return r}function getOffsetParent(e,t){const r=getWindow(e);if(isTopLayer(e)){return r}if(!isHTMLElement(e)){let t=getParentNode(e);while(t&&!isLastTraversableNode(t)){if(isElement(t)&&!isStaticPositioned(t)){return t}t=getParentNode(t)}return r}let i=getTrueOffsetParent(e,t);while(i&&isTableElement(i)&&isStaticPositioned(i)){i=getTrueOffsetParent(i,t)}if(i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)){return r}return i||getContainingBlock(e)||r}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent;const r=this.getDimensions;const i=await r(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};const offset=offset$1;const shift=shift$1;const flip=flip$1;const arrow=arrow$1;const computePosition=(e,t,r)=>{const i=new Map;const o={platform,...r};const n={...o.platform,_c:i};return computePosition$1(e,t,{...o,platform:n})};const lsTooltipCss=".tooltip{display:none;position:absolute;border-radius:0.5rem;background:var(--gray-100, #45484d);color:var(--white, #fff);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem;padding:0.5rem 0.75rem;max-width:300px;width:max-content;z-index:1000;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 -1px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);transition:all 0.2s ease}#arrow{position:absolute;background:var(--gray-100, #45484d);width:0.625rem;height:0.625rem;transform:rotate(45deg);border-radius:0.125rem}";const LsTooltip=class{constructor(e){registerInstance(this,e)}get el(){return getElement(this)}referenceElement;placement="top";tooltipEl;tooltipLocked=false;componentDidLoad(){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip");const e=this.el.shadowRoot.querySelector("#arrow");if(!this.tooltipEl||!this.referenceElement)return;const t=()=>{computePosition(this.referenceElement,this.tooltipEl,{placement:this.placement,middleware:[offset(6),flip(),shift({padding:5}),arrow({element:e})]}).then((({x:t,y:r,placement:i,middlewareData:o})=>{Object.assign(this.tooltipEl.style,{left:`${t}px`,top:`${r}px`});const{x:n,y:s}=o.arrow||{};const l={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(e.style,{left:n!=null?`${n}px`:"",top:s!=null?`${s}px`:"",right:"",bottom:"",[l]:"-4px"})}))};const r=()=>{if(this.tooltipLocked)return;this.tooltipEl.style.display="block";t()};const i=()=>{if(this.tooltipLocked)return;this.tooltipEl.style.display="none"};[["mouseenter",r],["mouseleave",i],["focus",r],["blur",i]].forEach((([e,t])=>{this.referenceElement.addEventListener(e,t)}));this.referenceElement.addEventListener("click",(()=>{i();this.tooltipLocked=true;setTimeout((()=>{this.tooltipLocked=false}),500)}))}render(){return h("div",{key:"9daf5991d54ab56094ae8a28203d7b896ce2dd81",class:"tooltip",role:"tooltip"},h("div",{key:"e483907ce2f3ca0ee927f9b1fc116c3d957a575e",id:"arrow"}),h("slot",{key:"176202c5c2d38da7236e6b4519f93cf1d7cc1e87"}))}};LsTooltip.style=lsTooltipCss;const lsValidationTagCss=":host{position:relative}*{box-sizing:border-box;margin:0}.valid-label{display:flex;padding:2px 0.5rem;justify-content:center;align-items:center;gap:0.25rem;border-radius:1rem;font-size:0.75rem;font-style:normal;font-weight:500;line-height:1.25rem;width:fit-content}.valid{background-color:var(--green-30, #9df5d4);color:var(--green-100, #125241)}.invalid{background:var(--yellow-20, #fff3c2);color:var(--yellow-90, #8a3f0e)}.field-counter{display:flex;padding:0.125rem;justify-content:center;align-items:center;border-radius:1rem;font-size:0.625rem;line-height:0.75rem;font-style:normal;font-weight:500;color:var(--yellow-20, #fff3c2);background:#e17100;min-width:1rem}.field-dropdown{position:absolute;top:2rem;right:0;background:white;display:flex;flex-direction:column;gap:0.75rem;width:20rem;padding:1rem;border-radius:1rem;border:1px solid #e5e7eb;background:#fff;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);max-height:20rem;overflow-y:auto;flex-direction:column;align-items:flex-start;z-index:1000}.required-field{position:relative;display:flex;width:100%;justify-content:space-between;align-items:center;gap:0.5rem;border-radius:0.75rem;padding:0.5rem 0.5rem 0.5rem 1rem;background:var(--field-background);color:var(--field-text-color);border:1px solid var(--field-border-color);transition:all 0.1s ease-in-out}.required-field:hover{background:var(--field-background-hover);color:var(--field-text-color-hover);border:1px solid var(--field-border-color-hover);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)}.required-field-items-left{display:flex;gap:0.5rem;align-items:center;width:100%}.required-field-items-left p{font-size:0.875rem;font-style:normal;font-weight:500;line-height:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dot{height:0.5rem;width:0.5rem;border-radius:50%}.role-label{display:flex;padding:2px 3px;justify-content:center;align-items:center;border-radius:0.25rem;font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem;text-transform:capitalize}.dropdown-header h2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;margin-bottom:0.125rem}.dropdown-header p{color:var(--gray-80, #6c6e73);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem;}";const LsValidationTag=class{constructor(e){registerInstance(this,e)}status="Invalid";validationErrors=[];isExpanded=false;validateChange(e){console.log(e)}render(){return h(Host,{key:"81f7243eb9ac2099bac672ce98f26e4da6bb8fed"},h("div",{key:"33e7174b2032cc6282f84b26a4f943e1baac6dd9",class:`valid-label ${this.validationErrors.length===0?"valid":"invalid"}`,onClick:this.validationErrors.length&&(()=>this.isExpanded=!this.isExpanded)},this.validationErrors.length===0?"Ready to Send":`Requires Fields`,this.validationErrors.length>0&&h("div",{key:"6b820c6a30a090d656c5a6a06b66c8c3cda8fa2c",class:"field-counter"},this.validationErrors.length),this.validationErrors.length>0&&h("ls-icon",{key:"b4404382dea2c84c042dd1b330b2f0be823b643e",name:this.isExpanded?"chevron-up":"chevron-down",style:{cursor:"pointer",scale:"0.60",margin:"0 -0.25rem"}})),this.isExpanded&&this.validationErrors.length!==0&&h("div",{key:"eca209963d0acadbef0764909f15bb4a0350f4c6",class:"field-dropdown"},h("div",{key:"5a57240e85f7826049b12bda0f2cbfc72599c6b9",class:"dropdown-header"},h("h2",{key:"34bb3c2fac8a092cc424a4ebdce49137d6dcd384"},"Signature Fields Required"),h("p",{key:"cedda6d0383cd029efdd33fa7edfcd22c0cf65e2"},this.validationErrors.length," ",this.validationErrors.length===1?"Recipient needs a Signature Field":"Recipients need Signature Fields"," placed for them")),this.validationErrors.map(((e,t)=>{const r=e?.role?.signerIndex?e?.role?.signerIndex%100:null;const i=defaultRolePalette[r||e?.element?.signer||0];return h("div",{key:t,class:"required-field",style:{"--field-background":i.s10,"--field-border-color":i.s10,"--field-background-hover":i.s20,"--field-text-color":i.s70,"--field-text-color-hover":i.s80,"--field-border-color-hover":i.s60}},h("div",{class:"required-field-items-left"},h("div",{class:"dot",style:{background:i.s60}}),e?.role&&h("div",{class:"required-field-items-left"},h("p",{style:{color:i.s80}},e.role?.name||`Signer ${e?.role?.signerIndex+1}`),h("div",{class:"role-label",style:{background:i.s30,color:i.s70}},e.role?.roleType.toLowerCase()||`Signer ${e.role?.signerIndex+1}`)),e?.element&&h(h.Fragment,null,h("p",{style:{color:i.s80}},e.role?.name||`${e.element.formElementType} ${e?.element?.label+1}`),h("div",{class:"role-label",style:{background:i.s30,color:i.s70}},e.description))))}))))}static get watchers(){return{validationErrors:["validateChange"]}}};LsValidationTag.style=lsValidationTagCss;export{LsDocumentOptions as ls_document_options,LsDocumentViewer as ls_document_viewer,LsEditorField as ls_editor_field,LsEditorTable as ls_editor_table,LsFeatureColoumn as ls_feature_column,LsFieldAlignment as ls_field_alignment,LsFieldContent as ls_field_content,LsFieldDimensions as ls_field_dimensions,LsFieldDistribute as ls_field_distribute,LsFieldFooter as ls_field_footer,LsFieldFormat as ls_field_format,LsFieldPlacement as ls_field_placement,LsFieldProperties as ls_field_properties,LsFieldPropertiesAdvanced as ls_field_properties_advanced,LsFieldPropertiesAutosign as ls_field_properties_autosign,LsFieldPropertiesContainer as ls_field_properties_container,LsFieldPropertiesDate as ls_field_properties_date,LsFieldPropertiesEmail as ls_field_properties_email,LsFieldPropertiesFile as ls_field_properties_file,LsFieldPropertiesGeneral as ls_field_properties_general,LsFieldPropertiesImage as ls_field_properties_image,LsFieldPropertiesMultiple as ls_field_properties_multiple,LsFieldPropertiesNumber as ls_field_properties_number,LsFieldPropertiesSignature as ls_field_properties_signature,LsFieldPropertiesText as ls_field_properties_text,LsFieldSize as ls_field_size,LsFieldTypeDisplay as ls_field_type_display,LsIcon as ls_icon,LsInputWrapper as ls_input_wrapper,LsPageLoader as ls_page_loader,LsParticipantCard as ls_participant_card,LsParticipantManager as ls_participant_manager,LsParticipantSelect as ls_participant_select,LsPropsSection as ls_props_section,LsStatusbar as ls_statusbar,LsToggle as ls_toggle,LsToolbar as ls_toolbar,LsToolboxField as ls_toolbox_field,LsTooltip as ls_tooltip,LsValidationTag as ls_validation_tag};
|
|
4922
|
-
//# sourceMappingURL=p-
|
|
4922
|
+
//# sourceMappingURL=p-5c27684b.entry.js.map
|