diff --git a/app/Modules/IncomingLetter/IncomingLetterModule.php b/app/Modules/IncomingLetter/IncomingLetterModule.php index 7267878..9798f7e 100644 --- a/app/Modules/IncomingLetter/IncomingLetterModule.php +++ b/app/Modules/IncomingLetter/IncomingLetterModule.php @@ -4,7 +4,6 @@ namespace App\Modules\IncomingLetter; use App\Modules\Makeable; use App\Modules\ModuleContract; -use Illuminate\Database\Eloquent\SoftDeletes; class IncomingLetterModule implements ModuleContract { diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index c313a4a..162af3f 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -16,6 +16,7 @@ use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Session\Middleware\AuthenticateSession; use Illuminate\Session\Middleware\StartSession; use Illuminate\View\Middleware\ShareErrorsFromSession; +use pxlrbt\FilamentSpotlight\SpotlightPlugin; class AdminPanelProvider extends PanelProvider { @@ -51,6 +52,9 @@ class AdminPanelProvider extends PanelProvider ->spa() ->authMiddleware([ Authenticate::class, + ]) + ->plugins([ + SpotlightPlugin::make(), ]); return $panel; diff --git a/composer.json b/composer.json index 45b34d7..cdf13a5 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "laravel/framework": "^11.9", "laravel/tinker": "^2.9", "phpoffice/phpspreadsheet": "^3.3", - "phpoffice/phpword": "^1.3" + "phpoffice/phpword": "^1.3", + "pxlrbt/filament-spotlight": "^1.3" }, "require-dev": { "barryvdh/laravel-ide-helper": "^3.2", diff --git a/composer.lock b/composer.lock index 530437b..397ab3f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c5e3e156b6775d0bb4507a50ddce50a", + "content-hash": "55801972ed58a124b181945f6488dd4e", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -4857,6 +4857,72 @@ }, "time": "2024-06-10T01:18:23+00:00" }, + { + "name": "pxlrbt/filament-spotlight", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/pxlrbt/filament-spotlight.git", + "reference": "85e6f0073d521f2eeb1c6af2554b354f1085e23b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pxlrbt/filament-spotlight/zipball/85e6f0073d521f2eeb1c6af2554b354f1085e23b", + "reference": "85e6f0073d521f2eeb1c6af2554b354f1085e23b", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0.0-stable", + "php": "^8.0", + "wire-elements/spotlight": "^2.0" + }, + "require-dev": { + "laravel/pint": "^1.10" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "pxlrbt\\FilamentSpotlight\\SpotlightServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "pxlrbt\\FilamentSpotlight\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dennis Koch", + "email": "info@pixelarbeit.de" + } + ], + "description": "Spotlight for Filament Admin", + "keywords": [ + "alfred", + "filament", + "laravel", + "laravel-filament", + "spotlight", + "wire-elements" + ], + "support": { + "issues": "https://github.com/pxlrbt/filament-spotlight/issues", + "source": "https://github.com/pxlrbt/filament-spotlight/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://github.com/pxlrbt", + "type": "github" + } + ], + "time": "2024-11-18T14:17:47+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -7901,6 +7967,80 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "wire-elements/spotlight", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/wire-elements/spotlight.git", + "reference": "1d64ebdc9ea56761f6be0e5554765ce498fb16a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wire-elements/spotlight/zipball/1d64ebdc9ea56761f6be0e5554765ce498fb16a8", + "reference": "1d64ebdc9ea56761f6be0e5554765ce498fb16a8", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0", + "livewire/livewire": "^3.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.4.3" + }, + "require-dev": { + "brianium/paratest": "^6.2|^7.4", + "nunomaduro/collision": "^5.3|^8.0", + "orchestra/testbench": "^6.15|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.3|^10.5", + "vimeo/psalm": "^4.4|^5.22" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "LivewireUI\\Spotlight\\SpotlightServiceProvider" + ], + "aliases": { + "Spotlight": "LivewireUI\\Spotlight\\SpotlightFacade" + } + } + }, + "autoload": { + "psr-4": { + "LivewireUI\\Spotlight\\": "src", + "LivewireUI\\Spotlight\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Philo Hermans", + "email": "support@wire-elements.dev", + "role": "Developer" + } + ], + "description": "Livewire component that provides Spotlight/Alfred-like functionality to your Laravel application.", + "homepage": "https://github.com/wire-elements/spotlight", + "keywords": [ + "laravel", + "livewire-ui", + "spotlight" + ], + "support": { + "issues": "https://github.com/wire-elements/spotlight/issues", + "source": "https://github.com/wire-elements/spotlight/tree/2.0.1" + }, + "funding": [ + { + "url": "https://github.com/livewire-ui", + "type": "github" + } + ], + "time": "2024-03-02T12:10:01+00:00" } ], "packages-dev": [ diff --git a/lang/vendor/livewire-ui-spotlight/en/spotlight.php b/lang/vendor/livewire-ui-spotlight/en/spotlight.php new file mode 100644 index 0000000..1bb43a8 --- /dev/null +++ b/lang/vendor/livewire-ui-spotlight/en/spotlight.php @@ -0,0 +1,5 @@ + 'What do you want to do?', +]; diff --git a/public/css/pxlrbt/filament-spotlight/spotlight-css.css b/public/css/pxlrbt/filament-spotlight/spotlight-css.css new file mode 100644 index 0000000..25da65a --- /dev/null +++ b/public/css/pxlrbt/filament-spotlight/spotlight-css.css @@ -0,0 +1 @@ +.right-5{right:1.25rem}.ml-1{margin-left:.25rem}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.pt-16{padding-top:4rem}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity))}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.duration-150,.transition-opacity{transition-duration:.15s}[x-cloak=""]{display:none!important}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.focus\:border-0:focus{border-width:0}.focus\:border-transparent:focus{border-color:transparent}.focus\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.sm\:pt-24{padding-top:6rem}} \ No newline at end of file diff --git a/public/js/pxlrbt/filament-spotlight/spotlight-js.js b/public/js/pxlrbt/filament-spotlight/spotlight-js.js new file mode 100644 index 0000000..081b1c7 --- /dev/null +++ b/public/js/pxlrbt/filament-spotlight/spotlight-js.js @@ -0,0 +1 @@ +(()=>{var e,t={794:(e,t,n)=>{n(27)},27:(e,t,n)=>{"use strict";function s(e){return Array.isArray?Array.isArray(e):"[object Array]"===d(e)}n.r(t);const i=1/0;function r(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}function c(e){return"string"==typeof e}function o(e){return"number"==typeof e}function h(e){return!0===e||!1===e||function(e){return a(e)&&null!==e}(e)&&"[object Boolean]"==d(e)}function a(e){return"object"==typeof e}function l(e){return null!=e}function u(e){return!e.trim().length}function d(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const p=e=>`Missing ${e} property in key`,g=e=>`Property 'weight' in key '${e}' must be a positive integer`,f=Object.prototype.hasOwnProperty;class m{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=y(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 y(e){let t=null,n=null,i=null,r=1,o=null;if(c(e)||s(e))i=e,t=M(e),n=x(e);else{if(!f.call(e,"name"))throw new Error(p("name"));const s=e.name;if(i=s,f.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(g(s));t=M(s),n=x(s),o=e.getFn}return{path:t,id:n,weight:r,src:i,getFn:o}}function M(e){return s(e)?e:e.split(".")}function x(e){return s(e)?e.join("."):e}var v={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(l(e))if(t[u]){const d=e[t[u]];if(!l(d))return;if(u===t.length-1&&(c(d)||o(d)||h(d)))n.push(r(d));else if(s(d)){i=!0;for(let e=0,n=d.length;e{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,c(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();c(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(l(r))if(s(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:n,value:i}=t.pop();if(l(i))if(c(i)&&!u(i)){let t={v:i,i:n,n:this.norm.get(i)};e.push(t)}else s(i)&&i.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[i]=e}else if(c(r)&&!u(r)){let e={v:r,n:this.norm.get(r)};n.$[i]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function L(e,t,{getFn:n=v.getFn,fieldNormWeight:s=v.fieldNormWeight}={}){const i=new k({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(y)),i.setSources(t),i.create(),i}function S(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=v.distance,ignoreLocation:r=v.ignoreLocation}={}){const c=t/e.length;if(r)return c;const o=Math.abs(s-n);return i?c+o/i:o?1:c}const I=32;function C(e,t,n,{location:s=v.location,distance:i=v.distance,threshold:r=v.threshold,findAllMatches:c=v.findAllMatches,minMatchCharLength:o=v.minMatchCharLength,includeMatches:h=v.includeMatches,ignoreLocation:a=v.ignoreLocation}={}){if(t.length>I)throw new Error(`Pattern length exceeds max of ${I}.`);const l=t.length,u=e.length,d=Math.max(0,Math.min(s,u));let p=r,g=d;const f=o>1||h,m=f?Array(u):[];let y;for(;(y=e.indexOf(t,g))>-1;){let e=S(t,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:a});if(p=Math.min(e,p),g=y+l,f){let e=0;for(;e=h;r-=1){let c=r-1,o=n[e.charAt(c)];if(f&&(m[c]=+!!o),v[r]=(v[r+1]<<1|1)&o,s&&(v[r]|=(M[r+1]|M[r])<<1|1|M[r+1]),v[r]&k&&(x=S(t,{errors:s,currentLocation:c,expectedLocation:d,distance:i,ignoreLocation:a}),x<=p)){if(p=x,g=c,g<=d)break;h=Math.max(1,2*d-g)}}if(S(t,{errors:s+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:a})>p)break;M=v}const L={isMatch:g>=0,score:Math.max(.001,x)};if(f){const e=function(e=[],t=v.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let c=e.length;r=t&&n.push([s,i]),s=-1)}return e[r-1]&&r-s>=t&&n.push([s,r-1]),n}(m,o);e.length?h&&(L.indices=e):L.isMatch=!1}return L}function _(e){let t={};for(let n=0,s=e.length;n{this.chunks.push({pattern:e,alphabet:_(e),startIndex:t})},l=this.pattern.length;if(l>I){let e=0;const t=l%I,n=l-t;for(;e{const{isMatch:g,score:f,indices:m}=C(e,t,d,{location:s+p,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:o,includeMatches:n,ignoreLocation:h});g&&(u=!0),l+=f,g&&m&&(a=[...a,...m])}));let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&n&&(d.indices=a),d}}class b{constructor(e){this.pattern=e}static isMultiMatch(e){return O(e,this.multiRegex)}static isSingleMatch(e){return O(e,this.singleRegex)}search(){}}function O(e,t){const n=e.match(t);return n?n[1]:null}class E extends b{constructor(e,{location:t=v.location,threshold:n=v.threshold,distance:s=v.distance,includeMatches:i=v.includeMatches,findAllMatches:r=v.findAllMatches,minMatchCharLength:c=v.minMatchCharLength,isCaseSensitive:o=v.isCaseSensitive,ignoreLocation:h=v.ignoreLocation}={}){super(e),this._bitapSearch=new $(e,{location:t,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:o,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class A extends b{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const s=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,s.push([t,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}}const R=[class extends b{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]}}},A,class extends b{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 b{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 b{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 b{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 b{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]}}},E],F=R.length,N=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const D=new Set([E.type,A.type]);class j{constructor(e,{isCaseSensitive:t=v.isCaseSensitive,includeMatches:n=v.includeMatches,minMatchCharLength:s=v.minMatchCharLength,ignoreLocation:i=v.ignoreLocation,findAllMatches:r=v.findAllMatches,location:c=v.location,threshold:o=v.threshold,distance:h=v.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:s,findAllMatches:r,ignoreLocation:i,location:c,threshold:o,distance:h},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(N).filter((e=>e&&!!e.trim())),s=[];for(let e=0,i=n.length;e!(!e[q]&&!e[T]),Q=e=>({[q]:Object.keys(e).map((t=>({[t]:e[t]})))});function V(e,t,{auto:n=!0}={}){const i=e=>{let r=Object.keys(e);const o=(e=>!!e[z])(e);if(!o&&r.length>1&&!K(e))return i(Q(e));if((e=>!s(e)&&a(e)&&!K(e))(e)){const s=o?e[z]:r[0],i=o?e[J]:e[s];if(!c(i))throw new Error((e=>`Invalid value for key ${e}`)(s));const h={keyId:x(s),pattern:i};return n&&(h.searcher=P(i,t)),h}let h={children:[],operator:r[0]};return r.forEach((t=>{const n=e[t];s(n)&&n.forEach((e=>{h.children.push(i(e))}))})),h};return K(e)||(e=Q(e)),i(e)}function U(e,t){const n=e.matches;t.matches=[],l(n)&&n.forEach((e=>{if(!l(e.indices)||!e.indices.length)return;const{indices:n,value:s}=e;let i={indices:n,value:s};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function B(e,t){t.score=e.score}class G{constructor(e,t={},n){this.options={...v,...t},this.options.useExtendedSearch,this._keyStore=new m(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect 'index' type");this._myIndex=t||L(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,s=this._docs.length;n{let n=1;e.matches.forEach((({key:e,norm:s,score:i})=>{const r=e?e.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(t?1:s))})),e.score=n}))}(a,{ignoreFieldNorm:h}),i&&a.sort(r),o(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=v.includeMatches,includeScore:s=v.includeScore}={}){const i=[];return n&&i.push(U),s&&i.push(B),e.map((e=>{const{idx:n}=e,s={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,s)})),s}))}(a,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const t=P(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach((({v:e,i:n,n:i})=>{if(!l(e))return;const{isMatch:r,score:c,indices:o}=t.searchIn(e);r&&s.push({item:e,idx:n,matches:[{score:c,value:e,norm:i,indices:o}]})})),s}_searchLogical(e){const t=V(e,this.options),n=(e,t,s)=>{if(!e.children){const{keyId:n,searcher:i}=e,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return r&&r.length?[{idx:s,item:t,matches:r}]:[]}const i=[];for(let r=0,c=e.children.length;r{if(l(e)){let c=n(t,e,s);c.length&&(i[s]||(i[s]={idx:s,item:e,matches:[]},r.push(i[s])),c.forEach((({matches:e})=>{i[s].matches.push(...e)})))}})),r}_searchObjectList(e){const t=P(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach((({$:e,i:s})=>{if(!l(e))return;let r=[];n.forEach(((n,s)=>{r.push(...this._findMatches({key:n,value:e[s],searcher:t}))})),r.length&&i.push({idx:s,item:e,matches:r})})),i}_findMatches({key:e,value:t,searcher:n}){if(!l(t))return[];let i=[];if(s(t))t.forEach((({v:t,i:s,n:r})=>{if(!l(t))return;const{isMatch:c,score:o,indices:h}=n.searchIn(t);c&&i.push({score:o,key:e,value:t,idx:s,norm:r,indices:h})}));else{const{v:s,n:r}=t,{isMatch:c,score:o,indices:h}=n.searchIn(s);c&&i.push({score:o,key:e,value:s,norm:r,indices:h})}return i}}G.version="6.6.2",G.createIndex=L,G.parseIndex=function(e,{getFn:t=v.getFn,fieldNormWeight:n=v.fieldNormWeight}={}){const{keys:s,records:i}=e,r=new k({getFn:t,fieldNormWeight:n});return r.setKeys(s),r.setIndexRecords(i),r},G.config=v,G.parseQuery=V,function(...e){W.push(...e)}(j),window.LivewireUISpotlight=function(e){return{inputPlaceholder:e.placeholder,searchEngine:"commands",commands:e.commands,commandSearch:null,selectedCommand:null,dependencySearch:null,dependencyQueryResults:window.Livewire.find(e.componentId).entangle("dependencyQueryResults"),requiredDependencies:[],currentDependency:null,resolvedDependencies:{},showResultsWithoutInput:e.showResultsWithoutInput,init:function(){var t=this;this.commandSearch=new G(this.commands,{threshold:.3,keys:["name","description","synonyms"]}),this.dependencySearch=new G([],{threshold:.3,keys:["name","description","synonyms"]}),this.$watch("dependencyQueryResults",(function(e){t.dependencySearch.setCollection(e)})),this.$watch("input",(function(e){0===e.length&&(t.selected=0),null!==t.selectedCommand&&null!==t.currentDependency&&"search"===t.currentDependency.type&&t.$wire.searchDependency(t.selectedCommand.id,t.currentDependency.id,e,t.resolvedDependencies)})),this.$watch("isOpen",(function(n){!1===n&&setTimeout((function(){t.input="",t.inputPlaceholder=e.placeholder,t.searchEngine="commands",t.resolvedDependencies={},t.selectedCommand=null,t.currentDependency=null,t.selectedCommand=null,t.requiredDependencies=[]}),300)}))},isOpen:!1,toggleOpen:function(){var e=this;this.isOpen?this.isOpen=!1:(this.input="",this.isOpen=!0,setTimeout((function(){e.$refs.input.focus()}),100))},input:"",filteredItems:function(){return"commands"===this.searchEngine?!this.input&&this.showResultsWithoutInput?this.commandSearch.getIndex().docs.map((function(e,t){return[{item:e},t]})):this.commandSearch.search(this.input).map((function(e,t){return[e,t]})):"search"===this.searchEngine?!this.input&&this.showResultsWithoutInput?this.dependencySearch.getIndex().docs.map((function(e,t){return[{item:e},t]})):this.dependencySearch.search(this.input).map((function(e,t){return[e,t]})):[]},selectUp:function(){var e=this;this.selected=Math.max(0,this.selected-1),this.$nextTick((function(){e.$refs.results.children[e.selected+1].scrollIntoView({block:"nearest"})}))},selectDown:function(){var e=this;this.selected=Math.min(this.filteredItems().length-1,this.selected+1),this.$nextTick((function(){e.$refs.results.children[e.selected+1].scrollIntoView({block:"nearest"})}))},go:function(e){var t,n=this;(null===this.selectedCommand&&(this.selectedCommand=this.commands.find((function(t){return t.id===(e||n.filteredItems()[n.selected][0].item.id)})),this.requiredDependencies=JSON.parse(JSON.stringify(this.selectedCommand.dependencies))),null!==this.currentDependency)&&(t="search"===this.currentDependency.type?e||this.filteredItems()[this.selected][0].item.id:this.input,this.resolvedDependencies[this.currentDependency.id]=t);this.requiredDependencies.length>0?(this.input="",this.currentDependency=this.requiredDependencies.pop(),this.inputPlaceholder=this.currentDependency.placeholder,this.searchEngine="search"===this.currentDependency.type&&"search"):(this.isOpen=!1,this.$wire.execute(this.selectedCommand.id,this.resolvedDependencies))},selected:0}}},578:()=>{}},n={};function s(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,s),r.exports}s.m=t,e=[],s.O=(t,n,i,r)=>{if(!n){var c=1/0;for(l=0;l=r)&&Object.keys(s.O).every((e=>s.O[e](n[h])))?n.splice(h--,1):(o=!1,r0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[n,i,r]},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={845:0,410:0};s.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,[c,o,h]=n,a=0;if(c.some((t=>0!==e[t]))){for(i in o)s.o(o,i)&&(s.m[i]=o[i]);if(h)var l=h(s)}for(t&&t(n);as(794)));var i=s.O(void 0,[410],(()=>s(578)));i=s.O(i)})(); \ No newline at end of file