monica-alexandria 3.1.39 → 3.1.40
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/index.es.js +27 -1
- package/dist/index.js +34 -8
- package/package.json +1 -1
- package/src/export/components/form/Elastic_Search.js +37 -8
package/dist/index.es.js
CHANGED
|
@@ -731,11 +731,37 @@ import e,{createContext as t,useContext as n,useState as r,useEffect as a}from"r
|
|
|
731
731
|
}
|
|
732
732
|
`,ke=t=>{const[n,r]=e.useState(0);return e.createElement(fe,null,e.createElement(q,{placeholder:t.text_Placeholder,rows:t.rows?t.rows:"5",onChange:t.onChange_Textarea?t.onChange_Textarea:e=>(e=>{r(e.target.value.length)})(e)},t.text_Prefill),t.int_Limit?e.createElement(xe,{capped:n>t.int_Limit}," ",e.createElement("span",null,n)," / ",t.int_Limit):null,t.bool_Required?e.createElement(K,{className:"ValidatorRequired"},e.createElement(d,{Icon:"Asterisk"})):null,t.array_Errors?e.createElement(H,{className:"ValidatorErrors"},t.array_Errors.map((t=>e.createElement(V,null,e.createElement(d,{Icon:"Error"}),e.createElement("h6",null,t))))):null,t.array_Tips&&t.array_Helpers?e.createElement(H,{className:"ValidatorHelpers"},t.array_Helpers.map((t=>e.createElement(D,null,e.createElement(d,{Icon:"Warning"}),e.createElement("h6",null,t)))),t.array_Tips.map((t=>e.createElement(F,null,e.createElement(d,{Icon:"Tip"}),e.createElement("h6",null,t))))):t.array_Tips?e.createElement(H,{className:"ValidatorHelpers"},t.array_Tips.map((t=>e.createElement(F,null,e.createElement(d,{Icon:"Tip"}),e.createElement("h6",null,t))))):t.array_Helpers?e.createElement(H,{className:"ValidatorHelpers"},t.array_Helpers.map((t=>e.createElement(D,null,e.createElement(d,{Icon:"Warning"}),e.createElement("h6",null,t))))):null)};function we(e){return Array.isArray?Array.isArray(e):"[object Array]"===Ie(e)}function Me(e){return"string"==typeof e}function be(e){return"number"==typeof e}function Le(e){return!0===e||!1===e||function(e){return Ce(e)&&null!==e}(e)&&"[object Boolean]"==Ie(e)}function Ce(e){return"object"==typeof e}function Se(e){return null!=e}function Ae(e){return!e.trim().length}function Ie(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const $e=Object.prototype.hasOwnProperty;class Te{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=Re(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Re(e){let t=null,n=null,r=null,a=1,o=null;if(Me(e)||we(e))r=e,t=Be(e),n=Ze(e);else{if(!$e.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const i=e.name;if(r=i,$e.call(e,"weight")&&(a=e.weight,a<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(i));t=Be(i),n=Ze(i),o=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:o}}function Be(e){return we(e)?e:e.split(".")}function Ze(e){return we(e)?e.join("."):e}var Ne={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const a=(e,t,o)=>{if(Se(e))if(t[o]){const i=e[t[o]];if(!Se(i))return;if(o===t.length-1&&(Me(i)||be(i)||Le(i)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(i));else if(we(i)){r=!0;for(let e=0,n=i.length;e<n;e+=1)a(i[e],t,o+1)}else t.length&&a(i,t,o+1)}else n.push(e)};return a(e,Me(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Pe=/[^ ]+/g;class ze{constructor({getFn:e=Ne.getFn,fieldNormWeight:t=Ne.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(t){const a=t.match(Pe).length;if(n.has(a))return n.get(a);const o=1/Math.pow(a,.5*e),i=parseFloat(Math.round(o*r)/r);return n.set(a,i),i},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Me(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();Me(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Se(e)||Ae(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let a=t.getFn?t.getFn(e):this.getFn(e,t.path);if(Se(a))if(we(a)){let e=[];const t=[{nestedArrIndex:-1,value:a}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(Se(r))if(Me(r)&&!Ae(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else we(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(Me(a)&&!Ae(a)){let e={v:a,n:this.norm.get(a)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function He(e,t,{getFn:n=Ne.getFn,fieldNormWeight:r=Ne.fieldNormWeight}={}){const a=new ze({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(Re)),a.setSources(t),a.create(),a}function Ge(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=Ne.distance,ignoreLocation:o=Ne.ignoreLocation}={}){const i=t/e.length;if(o)return i;const c=Math.abs(r-n);return a?i+c/a:c?1:i}function Fe(e,t,n,{location:r=Ne.location,distance:a=Ne.distance,threshold:o=Ne.threshold,findAllMatches:i=Ne.findAllMatches,minMatchCharLength:c=Ne.minMatchCharLength,includeMatches:l=Ne.includeMatches,ignoreLocation:s=Ne.ignoreLocation}={}){if(t.length>32)throw new Error(`Pattern length exceeds max of ${32}.`);const d=t.length,u=e.length,m=Math.max(0,Math.min(r,u));let h=o,g=m;const p=c>1||l,v=p?Array(u):[];let y;for(;(y=e.indexOf(t,g))>-1;){let e=Ge(t,{currentLocation:y,expectedLocation:m,distance:a,ignoreLocation:s});if(h=Math.min(e,h),g=y+d,p){let e=0;for(;e<d;)v[y+e]=1,e+=1}}g=-1;let _=[],E=1,f=d+u;const x=1<<d-1;for(let r=0;r<d;r+=1){let o=0,c=f;for(;o<c;){Ge(t,{errors:r,currentLocation:m+c,expectedLocation:m,distance:a,ignoreLocation:s})<=h?o=c:f=c,c=Math.floor((f-o)/2+o)}f=c;let l=Math.max(1,m-c+1),y=i?u:Math.min(m+c,u)+d,k=Array(y+2);k[y+1]=(1<<r)-1;for(let o=y;o>=l;o-=1){let i=o-1,c=n[e.charAt(i)];if(p&&(v[i]=+!!c),k[o]=(k[o+1]<<1|1)&c,r&&(k[o]|=(_[o+1]|_[o])<<1|1|_[o+1]),k[o]&x&&(E=Ge(t,{errors:r,currentLocation:i,expectedLocation:m,distance:a,ignoreLocation:s}),E<=h)){if(h=E,g=i,g<=m)break;l=Math.max(1,2*m-g)}}if(Ge(t,{errors:r+1,currentLocation:m,expectedLocation:m,distance:a,ignoreLocation:s})>h)break;_=k}const k={isMatch:g>=0,score:Math.max(.001,E)};if(p){const e=function(e=[],t=Ne.minMatchCharLength){let n=[],r=-1,a=-1,o=0;for(let i=e.length;o<i;o+=1){let i=e[o];i&&-1===r?r=o:i||-1===r||(a=o-1,a-r+1>=t&&n.push([r,a]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(v,c);e.length?l&&(k.indices=e):k.isMatch=!1}return k}function De(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}class Ve{constructor(e,{location:t=Ne.location,threshold:n=Ne.threshold,distance:r=Ne.distance,includeMatches:a=Ne.includeMatches,findAllMatches:o=Ne.findAllMatches,minMatchCharLength:i=Ne.minMatchCharLength,isCaseSensitive:c=Ne.isCaseSensitive,ignoreLocation:l=Ne.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:a,findAllMatches:o,minMatchCharLength:i,isCaseSensitive:c,ignoreLocation:l},this.pattern=c?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const s=(e,t)=>{this.chunks.push({pattern:e,alphabet:De(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,n=d-t;for(;e<n;)s(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;s(this.pattern.substr(e),e)}}else s(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:a,threshold:o,findAllMatches:i,minMatchCharLength:c,ignoreLocation:l}=this.options;let s=[],d=0,u=!1;this.chunks.forEach((({pattern:t,alphabet:m,startIndex:h})=>{const{isMatch:g,score:p,indices:v}=Fe(e,t,m,{location:r+h,distance:a,threshold:o,findAllMatches:i,minMatchCharLength:c,includeMatches:n,ignoreLocation:l});g&&(u=!0),d+=p,g&&v&&(s=[...s,...v])}));let m={isMatch:u,score:u?d/this.chunks.length:1};return u&&n&&(m.indices=s),m}}class Ke{constructor(e){this.pattern=e}static isMultiMatch(e){return je(e,this.multiRegex)}static isSingleMatch(e){return je(e,this.singleRegex)}search(){}}function je(e,t){const n=e.match(t);return n?n[1]:null}class qe extends Ke{constructor(e,{location:t=Ne.location,threshold:n=Ne.threshold,distance:r=Ne.distance,includeMatches:a=Ne.includeMatches,findAllMatches:o=Ne.findAllMatches,minMatchCharLength:i=Ne.minMatchCharLength,isCaseSensitive:c=Ne.isCaseSensitive,ignoreLocation:l=Ne.ignoreLocation}={}){super(e),this._bitapSearch=new Ve(e,{location:t,threshold:n,distance:r,includeMatches:a,findAllMatches:o,minMatchCharLength:i,isCaseSensitive:c,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Oe extends Ke{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],a=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+a,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const We=[class extends Ke{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Oe,class extends Ke{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends Ke{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Ke{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Ke{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends Ke{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},qe],Ue=We.length,Xe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const Je=new Set([qe.type,Oe.type]);class Ye{constructor(e,{isCaseSensitive:t=Ne.isCaseSensitive,includeMatches:n=Ne.includeMatches,minMatchCharLength:r=Ne.minMatchCharLength,ignoreLocation:a=Ne.ignoreLocation,findAllMatches:o=Ne.findAllMatches,location:i=Ne.location,threshold:c=Ne.threshold,distance:l=Ne.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:a,location:i,threshold:c,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(Xe).filter((e=>e&&!!e.trim())),r=[];for(let e=0,a=n.length;e<a;e+=1){const a=n[e];let o=!1,i=-1;for(;!o&&++i<Ue;){const e=We[i];let n=e.isMultiMatch(a);n&&(r.push(new e(n,t)),o=!0)}if(!o)for(i=-1;++i<Ue;){const e=We[i];let n=e.isSingleMatch(a);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let a=0,o=[],i=0;for(let r=0,c=t.length;r<c;r+=1){const c=t[r];o.length=0,a=0;for(let t=0,r=c.length;t<r;t+=1){const r=c[t],{isMatch:l,indices:s,score:d}=r.search(e);if(!l){i=0,a=0,o.length=0;break}if(a+=1,i+=d,n){const e=r.constructor.type;Je.has(e)?o=[...o,...s]:o.push(s)}}if(a){let e={isMatch:!0,score:i/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const Qe=[];function et(e,t){for(let n=0,r=Qe.length;n<r;n+=1){let r=Qe[n];if(r.condition(e,t))return new r(e,t)}return new Ve(e,t)}const tt="$and",nt="$or",rt="$path",at="$val",ot=e=>!(!e[tt]&&!e[nt]),it=e=>({[tt]:Object.keys(e).map((t=>({[t]:e[t]})))});function ct(e,t,{auto:n=!0}={}){const r=e=>{let a=Object.keys(e);const o=(e=>!!e[rt])(e);if(!o&&a.length>1&&!ot(e))return r(it(e));if((e=>!we(e)&&Ce(e)&&!ot(e))(e)){const r=o?e[rt]:a[0],i=o?e[at]:e[r];if(!Me(i))throw new Error((e=>`Invalid value for key ${e}`)(r));const c={keyId:Ze(r),pattern:i};return n&&(c.searcher=et(i,t)),c}let i={children:[],operator:a[0]};return a.forEach((t=>{const n=e[t];we(n)&&n.forEach((e=>{i.children.push(r(e))}))})),i};return ot(e)||(e=it(e)),r(e)}function lt(e,t){const n=e.matches;t.matches=[],Se(n)&&n.forEach((e=>{if(!Se(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let a={indices:n,value:r};e.key&&(a.key=e.key.src),e.idx>-1&&(a.refIndex=e.idx),t.matches.push(a)}))}function st(e,t){t.score=e.score}class dt{constructor(e,t={},n){this.options={...Ne,...t},this.options.useExtendedSearch,this._keyStore=new Te(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof ze))throw new Error("Incorrect 'index' type");this._myIndex=t||He(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Se(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const a=this._docs[n];e(a,n)&&(this.removeAt(n),n-=1,r-=1,t.push(a))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:a,sortFn:o,ignoreFieldNorm:i}=this.options;let c=Me(e)?Me(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=Ne.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:a})=>{const o=e?e.weight:null;n*=Math.pow(0===a&&o?Number.EPSILON:a,(o||1)*(t?1:r))})),e.score=n}))}(c,{ignoreFieldNorm:i}),a&&c.sort(o),be(t)&&t>-1&&(c=c.slice(0,t)),function(e,t,{includeMatches:n=Ne.includeMatches,includeScore:r=Ne.includeScore}={}){const a=[];return n&&a.push(lt),r&&a.push(st),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return a.length&&a.forEach((t=>{t(e,r)})),r}))}(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=et(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:a})=>{if(!Se(e))return;const{isMatch:o,score:i,indices:c}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:i,value:e,norm:a,indices:c}]})})),r}_searchLogical(e){const t=ct(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:a}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:a});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}const a=[];for(let o=0,i=e.children.length;o<i;o+=1){const i=e.children[o],c=n(i,t,r);if(c.length)a.push(...c);else if(e.operator===tt)return[]}return a},r=this._myIndex.records,a={},o=[];return r.forEach((({$:e,i:r})=>{if(Se(e)){let i=n(t,e,r);i.length&&(a[r]||(a[r]={idx:r,item:e,matches:[]},o.push(a[r])),i.forEach((({matches:e})=>{a[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=et(e,this.options),{keys:n,records:r}=this._myIndex,a=[];return r.forEach((({$:e,i:r})=>{if(!Se(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&a.push({idx:r,item:e,matches:o})})),a}_findMatches({key:e,value:t,searcher:n}){if(!Se(t))return[];let r=[];if(we(t))t.forEach((({v:t,i:a,n:o})=>{if(!Se(t))return;const{isMatch:i,score:c,indices:l}=n.searchIn(t);i&&r.push({score:c,key:e,value:t,idx:a,norm:o,indices:l})}));else{const{v:a,n:o}=t,{isMatch:i,score:c,indices:l}=n.searchIn(a);i&&r.push({score:c,key:e,value:a,norm:o,indices:l})}return r}}dt.version="6.6.2",dt.createIndex=He,dt.parseIndex=function(e,{getFn:t=Ne.getFn,fieldNormWeight:n=Ne.fieldNormWeight}={}){const{keys:r,records:a}=e,o=new ze({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(a),o},dt.config=Ne,dt.parseQuery=ct,function(...e){Qe.push(...e)}(Ye);var ut=require("greek-utils");const mt=o(J)`
|
|
733
733
|
|
|
734
|
+
ul{
|
|
735
|
+
margin-top: 1rem;
|
|
736
|
+
background: ${e=>e.theme.background};
|
|
737
|
+
box-shadow: ${e=>e.theme.out};
|
|
738
|
+
border-radius: var(--smallRadius);
|
|
739
|
+
overflow: hidden;
|
|
740
|
+
transition: all .5s ease;
|
|
741
|
+
|
|
742
|
+
li{
|
|
743
|
+
display: flex;
|
|
744
|
+
align-items: center;
|
|
745
|
+
justify-content: space-between;
|
|
746
|
+
gap: 1rem;
|
|
747
|
+
cursor: pointer;
|
|
748
|
+
padding: var(--normalPads);
|
|
749
|
+
transition: background .5s;
|
|
750
|
+
|
|
751
|
+
&:hover{
|
|
752
|
+
background: ${e=>e.theme.low};
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.ElasticSelected{
|
|
757
|
+
background: ${e=>e.theme.low};
|
|
758
|
+
}
|
|
759
|
+
}
|
|
734
760
|
`,ht=o(U)`
|
|
735
761
|
|
|
736
762
|
`,gt=o(X)`
|
|
737
763
|
|
|
738
|
-
`,pt=t=>{let n={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:[t.text_suggestionType]},o=t.file;const[i,c]=r({query:"",file:o,notfoundmessage:!1}),[l,s]=r(!1),[u,m]=r(0),h=e=>{t.onSuggestions(e),c({...i,query:""})},g=e=>{"ArrowUp"==e.key&&(e.preventDefault(),m(0===u?l.length-1:u-1)),"ArrowDown"==e.key&&(e.preventDefault(),u===l.length-1?m(0):m(u+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),h(l[u].item?l[u].item:l[u]))};return a((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new dt(o,n);let r=i.query?e.search(i.query):o;r=r.slice(0,t.size),s(r)}),[i]),a((()=>{t.getInput&&l?.length>0?t.getInput(l[0]?.item):t.getSuggestions&&l?.length>0&&i.query.length?t.getSuggestions(l):t.getSuggestions&&!i.query.length&&t.getSuggestions([])}),[l]),
|
|
764
|
+
`,pt=t=>{let n={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:[t.text_suggestionType]},o=t.file;const[i,c]=r({query:"",file:o,notfoundmessage:!1}),[l,s]=r(!1),[u,m]=r(0),h=e=>{t.onSuggestions(e),c({...i,query:""})},g=e=>{"ArrowUp"==e.key&&(e.preventDefault(),m(0===u?l.length-1:u-1)),"ArrowDown"==e.key&&(e.preventDefault(),u===l.length-1?m(0):m(u+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),h(l[u].item?l[u].item:l[u]))};return a((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new dt(o,n);let r=i.query?e.search(i.query):o;r=r.slice(0,t.size),s(r)}),[i]),a((()=>{t.getInput&&l?.length>0?t.getInput(l[0]?.item):t.getSuggestions&&l?.length>0&&i.query.length?t.getSuggestions(l):t.getSuggestions&&!i.query.length&&t.getSuggestions([])}),[l]),e.createElement(mt,null,e.createElement(ht,{id:"elasticSearch",autoComplete:"off",type:"text",placeholder:t.text_placeHolder,onChange:e=>{const{target:n={}}=e,{value:r=""}=n;let a=ut.toGreek(r);c({...i,query:t.sanitize?a:r})},defaultValue:t.text_DefaulValue,onKeyPress:e=>g(e),onKeyDown:e=>g(e)}),e.createElement(gt,null,t.text_Placeholder),t.bool_Required?e.createElement(K,{className:"ValidatorRequired"},e.createElement(d,{Icon:"Asterisk"})):null,i.query&&l?e.createElement("ul",null,l.map(((n,r)=>e.createElement("li",{className:r===u%l.length?"ElasticSelected":"",key:r,onClick:()=>h(n?.item?n.item:n)},e.createElement("p",null,n?.item?n.item[t.text_suggestionType]:n[t.text_suggestionType]))))):null)},vt=o.div`
|
|
739
765
|
display: flex;
|
|
740
766
|
gap: 1rem;
|
|
741
767
|
align-items: center;
|
package/dist/index.js
CHANGED
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
padding: var(--normalPads);
|
|
315
315
|
border-radius: var(--smallRadius);
|
|
316
316
|
background: ${e=>e.theme.background};
|
|
317
|
-
|
|
317
|
+
`,$=o.default.div`
|
|
318
318
|
margin-top: 2rem;
|
|
319
319
|
padding: 1rem 2rem;
|
|
320
320
|
display: flex;
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
`,T=o.default.div`
|
|
334
334
|
|
|
335
335
|
`,R=o.default.div`
|
|
336
336
|
display: grid;
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
fill: ${e=>e.theme.color};
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
`,q=e=>r.default.createElement(K,null,r.default.createElement(D,{className:e.class_Input,placeholder:e.text_Placeholder,id:e.id_Input,autoComplete:"off",type:"text",onChange:e.onChange_Input,defaultValue:e.text_Defaultvalue,onKeyPress:e.onKeyPress_Input,onKeyDown:e.onKeyDown_Input}),r.default.createElement(V,null,e.text_Placeholder),e.variant_List?r.default.createElement(v,{variant_Size:"small",text_Button:"Add",icon_Left:"Add",className:"FormAddButton"}):null,e.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,e.array_Errors?r.default.createElement(
|
|
514
|
+
`,q=e=>r.default.createElement(K,null,r.default.createElement(D,{className:e.class_Input,placeholder:e.text_Placeholder,id:e.id_Input,autoComplete:"off",type:"text",onChange:e.onChange_Input,defaultValue:e.text_Defaultvalue,onKeyPress:e.onKeyPress_Input,onKeyDown:e.onKeyDown_Input}),r.default.createElement(V,null,e.text_Placeholder),e.variant_List?r.default.createElement(v,{variant_Size:"small",text_Button:"Add",icon_Left:"Add",className:"FormAddButton"}):null,e.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,e.array_Errors?r.default.createElement(T,{className:"ValidatorErrors"},e.array_Errors.map((e=>r.default.createElement(Z,null,r.default.createElement(s,{Icon:"Error"}),r.default.createElement("h6",null,e))))):null,e.array_Tips&&e.array_Helpers?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e)))),e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Tips?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Helpers?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e))))):null,e.variant_List?r.default.createElement(j,null,e.array_List.map((t=>r.default.createElement("li",null,r.default.createElement(s,{Icon:e.icon_List}),r.default.createElement("h6",null,t),r.default.createElement(k,{variant_Size:"small",icon_Left:"Delete"}))))):null),O=o.default.div`
|
|
515
515
|
position: relative;
|
|
516
516
|
|
|
517
517
|
select{
|
|
@@ -729,8 +729,34 @@
|
|
|
729
729
|
span{
|
|
730
730
|
color: ${e=>e.capped?"var(--error)":"inherit"};
|
|
731
731
|
}
|
|
732
|
-
`;function de(e){return Array.isArray?Array.isArray(e):"[object Array]"===ve(e)}function ue(e){return"string"==typeof e}function me(e){return"number"==typeof e}function he(e){return!0===e||!1===e||function(e){return ge(e)&&null!==e}(e)&&"[object Boolean]"==ve(e)}function ge(e){return"object"==typeof e}function fe(e){return null!=e}function pe(e){return!e.trim().length}function ve(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ye=Object.prototype.hasOwnProperty;class _e{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let a=xe(e);t+=a.weight,this._keys.push(a),this._keyMap[a.id]=a,t+=a.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xe(e){let t=null,a=null,n=null,r=1,o=null;if(ue(e)||de(e))n=e,t=Ee(e),a=ke(e);else{if(!ye.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const l=e.name;if(n=l,ye.call(e,"weight")&&(r=e.weight,r<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(l));t=Ee(l),a=ke(l),o=e.getFn}return{path:t,id:a,weight:r,src:n,getFn:o}}function Ee(e){return de(e)?e:e.split(".")}function ke(e){return de(e)?e.join("."):e}var we={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let a=[],n=!1;const r=(e,t,o)=>{if(fe(e))if(t[o]){const l=e[t[o]];if(!fe(l))return;if(o===t.length-1&&(ue(l)||me(l)||he(l)))a.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(l));else if(de(l)){n=!0;for(let e=0,a=l.length;e<a;e+=1)r(l[e],t,o+1)}else t.length&&r(l,t,o+1)}else a.push(e)};return r(e,ue(t)?t.split("."):t,0),n?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Me=/[^ ]+/g;class Ce{constructor({getFn:e=we.getFn,fieldNormWeight:t=we.fieldNormWeight}={}){this.norm=function(e=1,t=3){const a=new Map,n=Math.pow(10,t);return{get(t){const r=t.match(Me).length;if(a.has(r))return a.get(r);const o=1/Math.pow(r,.5*e),l=parseFloat(Math.round(o*n)/n);return a.set(r,l),l},clear(){a.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,ue(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();ue(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,a=this.size();t<a;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!fe(e)||pe(e))return;let a={v:e,i:t,n:this.norm.get(e)};this.records.push(a)}_addObject(e,t){let a={i:t,$:{}};this.keys.forEach(((t,n)=>{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(fe(r))if(de(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:a,value:n}=t.pop();if(fe(n))if(ue(n)&&!pe(n)){let t={v:n,i:a,n:this.norm.get(n)};e.push(t)}else de(n)&&n.forEach(((e,a)=>{t.push({nestedArrIndex:a,value:e})}))}a.$[n]=e}else if(ue(r)&&!pe(r)){let e={v:r,n:this.norm.get(r)};a.$[n]=e}})),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}}function be(e,t,{getFn:a=we.getFn,fieldNormWeight:n=we.fieldNormWeight}={}){const r=new Ce({getFn:a,fieldNormWeight:n});return r.setKeys(e.map(xe)),r.setSources(t),r.create(),r}function Le(e,{errors:t=0,currentLocation:a=0,expectedLocation:n=0,distance:r=we.distance,ignoreLocation:o=we.ignoreLocation}={}){const l=t/e.length;if(o)return l;const i=Math.abs(n-a);return r?l+i/r:i?1:l}function Se(e,t,a,{location:n=we.location,distance:r=we.distance,threshold:o=we.threshold,findAllMatches:l=we.findAllMatches,minMatchCharLength:i=we.minMatchCharLength,includeMatches:c=we.includeMatches,ignoreLocation:s=we.ignoreLocation}={}){if(t.length>32)throw new Error(`Pattern length exceeds max of ${32}.`);const d=t.length,u=e.length,m=Math.max(0,Math.min(n,u));let h=o,g=m;const f=i>1||c,p=f?Array(u):[];let v;for(;(v=e.indexOf(t,g))>-1;){let e=Le(t,{currentLocation:v,expectedLocation:m,distance:r,ignoreLocation:s});if(h=Math.min(e,h),g=v+d,f){let e=0;for(;e<d;)p[v+e]=1,e+=1}}g=-1;let y=[],_=1,x=d+u;const E=1<<d-1;for(let n=0;n<d;n+=1){let o=0,i=x;for(;o<i;){Le(t,{errors:n,currentLocation:m+i,expectedLocation:m,distance:r,ignoreLocation:s})<=h?o=i:x=i,i=Math.floor((x-o)/2+o)}x=i;let c=Math.max(1,m-i+1),v=l?u:Math.min(m+i,u)+d,k=Array(v+2);k[v+1]=(1<<n)-1;for(let o=v;o>=c;o-=1){let l=o-1,i=a[e.charAt(l)];if(f&&(p[l]=+!!i),k[o]=(k[o+1]<<1|1)&i,n&&(k[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),k[o]&E&&(_=Le(t,{errors:n,currentLocation:l,expectedLocation:m,distance:r,ignoreLocation:s}),_<=h)){if(h=_,g=l,g<=m)break;c=Math.max(1,2*m-g)}}if(Le(t,{errors:n+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:s})>h)break;y=k}const k={isMatch:g>=0,score:Math.max(.001,_)};if(f){const e=function(e=[],t=we.minMatchCharLength){let a=[],n=-1,r=-1,o=0;for(let l=e.length;o<l;o+=1){let l=e[o];l&&-1===n?n=o:l||-1===n||(r=o-1,r-n+1>=t&&a.push([n,r]),n=-1)}return e[o-1]&&o-n>=t&&a.push([n,o-1]),a}(p,i);e.length?c&&(k.indices=e):k.isMatch=!1}return k}function Ae(e){let t={};for(let a=0,n=e.length;a<n;a+=1){const r=e.charAt(a);t[r]=(t[r]||0)|1<<n-a-1}return t}class Ie{constructor(e,{location:t=we.location,threshold:a=we.threshold,distance:n=we.distance,includeMatches:r=we.includeMatches,findAllMatches:o=we.findAllMatches,minMatchCharLength:l=we.minMatchCharLength,isCaseSensitive:i=we.isCaseSensitive,ignoreLocation:c=we.ignoreLocation}={}){if(this.options={location:t,threshold:a,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:i,ignoreLocation:c},this.pattern=i?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const s=(e,t)=>{this.chunks.push({pattern:e,alphabet:Ae(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,a=d-t;for(;e<a;)s(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;s(this.pattern.substr(e),e)}}else s(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:a}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return a&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:r,threshold:o,findAllMatches:l,minMatchCharLength:i,ignoreLocation:c}=this.options;let s=[],d=0,u=!1;this.chunks.forEach((({pattern:t,alphabet:m,startIndex:h})=>{const{isMatch:g,score:f,indices:p}=Se(e,t,m,{location:n+h,distance:r,threshold:o,findAllMatches:l,minMatchCharLength:i,includeMatches:a,ignoreLocation:c});g&&(u=!0),d+=f,g&&p&&(s=[...s,...p])}));let m={isMatch:u,score:u?d/this.chunks.length:1};return u&&a&&(m.indices=s),m}}class Te{constructor(e){this.pattern=e}static isMultiMatch(e){return $e(e,this.multiRegex)}static isSingleMatch(e){return $e(e,this.singleRegex)}search(){}}function $e(e,t){const a=e.match(t);return a?a[1]:null}class Re extends Te{constructor(e,{location:t=we.location,threshold:a=we.threshold,distance:n=we.distance,includeMatches:r=we.includeMatches,findAllMatches:o=we.findAllMatches,minMatchCharLength:l=we.minMatchCharLength,isCaseSensitive:i=we.isCaseSensitive,ignoreLocation:c=we.ignoreLocation}={}){super(e),this._bitapSearch=new Ie(e,{location:t,threshold:a,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:i,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Be extends Te{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,a=0;const n=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,a))>-1;)a=t+r,n.push([t,a-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const Pe=[class extends Te{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Be,class extends Te{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends Te{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Te{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Te{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends Te{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Re],Ze=Pe.length,Ne=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const ze=new Set([Re.type,Be.type]);class Ge{constructor(e,{isCaseSensitive:t=we.isCaseSensitive,includeMatches:a=we.includeMatches,minMatchCharLength:n=we.minMatchCharLength,ignoreLocation:r=we.ignoreLocation,findAllMatches:o=we.findAllMatches,location:l=we.location,threshold:i=we.threshold,distance:c=we.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:a,minMatchCharLength:n,findAllMatches:o,ignoreLocation:r,location:l,threshold:i,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let a=e.trim().split(Ne).filter((e=>e&&!!e.trim())),n=[];for(let e=0,r=a.length;e<r;e+=1){const r=a[e];let o=!1,l=-1;for(;!o&&++l<Ze;){const e=Pe[l];let a=e.isMultiMatch(r);a&&(n.push(new e(a,t)),o=!0)}if(!o)for(l=-1;++l<Ze;){const e=Pe[l];let a=e.isSingleMatch(r);if(a){n.push(new e(a,t));break}}}return n}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:a,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let r=0,o=[],l=0;for(let n=0,i=t.length;n<i;n+=1){const i=t[n];o.length=0,r=0;for(let t=0,n=i.length;t<n;t+=1){const n=i[t],{isMatch:c,indices:s,score:d}=n.search(e);if(!c){l=0,r=0,o.length=0;break}if(r+=1,l+=d,a){const e=n.constructor.type;ze.has(e)?o=[...o,...s]:o.push(s)}}if(r){let e={isMatch:!0,score:l/r};return a&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const He=[];function Fe(e,t){for(let a=0,n=He.length;a<n;a+=1){let n=He[a];if(n.condition(e,t))return new n(e,t)}return new Ie(e,t)}const De="$and",Ve="$or",Ke="$path",je="$val",qe=e=>!(!e[De]&&!e[Ve]),Oe=e=>({[De]:Object.keys(e).map((t=>({[t]:e[t]})))});function We(e,t,{auto:a=!0}={}){const n=e=>{let r=Object.keys(e);const o=(e=>!!e[Ke])(e);if(!o&&r.length>1&&!qe(e))return n(Oe(e));if((e=>!de(e)&&ge(e)&&!qe(e))(e)){const n=o?e[Ke]:r[0],l=o?e[je]:e[n];if(!ue(l))throw new Error((e=>`Invalid value for key ${e}`)(n));const i={keyId:ke(n),pattern:l};return a&&(i.searcher=Fe(l,t)),i}let l={children:[],operator:r[0]};return r.forEach((t=>{const a=e[t];de(a)&&a.forEach((e=>{l.children.push(n(e))}))})),l};return qe(e)||(e=Oe(e)),n(e)}function Ue(e,t){const a=e.matches;t.matches=[],fe(a)&&a.forEach((e=>{if(!fe(e.indices)||!e.indices.length)return;const{indices:a,value:n}=e;let r={indices:a,value:n};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)}))}function Xe(e,t){t.score=e.score}class Je{constructor(e,t={},a){this.options={...we,...t},this.options.useExtendedSearch,this._keyStore=new _e(this.options.keys),this.setCollection(e,a)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Ce))throw new Error("Incorrect 'index' type");this._myIndex=t||be(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){fe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let a=0,n=this._docs.length;a<n;a+=1){const r=this._docs[a];e(r,a)&&(this.removeAt(a),a-=1,n-=1,t.push(r))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:a,includeScore:n,shouldSort:r,sortFn:o,ignoreFieldNorm:l}=this.options;let i=ue(e)?ue(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=we.ignoreFieldNorm}){e.forEach((e=>{let a=1;e.matches.forEach((({key:e,norm:n,score:r})=>{const o=e?e.weight:null;a*=Math.pow(0===r&&o?Number.EPSILON:r,(o||1)*(t?1:n))})),e.score=a}))}(i,{ignoreFieldNorm:l}),r&&i.sort(o),me(t)&&t>-1&&(i=i.slice(0,t)),function(e,t,{includeMatches:a=we.includeMatches,includeScore:n=we.includeScore}={}){const r=[];return a&&r.push(Ue),n&&r.push(Xe),e.map((e=>{const{idx:a}=e,n={item:t[a],refIndex:a};return r.length&&r.forEach((t=>{t(e,n)})),n}))}(i,this._docs,{includeMatches:a,includeScore:n})}_searchStringList(e){const t=Fe(e,this.options),{records:a}=this._myIndex,n=[];return a.forEach((({v:e,i:a,n:r})=>{if(!fe(e))return;const{isMatch:o,score:l,indices:i}=t.searchIn(e);o&&n.push({item:e,idx:a,matches:[{score:l,value:e,norm:r,indices:i}]})})),n}_searchLogical(e){const t=We(e,this.options),a=(e,t,n)=>{if(!e.children){const{keyId:a,searcher:r}=e,o=this._findMatches({key:this._keyStore.get(a),value:this._myIndex.getValueForItemAtKeyId(t,a),searcher:r});return o&&o.length?[{idx:n,item:t,matches:o}]:[]}const r=[];for(let o=0,l=e.children.length;o<l;o+=1){const l=e.children[o],i=a(l,t,n);if(i.length)r.push(...i);else if(e.operator===De)return[]}return r},n=this._myIndex.records,r={},o=[];return n.forEach((({$:e,i:n})=>{if(fe(e)){let l=a(t,e,n);l.length&&(r[n]||(r[n]={idx:n,item:e,matches:[]},o.push(r[n])),l.forEach((({matches:e})=>{r[n].matches.push(...e)})))}})),o}_searchObjectList(e){const t=Fe(e,this.options),{keys:a,records:n}=this._myIndex,r=[];return n.forEach((({$:e,i:n})=>{if(!fe(e))return;let o=[];a.forEach(((a,n)=>{o.push(...this._findMatches({key:a,value:e[n],searcher:t}))})),o.length&&r.push({idx:n,item:e,matches:o})})),r}_findMatches({key:e,value:t,searcher:a}){if(!fe(t))return[];let n=[];if(de(t))t.forEach((({v:t,i:r,n:o})=>{if(!fe(t))return;const{isMatch:l,score:i,indices:c}=a.searchIn(t);l&&n.push({score:i,key:e,value:t,idx:r,norm:o,indices:c})}));else{const{v:r,n:o}=t,{isMatch:l,score:i,indices:c}=a.searchIn(r);l&&n.push({score:i,key:e,value:r,norm:o,indices:c})}return n}}Je.version="6.6.2",Je.createIndex=be,Je.parseIndex=function(e,{getFn:t=we.getFn,fieldNormWeight:a=we.fieldNormWeight}={}){const{keys:n,records:r}=e,o=new Ce({getFn:t,fieldNormWeight:a});return o.setKeys(n),o.setIndexRecords(r),o},Je.config=we,Je.parseQuery=We,function(...e){He.push(...e)}(Ge);var Ye=require("greek-utils");const Qe=o.default(K)`
|
|
732
|
+
`;function de(e){return Array.isArray?Array.isArray(e):"[object Array]"===ve(e)}function ue(e){return"string"==typeof e}function me(e){return"number"==typeof e}function he(e){return!0===e||!1===e||function(e){return ge(e)&&null!==e}(e)&&"[object Boolean]"==ve(e)}function ge(e){return"object"==typeof e}function fe(e){return null!=e}function pe(e){return!e.trim().length}function ve(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ye=Object.prototype.hasOwnProperty;class _e{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let a=xe(e);t+=a.weight,this._keys.push(a),this._keyMap[a.id]=a,t+=a.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xe(e){let t=null,a=null,n=null,r=1,o=null;if(ue(e)||de(e))n=e,t=Ee(e),a=ke(e);else{if(!ye.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const l=e.name;if(n=l,ye.call(e,"weight")&&(r=e.weight,r<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(l));t=Ee(l),a=ke(l),o=e.getFn}return{path:t,id:a,weight:r,src:n,getFn:o}}function Ee(e){return de(e)?e:e.split(".")}function ke(e){return de(e)?e.join("."):e}var we={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let a=[],n=!1;const r=(e,t,o)=>{if(fe(e))if(t[o]){const l=e[t[o]];if(!fe(l))return;if(o===t.length-1&&(ue(l)||me(l)||he(l)))a.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(l));else if(de(l)){n=!0;for(let e=0,a=l.length;e<a;e+=1)r(l[e],t,o+1)}else t.length&&r(l,t,o+1)}else a.push(e)};return r(e,ue(t)?t.split("."):t,0),n?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Me=/[^ ]+/g;class Ce{constructor({getFn:e=we.getFn,fieldNormWeight:t=we.fieldNormWeight}={}){this.norm=function(e=1,t=3){const a=new Map,n=Math.pow(10,t);return{get(t){const r=t.match(Me).length;if(a.has(r))return a.get(r);const o=1/Math.pow(r,.5*e),l=parseFloat(Math.round(o*n)/n);return a.set(r,l),l},clear(){a.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,ue(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();ue(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,a=this.size();t<a;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!fe(e)||pe(e))return;let a={v:e,i:t,n:this.norm.get(e)};this.records.push(a)}_addObject(e,t){let a={i:t,$:{}};this.keys.forEach(((t,n)=>{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(fe(r))if(de(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:a,value:n}=t.pop();if(fe(n))if(ue(n)&&!pe(n)){let t={v:n,i:a,n:this.norm.get(n)};e.push(t)}else de(n)&&n.forEach(((e,a)=>{t.push({nestedArrIndex:a,value:e})}))}a.$[n]=e}else if(ue(r)&&!pe(r)){let e={v:r,n:this.norm.get(r)};a.$[n]=e}})),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}}function be(e,t,{getFn:a=we.getFn,fieldNormWeight:n=we.fieldNormWeight}={}){const r=new Ce({getFn:a,fieldNormWeight:n});return r.setKeys(e.map(xe)),r.setSources(t),r.create(),r}function Le(e,{errors:t=0,currentLocation:a=0,expectedLocation:n=0,distance:r=we.distance,ignoreLocation:o=we.ignoreLocation}={}){const l=t/e.length;if(o)return l;const i=Math.abs(n-a);return r?l+i/r:i?1:l}function Se(e,t,a,{location:n=we.location,distance:r=we.distance,threshold:o=we.threshold,findAllMatches:l=we.findAllMatches,minMatchCharLength:i=we.minMatchCharLength,includeMatches:c=we.includeMatches,ignoreLocation:s=we.ignoreLocation}={}){if(t.length>32)throw new Error(`Pattern length exceeds max of ${32}.`);const d=t.length,u=e.length,m=Math.max(0,Math.min(n,u));let h=o,g=m;const f=i>1||c,p=f?Array(u):[];let v;for(;(v=e.indexOf(t,g))>-1;){let e=Le(t,{currentLocation:v,expectedLocation:m,distance:r,ignoreLocation:s});if(h=Math.min(e,h),g=v+d,f){let e=0;for(;e<d;)p[v+e]=1,e+=1}}g=-1;let y=[],_=1,x=d+u;const E=1<<d-1;for(let n=0;n<d;n+=1){let o=0,i=x;for(;o<i;){Le(t,{errors:n,currentLocation:m+i,expectedLocation:m,distance:r,ignoreLocation:s})<=h?o=i:x=i,i=Math.floor((x-o)/2+o)}x=i;let c=Math.max(1,m-i+1),v=l?u:Math.min(m+i,u)+d,k=Array(v+2);k[v+1]=(1<<n)-1;for(let o=v;o>=c;o-=1){let l=o-1,i=a[e.charAt(l)];if(f&&(p[l]=+!!i),k[o]=(k[o+1]<<1|1)&i,n&&(k[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),k[o]&E&&(_=Le(t,{errors:n,currentLocation:l,expectedLocation:m,distance:r,ignoreLocation:s}),_<=h)){if(h=_,g=l,g<=m)break;c=Math.max(1,2*m-g)}}if(Le(t,{errors:n+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:s})>h)break;y=k}const k={isMatch:g>=0,score:Math.max(.001,_)};if(f){const e=function(e=[],t=we.minMatchCharLength){let a=[],n=-1,r=-1,o=0;for(let l=e.length;o<l;o+=1){let l=e[o];l&&-1===n?n=o:l||-1===n||(r=o-1,r-n+1>=t&&a.push([n,r]),n=-1)}return e[o-1]&&o-n>=t&&a.push([n,o-1]),a}(p,i);e.length?c&&(k.indices=e):k.isMatch=!1}return k}function Ae(e){let t={};for(let a=0,n=e.length;a<n;a+=1){const r=e.charAt(a);t[r]=(t[r]||0)|1<<n-a-1}return t}class Ie{constructor(e,{location:t=we.location,threshold:a=we.threshold,distance:n=we.distance,includeMatches:r=we.includeMatches,findAllMatches:o=we.findAllMatches,minMatchCharLength:l=we.minMatchCharLength,isCaseSensitive:i=we.isCaseSensitive,ignoreLocation:c=we.ignoreLocation}={}){if(this.options={location:t,threshold:a,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:i,ignoreLocation:c},this.pattern=i?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const s=(e,t)=>{this.chunks.push({pattern:e,alphabet:Ae(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,a=d-t;for(;e<a;)s(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;s(this.pattern.substr(e),e)}}else s(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:a}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return a&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:r,threshold:o,findAllMatches:l,minMatchCharLength:i,ignoreLocation:c}=this.options;let s=[],d=0,u=!1;this.chunks.forEach((({pattern:t,alphabet:m,startIndex:h})=>{const{isMatch:g,score:f,indices:p}=Se(e,t,m,{location:n+h,distance:r,threshold:o,findAllMatches:l,minMatchCharLength:i,includeMatches:a,ignoreLocation:c});g&&(u=!0),d+=f,g&&p&&(s=[...s,...p])}));let m={isMatch:u,score:u?d/this.chunks.length:1};return u&&a&&(m.indices=s),m}}class $e{constructor(e){this.pattern=e}static isMultiMatch(e){return Te(e,this.multiRegex)}static isSingleMatch(e){return Te(e,this.singleRegex)}search(){}}function Te(e,t){const a=e.match(t);return a?a[1]:null}class Re extends $e{constructor(e,{location:t=we.location,threshold:a=we.threshold,distance:n=we.distance,includeMatches:r=we.includeMatches,findAllMatches:o=we.findAllMatches,minMatchCharLength:l=we.minMatchCharLength,isCaseSensitive:i=we.isCaseSensitive,ignoreLocation:c=we.ignoreLocation}={}){super(e),this._bitapSearch=new Ie(e,{location:t,threshold:a,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:i,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Be extends $e{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,a=0;const n=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,a))>-1;)a=t+r,n.push([t,a-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const Pe=[class extends $e{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Be,class extends $e{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends $e{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends $e{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends $e{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends $e{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Re],Ze=Pe.length,Ne=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const ze=new Set([Re.type,Be.type]);class Ge{constructor(e,{isCaseSensitive:t=we.isCaseSensitive,includeMatches:a=we.includeMatches,minMatchCharLength:n=we.minMatchCharLength,ignoreLocation:r=we.ignoreLocation,findAllMatches:o=we.findAllMatches,location:l=we.location,threshold:i=we.threshold,distance:c=we.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:a,minMatchCharLength:n,findAllMatches:o,ignoreLocation:r,location:l,threshold:i,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let a=e.trim().split(Ne).filter((e=>e&&!!e.trim())),n=[];for(let e=0,r=a.length;e<r;e+=1){const r=a[e];let o=!1,l=-1;for(;!o&&++l<Ze;){const e=Pe[l];let a=e.isMultiMatch(r);a&&(n.push(new e(a,t)),o=!0)}if(!o)for(l=-1;++l<Ze;){const e=Pe[l];let a=e.isSingleMatch(r);if(a){n.push(new e(a,t));break}}}return n}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:a,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let r=0,o=[],l=0;for(let n=0,i=t.length;n<i;n+=1){const i=t[n];o.length=0,r=0;for(let t=0,n=i.length;t<n;t+=1){const n=i[t],{isMatch:c,indices:s,score:d}=n.search(e);if(!c){l=0,r=0,o.length=0;break}if(r+=1,l+=d,a){const e=n.constructor.type;ze.has(e)?o=[...o,...s]:o.push(s)}}if(r){let e={isMatch:!0,score:l/r};return a&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const He=[];function Fe(e,t){for(let a=0,n=He.length;a<n;a+=1){let n=He[a];if(n.condition(e,t))return new n(e,t)}return new Ie(e,t)}const De="$and",Ve="$or",Ke="$path",je="$val",qe=e=>!(!e[De]&&!e[Ve]),Oe=e=>({[De]:Object.keys(e).map((t=>({[t]:e[t]})))});function We(e,t,{auto:a=!0}={}){const n=e=>{let r=Object.keys(e);const o=(e=>!!e[Ke])(e);if(!o&&r.length>1&&!qe(e))return n(Oe(e));if((e=>!de(e)&&ge(e)&&!qe(e))(e)){const n=o?e[Ke]:r[0],l=o?e[je]:e[n];if(!ue(l))throw new Error((e=>`Invalid value for key ${e}`)(n));const i={keyId:ke(n),pattern:l};return a&&(i.searcher=Fe(l,t)),i}let l={children:[],operator:r[0]};return r.forEach((t=>{const a=e[t];de(a)&&a.forEach((e=>{l.children.push(n(e))}))})),l};return qe(e)||(e=Oe(e)),n(e)}function Ue(e,t){const a=e.matches;t.matches=[],fe(a)&&a.forEach((e=>{if(!fe(e.indices)||!e.indices.length)return;const{indices:a,value:n}=e;let r={indices:a,value:n};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)}))}function Xe(e,t){t.score=e.score}class Je{constructor(e,t={},a){this.options={...we,...t},this.options.useExtendedSearch,this._keyStore=new _e(this.options.keys),this.setCollection(e,a)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Ce))throw new Error("Incorrect 'index' type");this._myIndex=t||be(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){fe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let a=0,n=this._docs.length;a<n;a+=1){const r=this._docs[a];e(r,a)&&(this.removeAt(a),a-=1,n-=1,t.push(r))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:a,includeScore:n,shouldSort:r,sortFn:o,ignoreFieldNorm:l}=this.options;let i=ue(e)?ue(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=we.ignoreFieldNorm}){e.forEach((e=>{let a=1;e.matches.forEach((({key:e,norm:n,score:r})=>{const o=e?e.weight:null;a*=Math.pow(0===r&&o?Number.EPSILON:r,(o||1)*(t?1:n))})),e.score=a}))}(i,{ignoreFieldNorm:l}),r&&i.sort(o),me(t)&&t>-1&&(i=i.slice(0,t)),function(e,t,{includeMatches:a=we.includeMatches,includeScore:n=we.includeScore}={}){const r=[];return a&&r.push(Ue),n&&r.push(Xe),e.map((e=>{const{idx:a}=e,n={item:t[a],refIndex:a};return r.length&&r.forEach((t=>{t(e,n)})),n}))}(i,this._docs,{includeMatches:a,includeScore:n})}_searchStringList(e){const t=Fe(e,this.options),{records:a}=this._myIndex,n=[];return a.forEach((({v:e,i:a,n:r})=>{if(!fe(e))return;const{isMatch:o,score:l,indices:i}=t.searchIn(e);o&&n.push({item:e,idx:a,matches:[{score:l,value:e,norm:r,indices:i}]})})),n}_searchLogical(e){const t=We(e,this.options),a=(e,t,n)=>{if(!e.children){const{keyId:a,searcher:r}=e,o=this._findMatches({key:this._keyStore.get(a),value:this._myIndex.getValueForItemAtKeyId(t,a),searcher:r});return o&&o.length?[{idx:n,item:t,matches:o}]:[]}const r=[];for(let o=0,l=e.children.length;o<l;o+=1){const l=e.children[o],i=a(l,t,n);if(i.length)r.push(...i);else if(e.operator===De)return[]}return r},n=this._myIndex.records,r={},o=[];return n.forEach((({$:e,i:n})=>{if(fe(e)){let l=a(t,e,n);l.length&&(r[n]||(r[n]={idx:n,item:e,matches:[]},o.push(r[n])),l.forEach((({matches:e})=>{r[n].matches.push(...e)})))}})),o}_searchObjectList(e){const t=Fe(e,this.options),{keys:a,records:n}=this._myIndex,r=[];return n.forEach((({$:e,i:n})=>{if(!fe(e))return;let o=[];a.forEach(((a,n)=>{o.push(...this._findMatches({key:a,value:e[n],searcher:t}))})),o.length&&r.push({idx:n,item:e,matches:o})})),r}_findMatches({key:e,value:t,searcher:a}){if(!fe(t))return[];let n=[];if(de(t))t.forEach((({v:t,i:r,n:o})=>{if(!fe(t))return;const{isMatch:l,score:i,indices:c}=a.searchIn(t);l&&n.push({score:i,key:e,value:t,idx:r,norm:o,indices:c})}));else{const{v:r,n:o}=t,{isMatch:l,score:i,indices:c}=a.searchIn(r);l&&n.push({score:i,key:e,value:r,norm:o,indices:c})}return n}}Je.version="6.6.2",Je.createIndex=be,Je.parseIndex=function(e,{getFn:t=we.getFn,fieldNormWeight:a=we.fieldNormWeight}={}){const{keys:n,records:r}=e,o=new Ce({getFn:t,fieldNormWeight:a});return o.setKeys(n),o.setIndexRecords(r),o},Je.config=we,Je.parseQuery=We,function(...e){He.push(...e)}(Ge);var Ye=require("greek-utils");const Qe=o.default(K)`
|
|
733
|
+
|
|
734
|
+
ul{
|
|
735
|
+
margin-top: 1rem;
|
|
736
|
+
background: ${e=>e.theme.background};
|
|
737
|
+
box-shadow: ${e=>e.theme.out};
|
|
738
|
+
border-radius: var(--smallRadius);
|
|
739
|
+
overflow: hidden;
|
|
740
|
+
transition: all .5s ease;
|
|
733
741
|
|
|
742
|
+
li{
|
|
743
|
+
display: flex;
|
|
744
|
+
align-items: center;
|
|
745
|
+
justify-content: space-between;
|
|
746
|
+
gap: 1rem;
|
|
747
|
+
cursor: pointer;
|
|
748
|
+
padding: var(--normalPads);
|
|
749
|
+
transition: background .5s;
|
|
750
|
+
|
|
751
|
+
&:hover{
|
|
752
|
+
background: ${e=>e.theme.low};
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.ElasticSelected{
|
|
757
|
+
background: ${e=>e.theme.low};
|
|
758
|
+
}
|
|
759
|
+
}
|
|
734
760
|
`,et=o.default(D)`
|
|
735
761
|
|
|
736
762
|
`,tt=o.default(V)`
|
|
@@ -1118,12 +1144,12 @@
|
|
|
1118
1144
|
transition-duration: .5s;
|
|
1119
1145
|
}
|
|
1120
1146
|
}
|
|
1121
|
-
|
|
1147
|
+
`,$t=o.default.div`
|
|
1122
1148
|
display: flex;
|
|
1123
1149
|
align-items: center;
|
|
1124
1150
|
justify-content: space-between;
|
|
1125
1151
|
padding: 4rem 0 2rem 0;
|
|
1126
|
-
|
|
1152
|
+
`,Tt=o.default.div`
|
|
1127
1153
|
height: 1.5rem;
|
|
1128
1154
|
border-radius: 1rem;
|
|
1129
1155
|
margin-bottom: 2rem;
|
|
@@ -1136,7 +1162,7 @@
|
|
|
1136
1162
|
background: ${e=>e.step===e.int_CurrentStep?"linear-gradient( to right, var(--main), transparent)":e.step<e.int_CurrentStep?"var(--main)":"transparent"};
|
|
1137
1163
|
height: 100%;
|
|
1138
1164
|
width: 100%;
|
|
1139
|
-
`,Bt=e=>r.default.createElement(
|
|
1165
|
+
`,Bt=e=>r.default.createElement(Tt,{array_Steps:e.array_Steps},e.array_Steps.map(((t,a)=>r.default.createElement(Rt,{step:a,int_CurrentStep:e.int_CurrentStep})))),Pt=o.default.div`
|
|
1140
1166
|
|
|
1141
1167
|
`,Zt=o.default.div`
|
|
1142
1168
|
position: relative;
|
|
@@ -1412,4 +1438,4 @@
|
|
|
1412
1438
|
display: grid;
|
|
1413
1439
|
grid-template-columns: 1fr 1fr;
|
|
1414
1440
|
grid-gap: 2rem;
|
|
1415
|
-
`;exports.Builder_=e=>r.default.createElement(ne,{key:e.key},e.text_BuilderTitle?r.default.createElement("h4",null,e.text_BuilderTitle):null,e.children),exports.Checkbox_=e=>r.default.createElement(re,{key:e.key},e.variant_Input?r.default.createElement(q,{text_Placeholder:e.text_CheckboxPlaceholder}):r.default.createElement("label",{for:e.id_Checkbox},r.default.createElement("p",null,e.text_CheckboxLabel)),r.default.createElement(oe,{className:"Check"},r.default.createElement("input",{type:"checkbox",id:e.id_Checkbox,checked:e.bool_Checked}),r.default.createElement("span",{className:"CheckCustom"}),r.default.createElement(s,{Icon:"Check",class_Icon:"CheckIcon"}))),exports.Confirmation_=e=>r.default.createElement(A,null,r.default.createElement(I,null,r.default.createElement("h4",null,e.text_Confirmation),r.default.createElement(T,null,r.default.createElement(v,{onClick:e.onClick_Primary,icon_Left:e.icon_Primary,text_Button:e.text_Primary}),r.default.createElement(_,{onClick:e.onClick_Secondary,icon_Left:e.icon_Secondary,text_Button:e.text_Secondary})))),exports.Cta_=c,exports.Delete_Plain=k,exports.Dropdown_=W,exports.Edit_=e=>r.default.createElement(d,{variant_Size:"normal",onClick:e.onClick},r.default.createElement(s,{Icon:e.icon})),exports.Elastic_Search=t=>{let a={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:[t.text_suggestionType]},n=t.file;const[o,l]=e.useState({query:"",file:n,notfoundmessage:!1}),[i,c]=e.useState(!1),[d,u]=e.useState(0),m=e=>{t.onSuggestions(e),l({...o,query:""})},h=e=>{"ArrowUp"==e.key&&(e.preventDefault(),u(0===d?i.length-1:d-1)),"ArrowDown"==e.key&&(e.preventDefault(),d===i.length-1?u(0):u(d+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),m(i[d].item?i[d].item:i[d]))};return e.useEffect((()=>{a.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new Je(n,a);let r=o.query?e.search(o.query):n;r=r.slice(0,t.size),c(r)}),[o]),e.useEffect((()=>{t.getInput&&i?.length>0?t.getInput(i[0]?.item):t.getSuggestions&&i?.length>0&&o.query.length?t.getSuggestions(i):t.getSuggestions&&!o.query.length&&t.getSuggestions([])}),[i]),console.log(i.query),r.default.createElement(Qe,null,r.default.createElement(et,{id:"elasticSearch",autoComplete:"off",type:"text",placeholder:t.text_placeHolder,onChange:e=>{const{target:a={}}=e,{value:n=""}=a;let r=Ye.toGreek(n);l({...o,query:t.sanitize?r:n})},defaultValue:t.text_DefaulValue,onKeyPress:e=>h(e),onKeyDown:e=>h(e)}),r.default.createElement(tt,null,t.text_Placeholder),t.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,r.default.createElement("ul",null,o.query&&i?.map(((e,a)=>r.default.createElement("li",{className:a===d%i.length?"selected":"",key:a,onClick:()=>m(e?.item?e.item:e)},r.default.createElement("p",null,e?.item?e.item[t.text_suggestionType]:e[t.text_suggestionType]))))))},exports.Focus_=e=>r.default.createElement(u,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.Focus_Plain=e=>r.default.createElement(m,{variant_Size:e.variant_Size,onClick:e.onClick,onFocus:e.onFocus},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.Form=F,exports.FormGroup=K,exports.FormInput=D,exports.FormLabel=V,exports.FormList=j,exports.Grey_=g,exports.Grey_Link=e=>r.default.createElement(f,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.HamContext=Y,exports.IconSvg=s,exports.Input_=q,exports.Input_Phone=t=>{const{region:a}=e.useContext(X);return r.default.createElement(ee,null,r.default.createElement(te,null,r.default.createElement(W,null,r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},"Greece"===a?r.default.createElement("option",{selected:!0},"🇬🇷 +30"):"Deutschland"===a?r.default.createElement("option",{selected:!0},"🇩🇪 +49"):r.default.createElement("option",{selected:!0},"🇬🇷 +30"))),r.default.createElement(W,{array_Dropdown:t.array_PhoneDropdown})),r.default.createElement(q,{text_Placeholder:t.text_PhonePlaceholder,bool_Required:t.bool_Required,variant_List:!0,array_List:t.array_PhoneList,icon_List:t.icon_PhoneList}))},exports.Input_Phone_Register=t=>{const{region:a}=e.useContext(X);return r.default.createElement(ae,null,r.default.createElement(W,null,"Greece"===a?r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇬🇷 +30"),r.default.createElement("option",null,"🇩🇪 +49")):"Deutschland"===a?r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇩🇪 +49"),r.default.createElement("option",null,"🇬🇷 +30")):r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇬🇷 +30"),r.default.createElement("option",null,"🇩🇪 +49"))),r.default.createElement(q,{class_Input:t.class_Input,text_Placeholder:t.text_Placeholder,id_Input:t.id_Input,onChange_Input:t.onChange_Input,text_Defaultvalue:t.text_Defaultvalue,onKeyPress_Input:t.onKeyPress_Input,onKeyDown_Input:t.onKeyDown_Input}))},exports.LangContext=U,exports.Main_=v,exports.Main_Plain=_,exports.MenuContext=J,exports.Nav_=e=>r.default.createElement(St,null,r.default.createElement(rt,{onClick_Logo:e.onClick_Logo}),r.default.createElement(lt,{onClick_Cta:e.onClick_Cta,text_Cta:e.text_Cta}),"Protected"===e.role?r.default.createElement(Mt,{role:e.role,img_Account:e.img_Account,img_Account_Main:e.img_Account,imgAlt_Account:e.imgAlt_Account,imgAlt_Account_Main:e.imgAlt_Account,firstname_Account:e.firstname_Account,text_Account_Main:e.firstname_Account,onClick_Account:e.onClick_Account,onCLick_Account_Main:e.onClick_Account,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,onClick_Settings_Main:e.onClick_Settings_Main,text_Settings_Main:e.text_Settings_Main,onCLick_Logout:e.onCLick_Logout,text_Logout:e.text_Logout,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language}):r.default.createElement(Lt,{role:e.role,onClick_Login:e.onClick_Login,text_Login:e.text_Login,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language})),exports.On_Click_Card=e=>r.default.createElement(M,{variant_CardText:e.variant_CardText},e.svg_Card||e.text_Card?r.default.createElement("header",null,e.svg_Card?r.default.createElement("figure",null,r.default.createElement(s,{Icon:e.svg_Card})):r.default.createElement("span",null,e.text_Card)):e.img_Card?r.default.createElement("picture",null,r.default.createElement("img",{src:e.img_Card})):null,e.text_CardTitle||e.text_CardSub?r.default.createElement("footer",null,e.text_CardTitle&&r.default.createElement("h2",null,e.text_CardTitle),e.text_CardSub&&r.default.createElement("h5",null,e.text_CardSub),e.children):null),exports.Page=zt,exports.PageAlwaysVisible=Dt,exports.PageCards=Qt,exports.PageDesktopOnly=Vt,exports.PageDesktopPadding=Kt,exports.PageForty=Gt,exports.PageSingle=qt,exports.PageSingleHeader=Ot,exports.PageSingleRight=Ut,exports.PageSingleleft=Wt,exports.PageSixty=Ht,exports.PageSub=Xt,exports.PageSubActions=Yt,exports.PageSubTitle=Jt,exports.PageTitle=jt,exports.PageTools=Ft,exports.PageToolsCards=ea,exports.Radio_=e=>r.default.createElement(le,{key:e.key},e.variant_Input?r.default.createElement(q,{text_Placeholder:e.text_RadioPlaceholder}):r.default.createElement("label",{for:e.id_Radio},r.default.createElement("p",null,e.text_RadioLabel)),r.default.createElement(ie,{className:"RadioCircle"},r.default.createElement("input",{name:e.name_Radio,type:"radio",id:e.id_Radio,checked:e.bool_RadioChecked}),r.default.createElement("span",{className:"RadioCustom"}),r.default.createElement(s,{Icon:"Sun",class_Icon:"RadioIcon"}))),exports.RegionContext=X,exports.Sidebar_=e=>r.default.createElement(At,null,r.default.createElement(It,null,r.default.createElement("h5",{className:e.classNames+"SidebarButtonTitle"},e.text_title),r.default.createElement("picture",null,r.default.createElement(IconSvg,{Icon:e.icon})))),exports.Slider=ca,exports.SliderContainer=ma,exports.SliderGrid=ha,exports.SliderOverlay=sa,exports.SliderTitle=ua,exports.SliderWrapper=da,exports.Steps=aa,exports.StepsActions=ia,exports.StepsComplete=ra,exports.StepsContainer=oa,exports.StepsCurrent=na,exports.StepsWrapper=la,exports.Steps_=e=>r.default.createElement(Pt,null,r.default.createElement(Bt,{array_Steps:e.array_Steps,int_CurrentStep:e.int_CurrentStep}),r.default.createElement(Zt,null,e.array_Steps.map(((t,n)=>r.default.createElement(a.CSSTransition,{in:e.int_CurrentStep===n,timeout:500,unmountOnExit:!0,classNames:"Steps"},r.default.createElement(Nt,{className:"Steps"},t)))))),exports.Steps_Actions=e=>r.default.createElement(Tt,null,r.default.createElement(g,{icon_Left:e.icon_Grey,text_Button:e.text_Grey,onClick:e.onClick_Grey}),r.default.createElement(v,{icon_Right:e.icon_Main,text_Button:e.text_Main,onClick:e.onClick_Main})),exports.Textarea_=e=>{const[t,a]=r.default.useState(0);return r.default.createElement(ce,null,r.default.createElement(G,{placeholder:e.text_Placeholder,rows:e.rows?e.rows:"5",onChange:e.onChange_Textarea?e.onChange_Textarea:e=>(e=>{a(e.target.value.length)})(e)},e.text_Prefill),e.int_Limit?r.default.createElement(se,{capped:t>e.int_Limit}," ",r.default.createElement("span",null,t)," / ",e.int_Limit):null,e.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,e.array_Errors?r.default.createElement($,{className:"ValidatorErrors"},e.array_Errors.map((e=>r.default.createElement(Z,null,r.default.createElement(s,{Icon:"Error"}),r.default.createElement("h6",null,e))))):null,e.array_Tips&&e.array_Helpers?r.default.createElement($,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e)))),e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Tips?r.default.createElement($,{className:"ValidatorHelpers"},e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Helpers?r.default.createElement($,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e))))):null)},exports.Theme=ta,exports.ThemeContext=Q,exports.ThemeDark={id:"dark",background:"var(--dark)",color:"var(--blanc)",low:"var(--gloomDark)",mid:"var(--gloom)",high:"var(--gloomLight)",overlay:"var(--blancOverlay)",in:"var(--insetShine)",inFocus:"var(--insetShineFocus)",out:"var(--outShine)",outFocus:"var(--outShineFocus)"},exports.ThemeLight={id:"light",background:"var(--white)",color:"var(--black)",low:"var(--greyLight)",mid:"var(--grey)",high:"var(--greyDark)",overlay:"var(--blackOverlay)",in:"var(--insetShadow)",inFocus:"var(--insetShadowFocus)",out:"var(--outShadow)",outFocus:"var(--outShadowFocus)"},exports.White_Plain=e=>r.default.createElement(x,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null);
|
|
1441
|
+
`;exports.Builder_=e=>r.default.createElement(ne,{key:e.key},e.text_BuilderTitle?r.default.createElement("h4",null,e.text_BuilderTitle):null,e.children),exports.Checkbox_=e=>r.default.createElement(re,{key:e.key},e.variant_Input?r.default.createElement(q,{text_Placeholder:e.text_CheckboxPlaceholder}):r.default.createElement("label",{for:e.id_Checkbox},r.default.createElement("p",null,e.text_CheckboxLabel)),r.default.createElement(oe,{className:"Check"},r.default.createElement("input",{type:"checkbox",id:e.id_Checkbox,checked:e.bool_Checked}),r.default.createElement("span",{className:"CheckCustom"}),r.default.createElement(s,{Icon:"Check",class_Icon:"CheckIcon"}))),exports.Confirmation_=e=>r.default.createElement(A,null,r.default.createElement(I,null,r.default.createElement("h4",null,e.text_Confirmation),r.default.createElement($,null,r.default.createElement(v,{onClick:e.onClick_Primary,icon_Left:e.icon_Primary,text_Button:e.text_Primary}),r.default.createElement(_,{onClick:e.onClick_Secondary,icon_Left:e.icon_Secondary,text_Button:e.text_Secondary})))),exports.Cta_=c,exports.Delete_Plain=k,exports.Dropdown_=W,exports.Edit_=e=>r.default.createElement(d,{variant_Size:"normal",onClick:e.onClick},r.default.createElement(s,{Icon:e.icon})),exports.Elastic_Search=t=>{let a={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:[t.text_suggestionType]},n=t.file;const[o,l]=e.useState({query:"",file:n,notfoundmessage:!1}),[i,c]=e.useState(!1),[d,u]=e.useState(0),m=e=>{t.onSuggestions(e),l({...o,query:""})},h=e=>{"ArrowUp"==e.key&&(e.preventDefault(),u(0===d?i.length-1:d-1)),"ArrowDown"==e.key&&(e.preventDefault(),d===i.length-1?u(0):u(d+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),m(i[d].item?i[d].item:i[d]))};return e.useEffect((()=>{a.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new Je(n,a);let r=o.query?e.search(o.query):n;r=r.slice(0,t.size),c(r)}),[o]),e.useEffect((()=>{t.getInput&&i?.length>0?t.getInput(i[0]?.item):t.getSuggestions&&i?.length>0&&o.query.length?t.getSuggestions(i):t.getSuggestions&&!o.query.length&&t.getSuggestions([])}),[i]),r.default.createElement(Qe,null,r.default.createElement(et,{id:"elasticSearch",autoComplete:"off",type:"text",placeholder:t.text_placeHolder,onChange:e=>{const{target:a={}}=e,{value:n=""}=a;let r=Ye.toGreek(n);l({...o,query:t.sanitize?r:n})},defaultValue:t.text_DefaulValue,onKeyPress:e=>h(e),onKeyDown:e=>h(e)}),r.default.createElement(tt,null,t.text_Placeholder),t.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,o.query&&i?r.default.createElement("ul",null,i.map(((e,a)=>r.default.createElement("li",{className:a===d%i.length?"ElasticSelected":"",key:a,onClick:()=>m(e?.item?e.item:e)},r.default.createElement("p",null,e?.item?e.item[t.text_suggestionType]:e[t.text_suggestionType]))))):null)},exports.Focus_=e=>r.default.createElement(u,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.Focus_Plain=e=>r.default.createElement(m,{variant_Size:e.variant_Size,onClick:e.onClick,onFocus:e.onFocus},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.Form=F,exports.FormGroup=K,exports.FormInput=D,exports.FormLabel=V,exports.FormList=j,exports.Grey_=g,exports.Grey_Link=e=>r.default.createElement(f,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null),exports.HamContext=Y,exports.IconSvg=s,exports.Input_=q,exports.Input_Phone=t=>{const{region:a}=e.useContext(X);return r.default.createElement(ee,null,r.default.createElement(te,null,r.default.createElement(W,null,r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},"Greece"===a?r.default.createElement("option",{selected:!0},"🇬🇷 +30"):"Deutschland"===a?r.default.createElement("option",{selected:!0},"🇩🇪 +49"):r.default.createElement("option",{selected:!0},"🇬🇷 +30"))),r.default.createElement(W,{array_Dropdown:t.array_PhoneDropdown})),r.default.createElement(q,{text_Placeholder:t.text_PhonePlaceholder,bool_Required:t.bool_Required,variant_List:!0,array_List:t.array_PhoneList,icon_List:t.icon_PhoneList}))},exports.Input_Phone_Register=t=>{const{region:a}=e.useContext(X);return r.default.createElement(ae,null,r.default.createElement(W,null,"Greece"===a?r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇬🇷 +30"),r.default.createElement("option",null,"🇩🇪 +49")):"Deutschland"===a?r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇩🇪 +49"),r.default.createElement("option",null,"🇬🇷 +30")):r.default.createElement("select",{className:"Dropdown_EmojiAdapt"},r.default.createElement("option",{selected:!0},"🇬🇷 +30"),r.default.createElement("option",null,"🇩🇪 +49"))),r.default.createElement(q,{class_Input:t.class_Input,text_Placeholder:t.text_Placeholder,id_Input:t.id_Input,onChange_Input:t.onChange_Input,text_Defaultvalue:t.text_Defaultvalue,onKeyPress_Input:t.onKeyPress_Input,onKeyDown_Input:t.onKeyDown_Input}))},exports.LangContext=U,exports.Main_=v,exports.Main_Plain=_,exports.MenuContext=J,exports.Nav_=e=>r.default.createElement(St,null,r.default.createElement(rt,{onClick_Logo:e.onClick_Logo}),r.default.createElement(lt,{onClick_Cta:e.onClick_Cta,text_Cta:e.text_Cta}),"Protected"===e.role?r.default.createElement(Mt,{role:e.role,img_Account:e.img_Account,img_Account_Main:e.img_Account,imgAlt_Account:e.imgAlt_Account,imgAlt_Account_Main:e.imgAlt_Account,firstname_Account:e.firstname_Account,text_Account_Main:e.firstname_Account,onClick_Account:e.onClick_Account,onCLick_Account_Main:e.onClick_Account,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,onClick_Settings_Main:e.onClick_Settings_Main,text_Settings_Main:e.text_Settings_Main,onCLick_Logout:e.onCLick_Logout,text_Logout:e.text_Logout,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language}):r.default.createElement(Lt,{role:e.role,onClick_Login:e.onClick_Login,text_Login:e.text_Login,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language})),exports.On_Click_Card=e=>r.default.createElement(M,{variant_CardText:e.variant_CardText},e.svg_Card||e.text_Card?r.default.createElement("header",null,e.svg_Card?r.default.createElement("figure",null,r.default.createElement(s,{Icon:e.svg_Card})):r.default.createElement("span",null,e.text_Card)):e.img_Card?r.default.createElement("picture",null,r.default.createElement("img",{src:e.img_Card})):null,e.text_CardTitle||e.text_CardSub?r.default.createElement("footer",null,e.text_CardTitle&&r.default.createElement("h2",null,e.text_CardTitle),e.text_CardSub&&r.default.createElement("h5",null,e.text_CardSub),e.children):null),exports.Page=zt,exports.PageAlwaysVisible=Dt,exports.PageCards=Qt,exports.PageDesktopOnly=Vt,exports.PageDesktopPadding=Kt,exports.PageForty=Gt,exports.PageSingle=qt,exports.PageSingleHeader=Ot,exports.PageSingleRight=Ut,exports.PageSingleleft=Wt,exports.PageSixty=Ht,exports.PageSub=Xt,exports.PageSubActions=Yt,exports.PageSubTitle=Jt,exports.PageTitle=jt,exports.PageTools=Ft,exports.PageToolsCards=ea,exports.Radio_=e=>r.default.createElement(le,{key:e.key},e.variant_Input?r.default.createElement(q,{text_Placeholder:e.text_RadioPlaceholder}):r.default.createElement("label",{for:e.id_Radio},r.default.createElement("p",null,e.text_RadioLabel)),r.default.createElement(ie,{className:"RadioCircle"},r.default.createElement("input",{name:e.name_Radio,type:"radio",id:e.id_Radio,checked:e.bool_RadioChecked}),r.default.createElement("span",{className:"RadioCustom"}),r.default.createElement(s,{Icon:"Sun",class_Icon:"RadioIcon"}))),exports.RegionContext=X,exports.Sidebar_=e=>r.default.createElement(At,null,r.default.createElement(It,null,r.default.createElement("h5",{className:e.classNames+"SidebarButtonTitle"},e.text_title),r.default.createElement("picture",null,r.default.createElement(IconSvg,{Icon:e.icon})))),exports.Slider=ca,exports.SliderContainer=ma,exports.SliderGrid=ha,exports.SliderOverlay=sa,exports.SliderTitle=ua,exports.SliderWrapper=da,exports.Steps=aa,exports.StepsActions=ia,exports.StepsComplete=ra,exports.StepsContainer=oa,exports.StepsCurrent=na,exports.StepsWrapper=la,exports.Steps_=e=>r.default.createElement(Pt,null,r.default.createElement(Bt,{array_Steps:e.array_Steps,int_CurrentStep:e.int_CurrentStep}),r.default.createElement(Zt,null,e.array_Steps.map(((t,n)=>r.default.createElement(a.CSSTransition,{in:e.int_CurrentStep===n,timeout:500,unmountOnExit:!0,classNames:"Steps"},r.default.createElement(Nt,{className:"Steps"},t)))))),exports.Steps_Actions=e=>r.default.createElement($t,null,r.default.createElement(g,{icon_Left:e.icon_Grey,text_Button:e.text_Grey,onClick:e.onClick_Grey}),r.default.createElement(v,{icon_Right:e.icon_Main,text_Button:e.text_Main,onClick:e.onClick_Main})),exports.Textarea_=e=>{const[t,a]=r.default.useState(0);return r.default.createElement(ce,null,r.default.createElement(G,{placeholder:e.text_Placeholder,rows:e.rows?e.rows:"5",onChange:e.onChange_Textarea?e.onChange_Textarea:e=>(e=>{a(e.target.value.length)})(e)},e.text_Prefill),e.int_Limit?r.default.createElement(se,{capped:t>e.int_Limit}," ",r.default.createElement("span",null,t)," / ",e.int_Limit):null,e.bool_Required?r.default.createElement(N,{className:"ValidatorRequired"},r.default.createElement(s,{Icon:"Asterisk"})):null,e.array_Errors?r.default.createElement(T,{className:"ValidatorErrors"},e.array_Errors.map((e=>r.default.createElement(Z,null,r.default.createElement(s,{Icon:"Error"}),r.default.createElement("h6",null,e))))):null,e.array_Tips&&e.array_Helpers?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e)))),e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Tips?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Tips.map((e=>r.default.createElement(B,null,r.default.createElement(s,{Icon:"Tip"}),r.default.createElement("h6",null,e))))):e.array_Helpers?r.default.createElement(T,{className:"ValidatorHelpers"},e.array_Helpers.map((e=>r.default.createElement(P,null,r.default.createElement(s,{Icon:"Warning"}),r.default.createElement("h6",null,e))))):null)},exports.Theme=ta,exports.ThemeContext=Q,exports.ThemeDark={id:"dark",background:"var(--dark)",color:"var(--blanc)",low:"var(--gloomDark)",mid:"var(--gloom)",high:"var(--gloomLight)",overlay:"var(--blancOverlay)",in:"var(--insetShine)",inFocus:"var(--insetShineFocus)",out:"var(--outShine)",outFocus:"var(--outShineFocus)"},exports.ThemeLight={id:"light",background:"var(--white)",color:"var(--black)",low:"var(--greyLight)",mid:"var(--grey)",high:"var(--greyDark)",overlay:"var(--blackOverlay)",in:"var(--insetShadow)",inFocus:"var(--insetShadowFocus)",out:"var(--outShadow)",outFocus:"var(--outShadowFocus)"},exports.White_Plain=e=>r.default.createElement(x,{variant_Size:e.variant_Size,onClick:e.onClick},e.icon_Left?r.default.createElement(s,{Icon:e.icon_Left}):null,e.text_Button?r.default.createElement("span",null,e.text_Button):null,e.icon_Right?r.default.createElement(s,{Icon:e.icon_Right}):null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monica-alexandria",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.40",
|
|
4
4
|
"description": "A styled-components styles library for Doitforme platorm and universal tweeks to create your own new styled library for your project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -8,6 +8,32 @@ var greekUtils = require("greek-utils");
|
|
|
8
8
|
|
|
9
9
|
const ElasticSearch = styled(FormGroup)`
|
|
10
10
|
|
|
11
|
+
ul{
|
|
12
|
+
margin-top: 1rem;
|
|
13
|
+
background: ${props => props.theme.background};
|
|
14
|
+
box-shadow: ${props => props.theme.out};
|
|
15
|
+
border-radius: var(--smallRadius);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
transition: all .5s ease;
|
|
18
|
+
|
|
19
|
+
li{
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
gap: 1rem;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
padding: var(--normalPads);
|
|
26
|
+
transition: background .5s;
|
|
27
|
+
|
|
28
|
+
&:hover{
|
|
29
|
+
background: ${props => props.theme.low};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ElasticSelected{
|
|
34
|
+
background: ${props => props.theme.low};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
11
37
|
`
|
|
12
38
|
|
|
13
39
|
const ElasticInput = styled(FormInput)`
|
|
@@ -97,8 +123,6 @@ export const Elastic_Search = (props) => {
|
|
|
97
123
|
send_input_suggestion();
|
|
98
124
|
},[suggestions])
|
|
99
125
|
|
|
100
|
-
console.log(suggestions.query);
|
|
101
|
-
|
|
102
126
|
return (
|
|
103
127
|
<ElasticSearch>
|
|
104
128
|
<ElasticInput
|
|
@@ -119,12 +143,17 @@ export const Elastic_Search = (props) => {
|
|
|
119
143
|
:
|
|
120
144
|
null
|
|
121
145
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
146
|
+
{currentSearch.query && suggestions ?
|
|
147
|
+
<ul>
|
|
148
|
+
{suggestions.map((item,i)=>(
|
|
149
|
+
<li className={i=== highlighted % suggestions.length ? "ElasticSelected": ""} key={i} onClick={() => send_clicked_suggestion(item?.item? item.item: item)}>
|
|
150
|
+
<p>{item?.item? item.item[props.text_suggestionType]: item[props.text_suggestionType]}</p>
|
|
151
|
+
</li>
|
|
152
|
+
))}
|
|
153
|
+
</ul>
|
|
154
|
+
:
|
|
155
|
+
null
|
|
156
|
+
}
|
|
128
157
|
</ElasticSearch>
|
|
129
158
|
)
|
|
130
159
|
}
|