From 9af8fbdcd5244222173a13d1ca7f8cb50c5e2ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sko=C4=8D=C3=ADk?= Date: Mon, 19 Apr 2021 13:05:35 +0200 Subject: [PATCH] update dist, v1.1.0 --- dist/svelecte.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/svelecte.mjs b/dist/svelecte.mjs index 9c4b093..3bfd8f6 100644 --- a/dist/svelecte.mjs +++ b/dist/svelecte.mjs @@ -1 +1 @@ -function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function o(e){return"function"==typeof e}function l(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function r(e,t,n){e.$$.on_destroy.push(s(t,n))}function a(e,t,n,i){if(e){const o=c(e,t,n,i);return e[0](o)}}function c(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function d(e,t,n,i,o,l,s){const r=function(e,t,n,i){if(e[2]&&i){const o=e[2](i(n));if(void 0===t.dirty)return o;if("object"==typeof o){const e=[],n=Math.max(t.dirty.length,o.length);for(let i=0;ie.removeEventListener(t,n,i)}function w(e){return function(t){return t.preventDefault(),e.call(this,t)}}function S(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function z(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function I(e,t){e.value=null==t?"":t}let C,A;function k(){if(void 0===C){C=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){C=!0}}return C}function O(e,t,n){e.classList[n?"add":"remove"](t)}class E{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=b(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t{const i=e.$$.callbacks[t];if(i){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach(t=>{t.call(e,o)})}}}function P(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(e=>e(t))}const V=[],H=[],_=[],R=[],j=Promise.resolve();let N=!1;function B(){N||(N=!0,j.then(K))}function q(){return B(),j}function G(e){_.push(e)}let W=!1;const U=new Set;function K(){if(!W){W=!0;do{for(let e=0;e{X.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}const ne="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ie(e,t){te(e,1,1,()=>{t.delete(e.key)})}function oe(e){e&&e.c()}function le(e,n,l,s){const{fragment:r,on_mount:a,on_destroy:c,after_update:d}=e.$$;r&&r.m(n,l),s||G(()=>{const n=a.map(t).filter(o);c?c.push(...n):i(n),e.$$.on_mount=[]}),d.forEach(G)}function se(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function re(t,o,l,s,r,a,c=[-1]){const d=A;T(t);const u=t.$$={fragment:null,ctx:null,props:a,update:e,not_equal:r,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:o.context||[]),callbacks:n(),dirty:c,skip_bound:!1};let h=!1;if(u.ctx=l?l(t,o.props||{},(e,n,...i)=>{const o=i.length?i[0]:n;return u.ctx&&r(u.ctx[e],u.ctx[e]=o)&&(!u.skip_bound&&u.bound[e]&&u.bound[e](o),h&&function(e,t){-1===e.$$.dirty[0]&&(V.push(e),B(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var ce=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};ce.prototype.tokenize=function(e,t){if(!(e=pe(String(e||"").toLowerCase()))||!e.length)return[];var n,i,o,l,s=[],r=e.split(/ +/);for(n=0,i=r.length;n0)&&i.items.push({score:n,id:o})})):s.iterator(s.items,(function(e,t){i.items.push({score:1,id:t})})),(o=s.getSortFunction(i,t))&&i.items.sort(o),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var de=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e(t=ge(String(t||"")))?1:t>e?-1:0},ue=function(e,t){var n,i,o,l;for(n=1,i=arguments.length;ne).forEach(e=>{ye(xe,e)}),xe.outerHTML}xe.className="sv-item-content";const ye=function(e,t){let n=0;if(3===e.nodeType){const i=ge(e.data);let o=i.indexOf(t);if(o-=i.substr(0,o).toUpperCase().length-i.substr(0,o).length,o>=0){const i=document.createElement("span");i.className="highlight";const l=e.splitText(o);l.splitText(t.length);const s=l.cloneNode(!0);i.appendChild(s),l.parentNode.replaceChild(i,l),n=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var i=0;il.includes(e)).concat([Object.keys(e)[n]]).shift()}return o}const Se={valueField:null,labelField:null,required:!1,placeholder:"Select",searchable:!0,disabled:!1,clearable:!1,selectOnTab:!1,multiple:!1,max:0,collapseSelection:!1,name:null,creatable:!1,creatablePrefix:"*",delimiter:",",virtualList:!1,vlItemSize:null,vlHeight:null,sortRemoteResults:!0,i18n:{empty:"No options",nomatch:"No matching options",max:e=>`Maximum items ${e} selected`,fetchBefore:"Type to search",fetchEmpty:"No data related to your search",collapsedSelection:e=>e+" selected"},collapseSelectionFn:function(e,t){return Se.i18n.collapsedSelection(e)}},ze=[];function Ie(t,n=e){let i;const o=[];function s(e){if(l(t,e)&&(t=e,i)){const e=!ze.length;for(let e=0;e{const e=o.indexOf(a);-1!==e&&o.splice(e,1),0===o.length&&(i(),i=null)}}}}function Ce(e,t){const n=e.reduce((e,n,i)=>t.isOptionArray?(e.push({[t.valueField]:i,[t.labelField]:n}),e):n.options&&n.options.length?(t.optionsWithGroups=!0,e.push({label:n.label,$isGroupHeader:!0}),e.push(...n.options.map(e=>(e.$isGroupItem=!0,e))),e):(e.push(n),e),[]);return function(e,t){t.isOptionArray&&(t.optionProps||(t.optionProps=["value","label"]));e.some(e=>!e.$isGroupHeader&&(t.optionProps=function(e){e.options&&(e=e.options[0]);const t=["isSelected","isDisabled","selected","disabled","$isGroupHeader","$isGroupItem"];return Object.keys(e).filter(e=>!t.includes(e))}(e),!0))}(n,t),n}function Ae(t){let n,o,l,s,r,a,c,d;return{c(){n=b("input"),l=x(),s=b("div"),r=v(t[8]),S(n,"type","text"),S(n,"class","inputBox svelte-mtw92l"),n.disabled=t[1],n.readOnly=o=!t[0],S(n,"style",t[9]),S(n,"placeholder",t[5]),S(s,"class","shadow-text svelte-mtw92l"),G(()=>t[24].call(s))},m(e,i){var o;f(e,n,i),t[22](n),I(n,t[6]),f(e,l,i),f(e,s,i),p(s,r),a=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const n=b("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const i=k();let o;return i?(n.src="data:text/html,