[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 4\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[*.yml]\nindent_size = 2\n"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  extends: ['eslint:recommended'],\n  parser: 'babel-eslint',\n  parserOptions: {\n    sourceType: 'module',\n    ecmaFeatures: {\n      jsx: true\n    }\n  },\n  rules: {\n    'no-console': 'off',\n    'no-undef': 'off',\n    'svelte3/named-blocks': 'off'\n  }\n};\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto\n*.css linguist-vendored\n*.scss linguist-vendored\n*.js linguist-vendored\nCHANGELOG.md export-ignore\n"
  },
  {
    "path": ".gitignore",
    "content": "/node_modules\n/public/css\n/public/hot\n/public/js\n/public/mix-manifest.json\n/public/storage\n/storage/*.key\n/database/*.sqlite\n/vendor\n.DS_Store\n.env\n.php_cs.dist\n.phpunit.result.cache\nHomestead.json\nHomestead.yaml\nnpm-debug.log\nyarn-error.log\n.idea\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"printWidth\": 80,\n  \"singleQuote\": true,\n  \"tabWidth\": 2\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) Jonathan Reinink <jonathan@reinink.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Procfile",
    "content": "web: vendor/bin/heroku-php-apache2 public/\n"
  },
  {
    "path": "app/Account.php",
    "content": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass Account extends Model\n{\n    public function users()\n    {\n        return $this->hasMany(User::class);\n    }\n\n    public function organizations()\n    {\n        return $this->hasMany(Organization::class);\n    }\n\n    public function contacts()\n    {\n        return $this->hasMany(Contact::class);\n    }\n}\n"
  },
  {
    "path": "app/Console/Kernel.php",
    "content": "<?php\n\nnamespace App\\Console;\n\nuse Illuminate\\Console\\Scheduling\\Schedule;\nuse Illuminate\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n    /**\n     * The Artisan commands provided by your application.\n     *\n     * @var array\n     */\n    protected $commands = [\n        //\n    ];\n\n    /**\n     * Define the application's command schedule.\n     *\n     * @param  \\Illuminate\\Console\\Scheduling\\Schedule  $schedule\n     * @return void\n     */\n    protected function schedule(Schedule $schedule)\n    {\n        // $schedule->command('inspire')\n        //          ->hourly();\n    }\n\n    /**\n     * Register the commands for the application.\n     *\n     * @return void\n     */\n    protected function commands()\n    {\n        $this->load(__DIR__.'/Commands');\n\n        require base_path('routes/console.php');\n    }\n}\n"
  },
  {
    "path": "app/Contact.php",
    "content": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass Contact extends Model\n{\n    use SoftDeletes;\n\n    public function organization()\n    {\n        return $this->belongsTo(Organization::class);\n    }\n\n    public function getNameAttribute()\n    {\n        return $this->first_name.' '.$this->last_name;\n    }\n\n    public function scopeOrderByName($query)\n    {\n        $query->orderBy('last_name')->orderBy('first_name');\n    }\n\n    public function scopeFilter($query, array $filters)\n    {\n        $query->when($filters['search'] ?? null, function ($query, $search) {\n            $query->where(function ($query) use ($search) {\n                $query->where('first_name', 'like', '%'.$search.'%')\n                    ->orWhere('last_name', 'like', '%'.$search.'%')\n                    ->orWhere('email', 'like', '%'.$search.'%')\n                    ->orWhereHas('organization', function ($query) use ($search) {\n                        $query->where('name', 'like', '%'.$search.'%');\n                    });\n            });\n        })->when($filters['trashed'] ?? null, function ($query, $trashed) {\n            if ($trashed === 'with') {\n                $query->withTrashed();\n            } elseif ($trashed === 'only') {\n                $query->onlyTrashed();\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "app/Exceptions/Handler.php",
    "content": "<?php\n\nnamespace App\\Exceptions;\n\nuse Throwable;\nuse Inertia\\Inertia;\nuse Illuminate\\Support\\Facades\\App;\nuse Illuminate\\Foundation\\Exceptions\\Handler as ExceptionHandler;\n\nclass Handler extends ExceptionHandler\n{\n    /**\n     * A list of the exception types that are not reported.\n     *\n     * @var array\n     */\n    protected $dontReport = [\n        //\n    ];\n\n    /**\n     * A list of the inputs that are never flashed for validation exceptions.\n     *\n     * @var array\n     */\n    protected $dontFlash = [\n        'password',\n        'password_confirmation',\n    ];\n\n    /**\n     * Report or log an exception.\n     *\n     * @param  \\Throwable  $exception\n     * @return void\n     */\n    public function report(Throwable $exception)\n    {\n\n        if (app()->bound('sentry') && $this->shouldReport($exception)) {\n            app('sentry')->captureException($exception);\n        }\n\n        parent::report($exception);\n    }\n\n    /**\n     * Render an exception into an HTTP response.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @param  \\Throwable  $exception\n     * @return \\Illuminate\\Http\\Response\n     */\n    public function render($request, Throwable $exception)\n    {\n        $response = parent::render($request, $exception);\n\n        if (\n            (App::environment('production'))\n            && $request->header('X-Inertia')\n            && in_array($response->status(), [500, 503, 404, 403])\n        ) {\n            return Inertia::render('Error', ['status' => $response->status()])\n                ->toResponse($request)\n                ->setStatusCode($response->status());\n        }\n\n        return $response;\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Auth/ForgotPasswordController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Foundation\\Auth\\SendsPasswordResetEmails;\n\nclass ForgotPasswordController extends Controller\n{\n    /*\n    |--------------------------------------------------------------------------\n    | Password Reset Controller\n    |--------------------------------------------------------------------------\n    |\n    | This controller is responsible for handling password reset emails and\n    | includes a trait which assists in sending these notifications from\n    | your application to your users. Feel free to explore this trait.\n    |\n    */\n\n    use SendsPasswordResetEmails;\n\n    /**\n     * Create a new controller instance.\n     *\n     * @return void\n     */\n    public function __construct()\n    {\n        $this->middleware('guest');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Auth/LoginController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse Inertia\\Inertia;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\URL;\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Support\\Facades\\Session;\nuse Illuminate\\Support\\Facades\\Redirect;\nuse Illuminate\\Support\\Facades\\Response;\nuse Illuminate\\Foundation\\Auth\\AuthenticatesUsers;\n\nclass LoginController extends Controller\n{\n    /*\n    |--------------------------------------------------------------------------\n    | Login Controller\n    |--------------------------------------------------------------------------\n    |\n    | This controller handles authenticating users for the application and\n    | redirecting them to your home screen. The controller uses a trait\n    | to conveniently provide its functionality to your applications.\n    |\n    */\n\n    use AuthenticatesUsers;\n\n    /**\n     * Where to redirect users after login.\n     *\n     * @var string\n     */\n    protected $redirectTo = '/';\n\n    public function showLoginForm()\n    {\n        return Inertia::render('Auth/Login');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Auth/RegisterController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\User;\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Support\\Facades\\Hash;\nuse Illuminate\\Support\\Facades\\Validator;\nuse Illuminate\\Foundation\\Auth\\RegistersUsers;\n\nclass RegisterController extends Controller\n{\n    /*\n    |--------------------------------------------------------------------------\n    | Register Controller\n    |--------------------------------------------------------------------------\n    |\n    | This controller handles the registration of new users as well as their\n    | validation and creation. By default this controller uses a trait to\n    | provide this functionality without requiring any additional code.\n    |\n    */\n\n    use RegistersUsers;\n\n    /**\n     * Where to redirect users after registration.\n     *\n     * @var string\n     */\n    protected $redirectTo = '/home';\n\n    /**\n     * Create a new controller instance.\n     *\n     * @return void\n     */\n    public function __construct()\n    {\n        $this->middleware('guest');\n    }\n\n    /**\n     * Get a validator for an incoming registration request.\n     *\n     * @param  array  $data\n     * @return \\Illuminate\\Contracts\\Validation\\Validator\n     */\n    protected function validator(array $data)\n    {\n        return Validator::make($data, [\n            'name' => ['required', 'string', 'max:255'],\n            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n            'password' => ['required', 'string', 'min:8', 'confirmed'],\n        ]);\n    }\n\n    /**\n     * Create a new user instance after a valid registration.\n     *\n     * @param  array  $data\n     * @return \\App\\User\n     */\n    protected function create(array $data)\n    {\n        return User::create([\n            'name' => $data['name'],\n            'email' => $data['email'],\n            'password' => Hash::make($data['password']),\n        ]);\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Auth/ResetPasswordController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Foundation\\Auth\\ResetsPasswords;\n\nclass ResetPasswordController extends Controller\n{\n    /*\n    |--------------------------------------------------------------------------\n    | Password Reset Controller\n    |--------------------------------------------------------------------------\n    |\n    | This controller is responsible for handling password reset requests\n    | and uses a simple trait to include this behavior. You're free to\n    | explore this trait and override any methods you wish to tweak.\n    |\n    */\n\n    use ResetsPasswords;\n\n    /**\n     * Where to redirect users after resetting their password.\n     *\n     * @var string\n     */\n    protected $redirectTo = '/home';\n\n    /**\n     * Create a new controller instance.\n     *\n     * @return void\n     */\n    public function __construct()\n    {\n        $this->middleware('guest');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Auth/VerificationController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Foundation\\Auth\\VerifiesEmails;\n\nclass VerificationController extends Controller\n{\n    /*\n    |--------------------------------------------------------------------------\n    | Email Verification Controller\n    |--------------------------------------------------------------------------\n    |\n    | This controller is responsible for handling email verification for any\n    | user that recently registered with the application. Emails may also\n    | be re-sent if the user didn't receive the original email message.\n    |\n    */\n\n    use VerifiesEmails;\n\n    /**\n     * Where to redirect users after verification.\n     *\n     * @var string\n     */\n    protected $redirectTo = '/home';\n\n    /**\n     * Create a new controller instance.\n     *\n     * @return void\n     */\n    public function __construct()\n    {\n        $this->middleware('auth');\n        $this->middleware('signed')->only('verify');\n        $this->middleware('throttle:6,1')->only('verify', 'resend');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/ContactsController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Contact;\nuse Inertia\\Inertia;\nuse Illuminate\\Validation\\Rule;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Request;\nuse Illuminate\\Support\\Facades\\Redirect;\n\nclass ContactsController extends Controller\n{\n    public function index()\n    {\n        return Inertia::render('Contacts/Index', [\n            'filters' => Request::all('search', 'trashed'),\n            'contacts' => Auth::user()->account->contacts()\n                ->with('organization')\n                ->orderByName()\n                ->filter(Request::only('search', 'trashed'))\n                ->paginate()\n                ->transform(function ($contact) {\n                    return [\n                        'id' => $contact->id,\n                        'name' => $contact->name,\n                        'phone' => $contact->phone,\n                        'city' => $contact->city,\n                        'deleted_at' => $contact->deleted_at,\n                        'organization' => $contact->organization ? $contact->organization->only('name') : null,\n                    ];\n                }),\n        ]);\n    }\n\n    public function create()\n    {\n        return Inertia::render('Contacts/Create', [\n            'organizations' => Auth::user()->account\n                ->organizations()\n                ->orderBy('name')\n                ->get()\n                ->map\n                ->only('id', 'name'),\n        ]);\n    }\n\n    public function store()\n    {\n        Auth::user()->account->contacts()->create(\n            Request::validate([\n                'first_name' => ['required', 'max:50'],\n                'last_name' => ['required', 'max:50'],\n                'organization_id' => ['nullable', Rule::exists('organizations', 'id')->where(function ($query) {\n                    $query->where('account_id', Auth::user()->account_id);\n                })],\n                'email' => ['nullable', 'max:50', 'email'],\n                'phone' => ['nullable', 'max:50'],\n                'address' => ['nullable', 'max:150'],\n                'city' => ['nullable', 'max:50'],\n                'region' => ['nullable', 'max:50'],\n                'country' => ['nullable', 'max:2'],\n                'postal_code' => ['nullable', 'max:25'],\n            ])\n        );\n\n        return Redirect::route('contacts')->with('success', 'Contact created.');\n    }\n\n    public function edit(Contact $contact)\n    {\n        return Inertia::render('Contacts/Edit', [\n            'contact' => [\n                'id' => $contact->id,\n                'first_name' => $contact->first_name,\n                'last_name' => $contact->last_name,\n                'organization_id' => $contact->organization_id,\n                'email' => $contact->email,\n                'phone' => $contact->phone,\n                'address' => $contact->address,\n                'city' => $contact->city,\n                'region' => $contact->region,\n                'country' => $contact->country,\n                'postal_code' => $contact->postal_code,\n                'deleted_at' => $contact->deleted_at,\n            ],\n            'organizations' => Auth::user()->account->organizations()\n                ->orderBy('name')\n                ->get()\n                ->map\n                ->only('id', 'name'),\n        ]);\n    }\n\n    public function update(Contact $contact)\n    {\n        $contact->update(\n            Request::validate([\n                'first_name' => ['required', 'max:50'],\n                'last_name' => ['required', 'max:50'],\n                'organization_id' => ['nullable', Rule::exists('organizations', 'id')->where(function ($query) {\n                    $query->where('account_id', Auth::user()->account_id);\n                })],\n                'email' => ['nullable', 'max:50', 'email'],\n                'phone' => ['nullable', 'max:50'],\n                'address' => ['nullable', 'max:150'],\n                'city' => ['nullable', 'max:50'],\n                'region' => ['nullable', 'max:50'],\n                'country' => ['nullable', 'max:2'],\n                'postal_code' => ['nullable', 'max:25'],\n            ])\n        );\n\n        return Redirect::back()->with('success', 'Contact updated.');\n    }\n\n    public function destroy(Contact $contact)\n    {\n        $contact->delete();\n\n        return Redirect::back()->with('success', 'Contact deleted.');\n    }\n\n    public function restore(Contact $contact)\n    {\n        $contact->restore();\n\n        return Redirect::back()->with('success', 'Contact restored.');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/Controller.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Foundation\\Bus\\DispatchesJobs;\nuse Illuminate\\Routing\\Controller as BaseController;\nuse Illuminate\\Foundation\\Validation\\ValidatesRequests;\nuse Illuminate\\Foundation\\Auth\\Access\\AuthorizesRequests;\n\nclass Controller extends BaseController\n{\n    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;\n}\n"
  },
  {
    "path": "app/Http/Controllers/DashboardController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Inertia\\Inertia;\n\nclass DashboardController extends Controller\n{\n    public function __invoke()\n    {\n        return Inertia::render('Dashboard/Index');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/ImagesController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse League\\Glide\\Server;\n\nclass ImagesController extends Controller\n{\n    public function show(Server $glide)\n    {\n        return $glide->fromRequest()->response();\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/OrganizationsController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Inertia\\Inertia;\nuse App\\Organization;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Request;\nuse Illuminate\\Support\\Facades\\Redirect;\n\nclass OrganizationsController extends Controller\n{\n    public function index()\n    {\n        return Inertia::render('Organizations/Index', [\n            'filters' => Request::all('search', 'trashed'),\n            'organizations' => Auth::user()->account->organizations()\n                ->orderBy('name')\n                ->filter(Request::only('search', 'trashed'))\n                ->paginate()\n                ->only('id', 'name', 'phone', 'city', 'deleted_at'),\n        ]);\n    }\n\n    public function create()\n    {\n        return Inertia::render('Organizations/Create');\n    }\n\n    public function store()\n    {\n        Auth::user()->account->organizations()->create(\n            Request::validate([\n                'name' => ['required', 'max:100'],\n                'email' => ['nullable', 'max:50', 'email'],\n                'phone' => ['nullable', 'max:50'],\n                'address' => ['nullable', 'max:150'],\n                'city' => ['nullable', 'max:50'],\n                'region' => ['nullable', 'max:50'],\n                'country' => ['nullable', 'max:2'],\n                'postal_code' => ['nullable', 'max:25'],\n            ])\n        );\n\n        return Redirect::route('organizations')->with('success', 'Organization created.');\n    }\n\n    public function edit(Organization $organization)\n    {\n        return Inertia::render('Organizations/Edit', [\n            'organization' => [\n                'id' => $organization->id,\n                'name' => $organization->name,\n                'email' => $organization->email,\n                'phone' => $organization->phone,\n                'address' => $organization->address,\n                'city' => $organization->city,\n                'region' => $organization->region,\n                'country' => $organization->country,\n                'postal_code' => $organization->postal_code,\n                'deleted_at' => $organization->deleted_at,\n                'contacts' => $organization->contacts()->orderByName()->get()->map->only('id', 'name', 'city', 'phone'),\n            ],\n        ]);\n    }\n\n    public function update(Organization $organization)\n    {\n        $organization->update(\n            Request::validate([\n                'name' => ['required', 'max:100'],\n                'email' => ['nullable', 'max:50', 'email'],\n                'phone' => ['nullable', 'max:50'],\n                'address' => ['nullable', 'max:150'],\n                'city' => ['nullable', 'max:50'],\n                'region' => ['nullable', 'max:50'],\n                'country' => ['nullable', 'max:2'],\n                'postal_code' => ['nullable', 'max:25'],\n            ])\n        );\n\n        return Redirect::back()->with('success', 'Organization updated.');\n    }\n\n    public function destroy(Organization $organization)\n    {\n        $organization->delete();\n\n        return Redirect::back()->with('success', 'Organization deleted.');\n    }\n\n    public function restore(Organization $organization)\n    {\n        $organization->restore();\n\n        return Redirect::back()->with('success', 'Organization restored.');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/ReportsController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Inertia\\Inertia;\n\nclass ReportsController extends Controller\n{\n    public function __invoke()\n    {\n        return Inertia::render('Reports/Index');\n    }\n}\n"
  },
  {
    "path": "app/Http/Controllers/UsersController.php",
    "content": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\User;\nuse Inertia\\Inertia;\nuse Illuminate\\Validation\\Rule;\nuse Illuminate\\Support\\Facades\\App;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Request;\nuse Illuminate\\Support\\Facades\\Redirect;\nuse Illuminate\\Validation\\ValidationException;\n\nclass UsersController extends Controller\n{\n    public function index()\n    {\n        return Inertia::render('Users/Index', [\n            'filters' => Request::all('search', 'role', 'trashed'),\n            'users' => Auth::user()->account->users()\n                ->orderByName()\n                ->filter(Request::only('search', 'role', 'trashed'))\n                ->paginate()\n                ->transform(function ($user) {\n                    return [\n                        'id' => $user->id,\n                        'name' => $user->name,\n                        'email' => $user->email,\n                        'owner' => $user->owner,\n                        'photo' => $user->photoUrl(['w' => 40, 'h' => 40, 'fit' => 'crop']),\n                        'deleted_at' => $user->deleted_at,\n                    ];\n                }),\n        ]);\n    }\n\n    public function create()\n    {\n        return Inertia::render('Users/Create');\n    }\n\n    public function store()\n    {\n        Request::validate([\n            'first_name' => ['required', 'max:50'],\n            'last_name' => ['required', 'max:50'],\n            'email' => ['required', 'max:50', 'email', Rule::unique('users')],\n            'password' => ['nullable'],\n            'owner' => ['required', 'boolean'],\n            'photo' => ['nullable', 'image'],\n        ]);\n\n        Auth::user()->account->users()->create([\n            'first_name' => Request::get('first_name'),\n            'last_name' => Request::get('last_name'),\n            'email' => Request::get('email'),\n            'password' => Request::get('password'),\n            'owner' => Request::get('owner'),\n            'photo_path' => Request::file('photo') ? Request::file('photo')->store('users') : null,\n        ]);\n\n        return Redirect::route('users')->with('success', 'User created.');\n    }\n\n    public function edit(User $user)\n    {\n        return Inertia::render('Users/Edit', [\n            'user' => [\n                'id' => $user->id,\n                'first_name' => $user->first_name,\n                'last_name' => $user->last_name,\n                'email' => $user->email,\n                'owner' => $user->owner,\n                'photo' => $user->photoUrl(['w' => 60, 'h' => 60, 'fit' => 'crop']),\n                'deleted_at' => $user->deleted_at,\n            ],\n        ]);\n    }\n\n    public function update(User $user)\n    {\n        if (App::environment('production') && $user->isDemoUser()) {\n            return Redirect::back()->with('error', 'Updating the demo user is not allowed.');\n        }\n\n        Request::validate([\n            'first_name' => ['required', 'max:50'],\n            'last_name' => ['required', 'max:50'],\n            'email' => ['required', 'max:50', 'email', Rule::unique('users')->ignore($user->id)],\n            'password' => ['nullable'],\n            'owner' => ['required', 'boolean'],\n            'photo' => ['nullable', 'image'],\n        ]);\n\n        $user->update(Request::only('first_name', 'last_name', 'email', 'owner'));\n\n        if (Request::file('photo')) {\n            $user->update(['photo_path' => Request::file('photo')->store('users')]);\n        }\n\n        if (Request::get('password')) {\n            $user->update(['password' => Request::get('password')]);\n        }\n\n        return Redirect::back()->with('success', 'User updated.');\n    }\n\n    public function destroy(User $user)\n    {\n        if (App::environment('production') && $user->isDemoUser()) {\n            return Redirect::back()->with('error', 'Deleting the demo user is not allowed.');\n        }\n\n        $user->delete();\n\n        return Redirect::back()->with('success', 'User deleted.');\n    }\n\n    public function restore(User $user)\n    {\n        $user->restore();\n\n        return Redirect::back()->with('success', 'User restored.');\n    }\n}\n"
  },
  {
    "path": "app/Http/Kernel.php",
    "content": "<?php\n\nnamespace App\\Http;\n\nuse Illuminate\\Foundation\\Http\\Kernel as HttpKernel;\n\nclass Kernel extends HttpKernel\n{\n    /**\n     * The application's global HTTP middleware stack.\n     *\n     * These middleware are run during every request to your application.\n     *\n     * @var array\n     */\n    protected $middleware = [\n        \\App\\Http\\Middleware\\CheckForMaintenanceMode::class,\n        \\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize::class,\n        \\App\\Http\\Middleware\\TrimStrings::class,\n        \\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull::class,\n        \\App\\Http\\Middleware\\TrustProxies::class,\n    ];\n\n    /**\n     * The application's route middleware groups.\n     *\n     * @var array\n     */\n    protected $middlewareGroups = [\n        'web' => [\n            \\App\\Http\\Middleware\\EncryptCookies::class,\n            \\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n            \\Illuminate\\Session\\Middleware\\StartSession::class,\n            // \\Illuminate\\Session\\Middleware\\AuthenticateSession::class,\n            \\Illuminate\\View\\Middleware\\ShareErrorsFromSession::class,\n            \\App\\Http\\Middleware\\VerifyCsrfToken::class,\n            \\Illuminate\\Routing\\Middleware\\SubstituteBindings::class,\n        ],\n\n        'api' => [\n            'throttle:60,1',\n            'bindings',\n        ],\n    ];\n\n    /**\n     * The application's route middleware.\n     *\n     * These middleware may be assigned to groups or used individually.\n     *\n     * @var array\n     */\n    protected $routeMiddleware = [\n        'auth' => \\App\\Http\\Middleware\\Authenticate::class,\n        'auth.basic' => \\Illuminate\\Auth\\Middleware\\AuthenticateWithBasicAuth::class,\n        'bindings' => \\Illuminate\\Routing\\Middleware\\SubstituteBindings::class,\n        'cache.headers' => \\Illuminate\\Http\\Middleware\\SetCacheHeaders::class,\n        'can' => \\Illuminate\\Auth\\Middleware\\Authorize::class,\n        'guest' => \\App\\Http\\Middleware\\RedirectIfAuthenticated::class,\n        'signed' => \\Illuminate\\Routing\\Middleware\\ValidateSignature::class,\n        'throttle' => \\Illuminate\\Routing\\Middleware\\ThrottleRequests::class,\n        'remember' => \\Reinink\\RememberQueryStrings::class,\n        'verified' => \\Illuminate\\Auth\\Middleware\\EnsureEmailIsVerified::class,\n    ];\n\n    /**\n     * The priority-sorted list of middleware.\n     *\n     * This forces non-global middleware to always be in the given order.\n     *\n     * @var array\n     */\n    protected $middlewarePriority = [\n        \\Illuminate\\Session\\Middleware\\StartSession::class,\n        \\Illuminate\\View\\Middleware\\ShareErrorsFromSession::class,\n        \\App\\Http\\Middleware\\Authenticate::class,\n        \\Illuminate\\Session\\Middleware\\AuthenticateSession::class,\n        \\Illuminate\\Routing\\Middleware\\SubstituteBindings::class,\n        \\Illuminate\\Auth\\Middleware\\Authorize::class,\n    ];\n}\n"
  },
  {
    "path": "app/Http/Middleware/Authenticate.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Auth\\Middleware\\Authenticate as Middleware;\n\nclass Authenticate extends Middleware\n{\n    /**\n     * Get the path the user should be redirected to when they are not authenticated.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return string\n     */\n    protected function redirectTo($request)\n    {\n        if (! $request->expectsJson()) {\n            return route('login');\n        }\n    }\n}\n"
  },
  {
    "path": "app/Http/Middleware/CheckForMaintenanceMode.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode as Middleware;\n\nclass CheckForMaintenanceMode extends Middleware\n{\n    /**\n     * The URIs that should be reachable while maintenance mode is enabled.\n     *\n     * @var array\n     */\n    protected $except = [\n        //\n    ];\n}\n"
  },
  {
    "path": "app/Http/Middleware/EncryptCookies.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Cookie\\Middleware\\EncryptCookies as Middleware;\n\nclass EncryptCookies extends Middleware\n{\n    /**\n     * The names of the cookies that should not be encrypted.\n     *\n     * @var array\n     */\n    protected $except = [\n        //\n    ];\n}\n"
  },
  {
    "path": "app/Http/Middleware/RedirectIfAuthenticated.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Support\\Facades\\Auth;\n\nclass RedirectIfAuthenticated\n{\n    /**\n     * Handle an incoming request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @param  \\Closure  $next\n     * @param  string|null  $guard\n     * @return mixed\n     */\n    public function handle($request, Closure $next, $guard = null)\n    {\n        if (Auth::guard($guard)->check()) {\n            return redirect('/');\n        }\n\n        return $next($request);\n    }\n}\n"
  },
  {
    "path": "app/Http/Middleware/TrimStrings.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Foundation\\Http\\Middleware\\TrimStrings as Middleware;\n\nclass TrimStrings extends Middleware\n{\n    /**\n     * The names of the attributes that should not be trimmed.\n     *\n     * @var array\n     */\n    protected $except = [\n        'password',\n        'password_confirmation',\n    ];\n}\n"
  },
  {
    "path": "app/Http/Middleware/TrustProxies.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Http\\Request;\nuse Fideloper\\Proxy\\TrustProxies as Middleware;\n\nclass TrustProxies extends Middleware\n{\n    /**\n     * The trusted proxies for this application.\n     *\n     * @var array\n     */\n    protected $proxies = '**';\n\n    /**\n     * The headers that should be used to detect proxies.\n     *\n     * @var int\n     */\n    protected $headers = Request::HEADER_X_FORWARDED_AWS_ELB;\n}\n"
  },
  {
    "path": "app/Http/Middleware/VerifyCsrfToken.php",
    "content": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n    /**\n     * Indicates whether the XSRF-TOKEN cookie should be set on the response.\n     *\n     * @var bool\n     */\n    protected $addHttpCookie = true;\n\n    /**\n     * The URIs that should be excluded from CSRF verification.\n     *\n     * @var array\n     */\n    protected $except = [\n        //\n    ];\n}\n"
  },
  {
    "path": "app/Model.php",
    "content": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\nuse Illuminate\\Database\\Eloquent\\Model as Eloquent;\n\nabstract class Model extends Eloquent\n{\n    protected $guarded = [];\n\n    protected $perPage = 10;\n\n    public function resolveRouteBinding($value, $field = null)\n    {\n        return in_array(SoftDeletes::class, class_uses($this))\n            ? $this->where($this->getRouteKeyName(), $value)->withTrashed()->first()\n            : parent::resolveRouteBinding($value, $field);\n    }\n}\n"
  },
  {
    "path": "app/Organization.php",
    "content": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass Organization extends Model\n{\n    use SoftDeletes;\n\n    public function contacts()\n    {\n        return $this->hasMany(Contact::class);\n    }\n\n    public function scopeFilter($query, array $filters)\n    {\n        $query->when($filters['search'] ?? null, function ($query, $search) {\n            $query->where('name', 'like', '%'.$search.'%');\n        })->when($filters['trashed'] ?? null, function ($query, $trashed) {\n            if ($trashed === 'with') {\n                $query->withTrashed();\n            } elseif ($trashed === 'only') {\n                $query->onlyTrashed();\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "app/Providers/AppServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Inertia\\Inertia;\nuse League\\Glide\\Server;\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Pagination\\UrlWindow;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Date;\nuse Illuminate\\Support\\Facades\\Request;\nuse Illuminate\\Support\\Facades\\Session;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\n\nclass AppServiceProvider extends ServiceProvider\n{\n    public function boot()\n    {\n        Date::use(CarbonImmutable::class);\n    }\n\n    public function register()\n    {\n        $this->registerInertia();\n        $this->registerGlide();\n        $this->registerLengthAwarePaginator();\n    }\n\n    public function registerInertia()\n    {\n        Inertia::version(function () {\n            return md5_file(public_path('mix-manifest.json'));\n        });\n\n        Inertia::share([\n            'auth' => function () {\n                return [\n                    'user' => Auth::user() ? [\n                        'id' => Auth::user()->id,\n                        'first_name' => Auth::user()->first_name,\n                        'last_name' => Auth::user()->last_name,\n                        'email' => Auth::user()->email,\n                        'role' => Auth::user()->role,\n                        'account' => [\n                            'id' => Auth::user()->account->id,\n                            'name' => Auth::user()->account->name,\n                        ],\n                    ] : null,\n                ];\n            },\n            'flash' => function () {\n                return [\n                    'success' => Session::get('success'),\n                    'error' => Session::get('error'),\n                ];\n            },\n            'errors' => function () {\n                return Session::get('errors')\n                    ? Session::get('errors')->getBag('default')->getMessages()\n                    : (object) [];\n            },\n        ]);\n    }\n\n    protected function registerGlide()\n    {\n        $this->app->bind(Server::class, function ($app) {\n            return Server::create([\n                'source' => Storage::getDriver(),\n                'cache' => Storage::getDriver(),\n                'cache_folder' => '.glide-cache',\n                'base_url' => 'img',\n            ]);\n        });\n    }\n\n    protected function registerLengthAwarePaginator()\n    {\n        $this->app->bind(LengthAwarePaginator::class, function ($app, $values) {\n            return new class (...array_values($values)) extends LengthAwarePaginator\n            {\n                public function only(...$attributes)\n                {\n                    return $this->transform(function ($item) use ($attributes) {\n                        return $item->only($attributes);\n                    });\n                }\n\n                public function transform($callback)\n                {\n                    $this->items->transform($callback);\n\n                    return $this;\n                }\n\n                public function toArray()\n                {\n                    return [\n                        'data' => $this->items->toArray(),\n                        'links' => $this->links(),\n                    ];\n                }\n\n                public function links($view = null, $data = [])\n                {\n                    $this->appends(Request::all());\n\n                    $window = UrlWindow::make($this);\n\n                    $elements = array_filter([\n                        $window['first'],\n                        is_array($window['slider']) ? '...' : null,\n                        $window['slider'],\n                        is_array($window['last']) ? '...' : null,\n                        $window['last'],\n                    ]);\n\n                    return Collection::make($elements)->flatMap(function ($item) {\n                        if (is_array($item)) {\n                            return Collection::make($item)->map(function ($url, $page) {\n                                return [\n                                    'url' => $url,\n                                    'label' => $page,\n                                    'active' => $this->currentPage() === $page,\n                                ];\n                            });\n                        } else {\n                            return [\n                                [\n                                    'url' => null,\n                                    'label' => '...',\n                                    'active' => false,\n                                ],\n                            ];\n                        }\n                    })->prepend([\n                        'url' => $this->previousPageUrl(),\n                        'label' => 'Previous',\n                        'active' => false,\n                    ])->push([\n                        'url' => $this->nextPageUrl(),\n                        'label' => 'Next',\n                        'active' => false,\n                    ]);\n                }\n            };\n        });\n    }\n}\n"
  },
  {
    "path": "app/Providers/AuthServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\Facades\\Gate;\nuse Illuminate\\Foundation\\Support\\Providers\\AuthServiceProvider as ServiceProvider;\n\nclass AuthServiceProvider extends ServiceProvider\n{\n    /**\n     * The policy mappings for the application.\n     *\n     * @var array\n     */\n    protected $policies = [\n        // 'App\\Model' => 'App\\Policies\\ModelPolicy',\n    ];\n\n    /**\n     * Register any authentication / authorization services.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        $this->registerPolicies();\n\n        //\n    }\n}\n"
  },
  {
    "path": "app/Providers/BroadcastServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Support\\Facades\\Broadcast;\n\nclass BroadcastServiceProvider extends ServiceProvider\n{\n    /**\n     * Bootstrap any application services.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        Broadcast::routes();\n\n        require base_path('routes/channels.php');\n    }\n}\n"
  },
  {
    "path": "app/Providers/EventServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\Facades\\Event;\nuse Illuminate\\Auth\\Events\\Registered;\nuse Illuminate\\Auth\\Listeners\\SendEmailVerificationNotification;\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider as ServiceProvider;\n\nclass EventServiceProvider extends ServiceProvider\n{\n    /**\n     * The event listener mappings for the application.\n     *\n     * @var array\n     */\n    protected $listen = [\n        Registered::class => [\n            SendEmailVerificationNotification::class,\n        ],\n    ];\n\n    /**\n     * Register any events for your application.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        parent::boot();\n\n        //\n    }\n}\n"
  },
  {
    "path": "app/Providers/RouteServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\Facades\\Route;\nuse Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider as ServiceProvider;\n\nclass RouteServiceProvider extends ServiceProvider\n{\n    /**\n     * This namespace is applied to your controller routes.\n     *\n     * In addition, it is set as the URL generator's root namespace.\n     *\n     * @var string\n     */\n    protected $namespace = 'App\\Http\\Controllers';\n\n    /**\n     * Define your route model bindings, pattern filters, etc.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        //\n\n        parent::boot();\n    }\n\n    /**\n     * Define the routes for the application.\n     *\n     * @return void\n     */\n    public function map()\n    {\n        $this->mapApiRoutes();\n\n        $this->mapWebRoutes();\n\n        //\n    }\n\n    /**\n     * Define the \"web\" routes for the application.\n     *\n     * These routes all receive session state, CSRF protection, etc.\n     *\n     * @return void\n     */\n    protected function mapWebRoutes()\n    {\n        Route::middleware('web')\n             ->namespace($this->namespace)\n             ->group(base_path('routes/web.php'));\n    }\n\n    /**\n     * Define the \"api\" routes for the application.\n     *\n     * These routes are typically stateless.\n     *\n     * @return void\n     */\n    protected function mapApiRoutes()\n    {\n        Route::prefix('api')\n             ->middleware('api')\n             ->namespace($this->namespace)\n             ->group(base_path('routes/api.php'));\n    }\n}\n"
  },
  {
    "path": "app/User.php",
    "content": "<?php\n\nnamespace App;\n\nuse League\\Glide\\Server;\nuse Illuminate\\Support\\Facades\\App;\nuse Illuminate\\Support\\Facades\\URL;\nuse Illuminate\\Auth\\Authenticatable;\nuse Illuminate\\Support\\Facades\\Hash;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\nuse Illuminate\\Foundation\\Auth\\Access\\Authorizable;\nuse Illuminate\\Contracts\\Auth\\Authenticatable as AuthenticatableContract;\nuse Illuminate\\Contracts\\Auth\\Access\\Authorizable as AuthorizableContract;\n\nclass User extends Model implements AuthenticatableContract, AuthorizableContract\n{\n    use SoftDeletes, Authenticatable, Authorizable;\n\n    protected $casts = [\n        'owner' => 'boolean',\n    ];\n\n    public function account()\n    {\n        return $this->belongsTo(Account::class);\n    }\n\n    public function getNameAttribute()\n    {\n        return $this->first_name.' '.$this->last_name;\n    }\n\n    public function setPasswordAttribute($password)\n    {\n        $this->attributes['password'] = Hash::needsRehash($password) ? Hash::make($password) : $password;\n    }\n\n    public function photoUrl(array $attributes)\n    {\n        if ($this->photo_path) {\n            return URL::to(App::make(Server::class)->fromPath($this->photo_path, $attributes));\n        }\n    }\n\n    public function isDemoUser()\n    {\n        return $this->email === 'johndoe@example.com';\n    }\n\n    public function scopeOrderByName($query)\n    {\n        $query->orderBy('last_name')->orderBy('first_name');\n    }\n\n    public function scopeWhereRole($query, $role)\n    {\n        switch ($role) {\n            case 'user': return $query->where('owner', false);\n            case 'owner': return $query->where('owner', true);\n        }\n    }\n\n    public function scopeFilter($query, array $filters)\n    {\n        $query->when($filters['search'] ?? null, function ($query, $search) {\n            $query->where(function ($query) use ($search) {\n                $query->where('first_name', 'like', '%'.$search.'%')\n                    ->orWhere('last_name', 'like', '%'.$search.'%')\n                    ->orWhere('email', 'like', '%'.$search.'%');\n            });\n        })->when($filters['role'] ?? null, function ($query, $role) {\n            $query->whereRole($role);\n        })->when($filters['trashed'] ?? null, function ($query, $trashed) {\n            if ($trashed === 'with') {\n                $query->withTrashed();\n            } elseif ($trashed === 'only') {\n                $query->onlyTrashed();\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "artisan",
    "content": "#!/usr/bin/env php\n<?php\n\ndefine('LARAVEL_START', microtime(true));\n\n/*\n|--------------------------------------------------------------------------\n| Register The Auto Loader\n|--------------------------------------------------------------------------\n|\n| Composer provides a convenient, automatically generated class loader\n| for our application. We just need to utilize it! We'll require it\n| into the script here so that we do not have to worry about the\n| loading of any our classes \"manually\". Feels great to relax.\n|\n*/\n\nrequire __DIR__.'/vendor/autoload.php';\n\n$app = require_once __DIR__.'/bootstrap/app.php';\n\n/*\n|--------------------------------------------------------------------------\n| Run The Artisan Application\n|--------------------------------------------------------------------------\n|\n| When we run the console application, the current CLI command will be\n| executed in this console and the response sent back to a terminal\n| or another output device for the developers. Here goes nothing!\n|\n*/\n\n$kernel = $app->make(Illuminate\\Contracts\\Console\\Kernel::class);\n\n$status = $kernel->handle(\n    $input = new Symfony\\Component\\Console\\Input\\ArgvInput,\n    new Symfony\\Component\\Console\\Output\\ConsoleOutput\n);\n\n/*\n|--------------------------------------------------------------------------\n| Shutdown The Application\n|--------------------------------------------------------------------------\n|\n| Once Artisan has finished running, we will fire off the shutdown events\n| so that any final work may be done by the application before we shut\n| down the process. This is the last thing to happen to the request.\n|\n*/\n\n$kernel->terminate($input, $status);\n\nexit($status);\n"
  },
  {
    "path": "bootstrap/app.php",
    "content": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Create The Application\n|--------------------------------------------------------------------------\n|\n| The first thing we will do is create a new Laravel application instance\n| which serves as the \"glue\" for all the components of Laravel, and is\n| the IoC container for the system binding all of the various parts.\n|\n*/\n\n$app = new Illuminate\\Foundation\\Application(\n    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)\n);\n\n/*\n|--------------------------------------------------------------------------\n| Bind Important Interfaces\n|--------------------------------------------------------------------------\n|\n| Next, we need to bind some important interfaces into the container so\n| we will be able to resolve them when needed. The kernels serve the\n| incoming requests to this application from both the web and CLI.\n|\n*/\n\n$app->singleton(\n    Illuminate\\Contracts\\Http\\Kernel::class,\n    App\\Http\\Kernel::class\n);\n\n$app->singleton(\n    Illuminate\\Contracts\\Console\\Kernel::class,\n    App\\Console\\Kernel::class\n);\n\n$app->singleton(\n    Illuminate\\Contracts\\Debug\\ExceptionHandler::class,\n    App\\Exceptions\\Handler::class\n);\n\n/*\n|--------------------------------------------------------------------------\n| Return The Application\n|--------------------------------------------------------------------------\n|\n| This script returns the application instance. The instance is given to\n| the calling script so we can separate the building of the instances\n| from the actual running of the application and sending responses.\n|\n*/\n\nreturn $app;\n"
  },
  {
    "path": "bootstrap/cache/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "composer.json",
    "content": "{\n  \"name\": \"laravel/laravel\",\n  \"description\": \"The Laravel Framework.\",\n  \"keywords\": [\n    \"framework\",\n    \"laravel\"\n  ],\n  \"license\": \"MIT\",\n  \"type\": \"project\",\n  \"require\": {\n    \"php\": \"^7.2\",\n    \"ext-exif\": \"*\",\n    \"ext-gd\": \"*\",\n    \"beyondcode/laravel-dump-server\": \"^1.0\",\n    \"facade/ignition\": \"^2.0\",\n    \"fideloper/proxy\": \"^4.0\",\n    \"fzaninotto/faker\": \"^1.4\",\n    \"inertiajs/inertia-laravel\": \"^0.1\",\n    \"laravel/framework\": \"^7.0\",\n    \"laravel/tinker\": \"^2.0\",\n    \"league/glide\": \"2.0.x-dev\",\n    \"mockery/mockery\": \"^1.0\",\n    \"nunomaduro/collision\": \"^4.1\",\n    \"phpunit/phpunit\": \"^8.5\",\n    \"reinink/remember-query-strings\": \"^0.1.0\",\n    \"sentry/sentry-laravel\": \"^1.5\",\n    \"tightenco/ziggy\": \"^0.8.0\",\n    \"wewowweb/laravel-svelte-preset\": \"^0.1.4\"\n  },\n  \"autoload\": {\n    \"classmap\": [\n      \"database/seeds\",\n      \"database/factories\"\n    ],\n    \"psr-4\": {\n      \"App\\\\\": \"app/\"\n    }\n  },\n  \"autoload-dev\": {\n    \"psr-4\": {\n      \"Tests\\\\\": \"tests/\"\n    }\n  },\n  \"extra\": {\n    \"laravel\": {\n      \"dont-discover\": []\n    }\n  },\n  \"scripts\": {\n    \"compile\": [\n      \"npm run prod\",\n      \"@php artisan migrate:fresh\",\n      \"@php artisan db:seed\"\n    ],\n    \"reseed\": [\n      \"@php artisan migrate:fresh\",\n      \"@php artisan db:seed\"\n    ],\n    \"post-root-package-install\": [\n      \"@php -r \\\"file_exists('.env') || copy('.env.example', '.env');\\\"\"\n    ],\n    \"post-create-project-cmd\": [\n      \"@php artisan key:generate\"\n    ],\n    \"post-autoload-dump\": [\n      \"Illuminate\\\\Foundation\\\\ComposerScripts::postAutoloadDump\",\n      \"@php artisan package:discover\"\n    ]\n  },\n  \"config\": {\n    \"preferred-install\": \"dist\",\n    \"sort-packages\": true,\n    \"optimize-autoloader\": true\n  },\n  \"minimum-stability\": \"dev\",\n  \"prefer-stable\": true\n}\n"
  },
  {
    "path": "config/app.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Name\n    |--------------------------------------------------------------------------\n    |\n    | This value is the name of your application. This value is used when the\n    | framework needs to place the application's name in a notification or\n    | any other location as required by the application or its packages.\n    |\n    */\n\n    'name' => env('APP_NAME', 'Laravel'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Environment\n    |--------------------------------------------------------------------------\n    |\n    | This value determines the \"environment\" your application is currently\n    | running in. This may determine how you prefer to configure various\n    | services the application utilizes. Set this in your \".env\" file.\n    |\n    */\n\n    'env' => env('APP_ENV', 'production'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Debug Mode\n    |--------------------------------------------------------------------------\n    |\n    | When your application is in debug mode, detailed error messages with\n    | stack traces will be shown on every error that occurs within your\n    | application. If disabled, a simple generic error page is shown.\n    |\n    */\n\n    'debug' => env('APP_DEBUG', false),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application URL\n    |--------------------------------------------------------------------------\n    |\n    | This URL is used by the console to properly generate URLs when using\n    | the Artisan command line tool. You should set this to the root of\n    | your application so that it is used when running Artisan tasks.\n    |\n    */\n\n    'url' => env('APP_URL', 'http://localhost'),\n\n    'asset_url' => env('ASSET_URL', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Timezone\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the default timezone for your application, which\n    | will be used by the PHP date and date-time functions. We have gone\n    | ahead and set this to a sensible default for you out of the box.\n    |\n    */\n\n    'timezone' => 'UTC',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Locale Configuration\n    |--------------------------------------------------------------------------\n    |\n    | The application locale determines the default locale that will be used\n    | by the translation service provider. You are free to set this value\n    | to any of the locales which will be supported by the application.\n    |\n    */\n\n    'locale' => 'en',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Application Fallback Locale\n    |--------------------------------------------------------------------------\n    |\n    | The fallback locale determines the locale to use when the current one\n    | is not available. You may change the value to correspond to any of\n    | the language folders that are provided through your application.\n    |\n    */\n\n    'fallback_locale' => 'en',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Faker Locale\n    |--------------------------------------------------------------------------\n    |\n    | This locale will be used by the Faker PHP library when generating fake\n    | data for your database seeds. For example, this will be used to get\n    | localized telephone numbers, street address information and more.\n    |\n    */\n\n    'faker_locale' => 'en_US',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Encryption Key\n    |--------------------------------------------------------------------------\n    |\n    | This key is used by the Illuminate encrypter service and should be set\n    | to a random, 32 character string, otherwise these encrypted strings\n    | will not be safe. Please do this before deploying an application!\n    |\n    */\n\n    'key' => env('APP_KEY'),\n\n    'cipher' => 'AES-256-CBC',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Autoloaded Service Providers\n    |--------------------------------------------------------------------------\n    |\n    | The service providers listed here will be automatically loaded on the\n    | request to your application. Feel free to add your own services to\n    | this array to grant expanded functionality to your applications.\n    |\n    */\n\n    'providers' => [\n\n        /*\n         * Laravel Framework Service Providers...\n         */\n        Illuminate\\Auth\\AuthServiceProvider::class,\n        Illuminate\\Broadcasting\\BroadcastServiceProvider::class,\n        Illuminate\\Bus\\BusServiceProvider::class,\n        Illuminate\\Cache\\CacheServiceProvider::class,\n        Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider::class,\n        Illuminate\\Cookie\\CookieServiceProvider::class,\n        Illuminate\\Database\\DatabaseServiceProvider::class,\n        Illuminate\\Encryption\\EncryptionServiceProvider::class,\n        Illuminate\\Filesystem\\FilesystemServiceProvider::class,\n        Illuminate\\Foundation\\Providers\\FoundationServiceProvider::class,\n        Illuminate\\Hashing\\HashServiceProvider::class,\n        Illuminate\\Mail\\MailServiceProvider::class,\n        Illuminate\\Notifications\\NotificationServiceProvider::class,\n        Illuminate\\Pagination\\PaginationServiceProvider::class,\n        Illuminate\\Pipeline\\PipelineServiceProvider::class,\n        Illuminate\\Queue\\QueueServiceProvider::class,\n        Illuminate\\Redis\\RedisServiceProvider::class,\n        Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider::class,\n        Illuminate\\Session\\SessionServiceProvider::class,\n        Illuminate\\Translation\\TranslationServiceProvider::class,\n        Illuminate\\Validation\\ValidationServiceProvider::class,\n        Illuminate\\View\\ViewServiceProvider::class,\n\n        /*\n         * Package Service Providers...\n         */\n\n        /*\n         * Application Service Providers...\n         */\n        App\\Providers\\AppServiceProvider::class,\n        App\\Providers\\AuthServiceProvider::class,\n        // App\\Providers\\BroadcastServiceProvider::class,\n        App\\Providers\\EventServiceProvider::class,\n        App\\Providers\\RouteServiceProvider::class,\n\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Class Aliases\n    |--------------------------------------------------------------------------\n    |\n    | This array of class aliases will be registered when this application\n    | is started. However, feel free to register as many as you wish as\n    | the aliases are \"lazy\" loaded so they don't hinder performance.\n    |\n    */\n\n    'aliases' => [\n\n        'App' => Illuminate\\Support\\Facades\\App::class,\n        'Arr' => Illuminate\\Support\\Arr::class,\n        'Artisan' => Illuminate\\Support\\Facades\\Artisan::class,\n        'Auth' => Illuminate\\Support\\Facades\\Auth::class,\n        'Blade' => Illuminate\\Support\\Facades\\Blade::class,\n        'Broadcast' => Illuminate\\Support\\Facades\\Broadcast::class,\n        'Bus' => Illuminate\\Support\\Facades\\Bus::class,\n        'Cache' => Illuminate\\Support\\Facades\\Cache::class,\n        'Config' => Illuminate\\Support\\Facades\\Config::class,\n        'Cookie' => Illuminate\\Support\\Facades\\Cookie::class,\n        'Crypt' => Illuminate\\Support\\Facades\\Crypt::class,\n        'DB' => Illuminate\\Support\\Facades\\DB::class,\n        'Eloquent' => Illuminate\\Database\\Eloquent\\Model::class,\n        'Event' => Illuminate\\Support\\Facades\\Event::class,\n        'File' => Illuminate\\Support\\Facades\\File::class,\n        'Gate' => Illuminate\\Support\\Facades\\Gate::class,\n        'Hash' => Illuminate\\Support\\Facades\\Hash::class,\n        'Lang' => Illuminate\\Support\\Facades\\Lang::class,\n        'Log' => Illuminate\\Support\\Facades\\Log::class,\n        'Mail' => Illuminate\\Support\\Facades\\Mail::class,\n        'Notification' => Illuminate\\Support\\Facades\\Notification::class,\n        'Password' => Illuminate\\Support\\Facades\\Password::class,\n        'Queue' => Illuminate\\Support\\Facades\\Queue::class,\n        'Redirect' => Illuminate\\Support\\Facades\\Redirect::class,\n        'Redis' => Illuminate\\Support\\Facades\\Redis::class,\n        'Request' => Illuminate\\Support\\Facades\\Request::class,\n        'Response' => Illuminate\\Support\\Facades\\Response::class,\n        'Route' => Illuminate\\Support\\Facades\\Route::class,\n        'Schema' => Illuminate\\Support\\Facades\\Schema::class,\n        'Session' => Illuminate\\Support\\Facades\\Session::class,\n        'Storage' => Illuminate\\Support\\Facades\\Storage::class,\n        'Str' => Illuminate\\Support\\Str::class,\n        'URL' => Illuminate\\Support\\Facades\\URL::class,\n        'Validator' => Illuminate\\Support\\Facades\\Validator::class,\n        'View' => Illuminate\\Support\\Facades\\View::class,\n\n    ],\n\n];\n"
  },
  {
    "path": "config/auth.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Authentication Defaults\n    |--------------------------------------------------------------------------\n    |\n    | This option controls the default authentication \"guard\" and password\n    | reset options for your application. You may change these defaults\n    | as required, but they're a perfect start for most applications.\n    |\n    */\n\n    'defaults' => [\n        'guard' => 'web',\n        'passwords' => 'users',\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Authentication Guards\n    |--------------------------------------------------------------------------\n    |\n    | Next, you may define every authentication guard for your application.\n    | Of course, a great default configuration has been defined for you\n    | here which uses session storage and the Eloquent user provider.\n    |\n    | All authentication drivers have a user provider. This defines how the\n    | users are actually retrieved out of your database or other storage\n    | mechanisms used by this application to persist your user's data.\n    |\n    | Supported: \"session\", \"token\"\n    |\n    */\n\n    'guards' => [\n        'web' => [\n            'driver' => 'session',\n            'provider' => 'users',\n        ],\n\n        'api' => [\n            'driver' => 'token',\n            'provider' => 'users',\n            'hash' => false,\n        ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | User Providers\n    |--------------------------------------------------------------------------\n    |\n    | All authentication drivers have a user provider. This defines how the\n    | users are actually retrieved out of your database or other storage\n    | mechanisms used by this application to persist your user's data.\n    |\n    | If you have multiple user tables or models you may configure multiple\n    | sources which represent each model / table. These sources may then\n    | be assigned to any extra authentication guards you have defined.\n    |\n    | Supported: \"database\", \"eloquent\"\n    |\n    */\n\n    'providers' => [\n        'users' => [\n            'driver' => 'eloquent',\n            'model' => App\\User::class,\n        ],\n\n        // 'users' => [\n        //     'driver' => 'database',\n        //     'table' => 'users',\n        // ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Resetting Passwords\n    |--------------------------------------------------------------------------\n    |\n    | You may specify multiple password reset configurations if you have more\n    | than one user table or model in the application and you want to have\n    | separate password reset settings based on the specific user types.\n    |\n    | The expire time is the number of minutes that the reset token should be\n    | considered valid. This security feature keeps tokens short-lived so\n    | they have less time to be guessed. You may change this as needed.\n    |\n    */\n\n    'passwords' => [\n        'users' => [\n            'provider' => 'users',\n            'table' => 'password_resets',\n            'expire' => 60,\n            'throttle' => 60,\n        ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Password Confirmation Timeout\n    |--------------------------------------------------------------------------\n    |\n    | Here you may define the amount of seconds before a password confirmation\n    | times out and the user is prompted to re-enter their password via the\n    | confirmation screen. By default, the timeout lasts for three hours.\n    |\n    */\n\n    'password_timeout' => 10800,\n\n];\n"
  },
  {
    "path": "config/broadcasting.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Broadcaster\n    |--------------------------------------------------------------------------\n    |\n    | This option controls the default broadcaster that will be used by the\n    | framework when an event needs to be broadcast. You may set this to\n    | any of the connections defined in the \"connections\" array below.\n    |\n    | Supported: \"pusher\", \"redis\", \"log\", \"null\"\n    |\n    */\n\n    'default' => env('BROADCAST_DRIVER', 'null'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Broadcast Connections\n    |--------------------------------------------------------------------------\n    |\n    | Here you may define all of the broadcast connections that will be used\n    | to broadcast events to other systems or over websockets. Samples of\n    | each available type of connection are provided inside this array.\n    |\n    */\n\n    'connections' => [\n\n        'pusher' => [\n            'driver' => 'pusher',\n            'key' => env('PUSHER_APP_KEY'),\n            'secret' => env('PUSHER_APP_SECRET'),\n            'app_id' => env('PUSHER_APP_ID'),\n            'options' => [\n                'cluster' => env('PUSHER_APP_CLUSTER'),\n                'useTLS' => true,\n            ],\n        ],\n\n        'redis' => [\n            'driver' => 'redis',\n            'connection' => 'default',\n        ],\n\n        'log' => [\n            'driver' => 'log',\n        ],\n\n        'null' => [\n            'driver' => 'null',\n        ],\n\n    ],\n\n];\n"
  },
  {
    "path": "config/cache.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Str;\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Cache Store\n    |--------------------------------------------------------------------------\n    |\n    | This option controls the default cache connection that gets used while\n    | using this caching library. This connection is used when another is\n    | not explicitly specified when executing a given caching function.\n    |\n    | Supported: \"apc\", \"array\", \"database\", \"file\",\n    |            \"memcached\", \"redis\", \"dynamodb\"\n    |\n    */\n\n    'default' => env('CACHE_DRIVER', 'file'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Cache Stores\n    |--------------------------------------------------------------------------\n    |\n    | Here you may define all of the cache \"stores\" for your application as\n    | well as their drivers. You may even define multiple stores for the\n    | same cache driver to group types of items stored in your caches.\n    |\n    */\n\n    'stores' => [\n\n        'apc' => [\n            'driver' => 'apc',\n        ],\n\n        'array' => [\n            'driver' => 'array',\n        ],\n\n        'database' => [\n            'driver' => 'database',\n            'table' => 'cache',\n            'connection' => null,\n        ],\n\n        'file' => [\n            'driver' => 'file',\n            'path' => storage_path('framework/cache/data'),\n        ],\n\n        'memcached' => [\n            'driver' => 'memcached',\n            'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),\n            'sasl' => [\n                env('MEMCACHED_USERNAME'),\n                env('MEMCACHED_PASSWORD'),\n            ],\n            'options' => [\n                // Memcached::OPT_CONNECT_TIMEOUT => 2000,\n            ],\n            'servers' => [\n                [\n                    'host' => env('MEMCACHED_HOST', '127.0.0.1'),\n                    'port' => env('MEMCACHED_PORT', 11211),\n                    'weight' => 100,\n                ],\n            ],\n        ],\n\n        'redis' => [\n            'driver' => 'redis',\n            'connection' => 'cache',\n        ],\n\n        'dynamodb' => [\n            'driver' => 'dynamodb',\n            'key' => env('AWS_ACCESS_KEY_ID'),\n            'secret' => env('AWS_SECRET_ACCESS_KEY'),\n            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),\n            'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),\n            'endpoint' => env('DYNAMODB_ENDPOINT'),\n        ],\n\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Cache Key Prefix\n    |--------------------------------------------------------------------------\n    |\n    | When utilizing a RAM based store such as APC or Memcached, there might\n    | be other applications utilizing the same cache. So, we'll specify a\n    | value to get prefixed to all our keys so we can avoid collisions.\n    |\n    */\n\n    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),\n\n];\n"
  },
  {
    "path": "config/database.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Str;\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Database Connection Name\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify which of the database connections below you wish\n    | to use as your default connection for all database work. Of course\n    | you may use many connections at once using the Database library.\n    |\n    */\n\n    'default' => env('DB_CONNECTION', 'mysql'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Database Connections\n    |--------------------------------------------------------------------------\n    |\n    | Here are each of the database connections setup for your application.\n    | Of course, examples of configuring each database platform that is\n    | supported by Laravel is shown below to make development simple.\n    |\n    |\n    | All database work in Laravel is done through the PHP PDO facilities\n    | so make sure you have the driver for your particular database of\n    | choice installed on your machine before you begin development.\n    |\n    */\n\n    'connections' => [\n\n        'sqlite' => [\n            'driver' => 'sqlite',\n            'url' => env('DATABASE_URL'),\n            'database' => env('DB_DATABASE', database_path('database.sqlite')),\n            'prefix' => '',\n            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),\n        ],\n\n        'mysql' => [\n            'driver' => 'mysql',\n            'url' => env('DATABASE_URL'),\n            'host' => env('DB_HOST', '127.0.0.1'),\n            'port' => env('DB_PORT', '3306'),\n            'database' => env('DB_DATABASE', 'forge'),\n            'username' => env('DB_USERNAME', 'forge'),\n            'password' => env('DB_PASSWORD', ''),\n            'unix_socket' => env('DB_SOCKET', ''),\n            'charset' => 'utf8mb4',\n            'collation' => 'utf8mb4_unicode_ci',\n            'prefix' => '',\n            'prefix_indexes' => true,\n            'strict' => true,\n            'engine' => null,\n            'options' => extension_loaded('pdo_mysql') ? array_filter([\n                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),\n            ]) : [],\n        ],\n\n        'pgsql' => [\n            'driver' => 'pgsql',\n            'url' => env('DATABASE_URL'),\n            'host' => env('DB_HOST', '127.0.0.1'),\n            'port' => env('DB_PORT', '5432'),\n            'database' => env('DB_DATABASE', 'forge'),\n            'username' => env('DB_USERNAME', 'forge'),\n            'password' => env('DB_PASSWORD', ''),\n            'charset' => 'utf8',\n            'prefix' => '',\n            'prefix_indexes' => true,\n            'schema' => 'public',\n            'sslmode' => 'prefer',\n        ],\n\n        'sqlsrv' => [\n            'driver' => 'sqlsrv',\n            'url' => env('DATABASE_URL'),\n            'host' => env('DB_HOST', 'localhost'),\n            'port' => env('DB_PORT', '1433'),\n            'database' => env('DB_DATABASE', 'forge'),\n            'username' => env('DB_USERNAME', 'forge'),\n            'password' => env('DB_PASSWORD', ''),\n            'charset' => 'utf8',\n            'prefix' => '',\n            'prefix_indexes' => true,\n        ],\n\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Migration Repository Table\n    |--------------------------------------------------------------------------\n    |\n    | This table keeps track of all the migrations that have already run for\n    | your application. Using this information, we can determine which of\n    | the migrations on disk haven't actually been run in the database.\n    |\n    */\n\n    'migrations' => 'migrations',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Redis Databases\n    |--------------------------------------------------------------------------\n    |\n    | Redis is an open source, fast, and advanced key-value store that also\n    | provides a richer body of commands than a typical key-value system\n    | such as APC or Memcached. Laravel makes it easy to dig right in.\n    |\n    */\n\n    'redis' => [\n\n        'client' => env('REDIS_CLIENT', 'phpredis'),\n\n        'options' => [\n            'cluster' => env('REDIS_CLUSTER', 'redis'),\n            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),\n        ],\n\n        'default' => [\n            'url' => env('REDIS_URL'),\n            'host' => env('REDIS_HOST', '127.0.0.1'),\n            'password' => env('REDIS_PASSWORD', null),\n            'port' => env('REDIS_PORT', 6379),\n            'database' => env('REDIS_DB', 0),\n        ],\n\n        'cache' => [\n            'url' => env('REDIS_URL'),\n            'host' => env('REDIS_HOST', '127.0.0.1'),\n            'password' => env('REDIS_PASSWORD', null),\n            'port' => env('REDIS_PORT', 6379),\n            'database' => env('REDIS_CACHE_DB', 1),\n        ],\n\n    ],\n\n];\n"
  },
  {
    "path": "config/filesystems.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Filesystem Disk\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the default filesystem disk that should be used\n    | by the framework. The \"local\" disk, as well as a variety of cloud\n    | based disks are available to your application. Just store away!\n    |\n    */\n\n    'default' => env('FILESYSTEM_DRIVER', 'local'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Cloud Filesystem Disk\n    |--------------------------------------------------------------------------\n    |\n    | Many applications store files both locally and in the cloud. For this\n    | reason, you may specify a default \"cloud\" driver here. This driver\n    | will be bound as the Cloud disk implementation in the container.\n    |\n    */\n\n    'cloud' => env('FILESYSTEM_CLOUD', 's3'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Filesystem Disks\n    |--------------------------------------------------------------------------\n    |\n    | Here you may configure as many filesystem \"disks\" as you wish, and you\n    | may even configure multiple disks of the same driver. Defaults have\n    | been setup for each driver as an example of the required options.\n    |\n    | Supported Drivers: \"local\", \"ftp\", \"sftp\", \"s3\"\n    |\n    */\n\n    'disks' => [\n\n        'local' => [\n            'driver' => 'local',\n            'root' => storage_path('app'),\n        ],\n\n        'public' => [\n            'driver' => 'local',\n            'root' => storage_path('app/public'),\n            'url' => env('APP_URL').'/storage',\n            'visibility' => 'public',\n        ],\n\n        's3' => [\n            'driver' => 's3',\n            'key' => env('AWS_ACCESS_KEY_ID'),\n            'secret' => env('AWS_SECRET_ACCESS_KEY'),\n            'region' => env('AWS_DEFAULT_REGION'),\n            'bucket' => env('AWS_BUCKET'),\n            'url' => env('AWS_URL'),\n        ],\n\n    ],\n\n];\n"
  },
  {
    "path": "config/hashing.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Hash Driver\n    |--------------------------------------------------------------------------\n    |\n    | This option controls the default hash driver that will be used to hash\n    | passwords for your application. By default, the bcrypt algorithm is\n    | used; however, you remain free to modify this option if you wish.\n    |\n    | Supported: \"bcrypt\", \"argon\", \"argon2id\"\n    |\n    */\n\n    'driver' => 'bcrypt',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Bcrypt Options\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the configuration options that should be used when\n    | passwords are hashed using the Bcrypt algorithm. This will allow you\n    | to control the amount of time it takes to hash the given password.\n    |\n    */\n\n    'bcrypt' => [\n        'rounds' => env('BCRYPT_ROUNDS', 10),\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Argon Options\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the configuration options that should be used when\n    | passwords are hashed using the Argon algorithm. These will allow you\n    | to control the amount of time it takes to hash the given password.\n    |\n    */\n\n    'argon' => [\n        'memory' => 1024,\n        'threads' => 2,\n        'time' => 2,\n    ],\n\n];\n"
  },
  {
    "path": "config/logging.php",
    "content": "<?php\n\nuse Monolog\\Handler\\NullHandler;\nuse Monolog\\Handler\\StreamHandler;\nuse Monolog\\Handler\\SyslogUdpHandler;\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Log Channel\n    |--------------------------------------------------------------------------\n    |\n    | This option defines the default log channel that gets used when writing\n    | messages to the logs. The name specified in this option should match\n    | one of the channels defined in the \"channels\" configuration array.\n    |\n    */\n\n    'default' => env('LOG_CHANNEL', 'stack'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Log Channels\n    |--------------------------------------------------------------------------\n    |\n    | Here you may configure the log channels for your application. Out of\n    | the box, Laravel uses the Monolog PHP logging library. This gives\n    | you a variety of powerful log handlers / formatters to utilize.\n    |\n    | Available Drivers: \"single\", \"daily\", \"slack\", \"syslog\",\n    |                    \"errorlog\", \"monolog\",\n    |                    \"custom\", \"stack\"\n    |\n    */\n\n    'channels' => [\n        'stack' => [\n            'driver' => 'stack',\n            'channels' => ['single'],\n            'ignore_exceptions' => false,\n        ],\n\n        'single' => [\n            'driver' => 'single',\n            'path' => storage_path('logs/laravel.log'),\n            'level' => 'debug',\n        ],\n\n        'daily' => [\n            'driver' => 'daily',\n            'path' => storage_path('logs/laravel.log'),\n            'level' => 'debug',\n            'days' => 14,\n        ],\n\n        'slack' => [\n            'driver' => 'slack',\n            'url' => env('LOG_SLACK_WEBHOOK_URL'),\n            'username' => 'Laravel Log',\n            'emoji' => ':boom:',\n            'level' => 'critical',\n        ],\n\n        'papertrail' => [\n            'driver' => 'monolog',\n            'level' => 'debug',\n            'handler' => SyslogUdpHandler::class,\n            'handler_with' => [\n                'host' => env('PAPERTRAIL_URL'),\n                'port' => env('PAPERTRAIL_PORT'),\n            ],\n        ],\n\n        'stderr' => [\n            'driver' => 'monolog',\n            'handler' => StreamHandler::class,\n            'formatter' => env('LOG_STDERR_FORMATTER'),\n            'with' => [\n                'stream' => 'php://stderr',\n            ],\n        ],\n\n        'syslog' => [\n            'driver' => 'syslog',\n            'level' => 'debug',\n        ],\n\n        'errorlog' => [\n            'driver' => 'errorlog',\n            'level' => 'debug',\n        ],\n\n        'null' => [\n            'driver' => 'monolog',\n            'handler' => NullHandler::class,\n        ],\n\n        'emergency' => [\n            'path' => storage_path('logs/laravel.log'),\n        ],\n    ],\n\n];\n"
  },
  {
    "path": "config/mail.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Mail Driver\n    |--------------------------------------------------------------------------\n    |\n    | Laravel supports both SMTP and PHP's \"mail\" function as drivers for the\n    | sending of e-mail. You may specify which one you're using throughout\n    | your application here. By default, Laravel is setup for SMTP mail.\n    |\n    | Supported: \"smtp\", \"sendmail\", \"mailgun\", \"ses\",\n    |            \"postmark\", \"log\", \"array\"\n    |\n    */\n\n    'driver' => env('MAIL_DRIVER', 'smtp'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | SMTP Host Address\n    |--------------------------------------------------------------------------\n    |\n    | Here you may provide the host address of the SMTP server used by your\n    | applications. A default option is provided that is compatible with\n    | the Mailgun mail service which will provide reliable deliveries.\n    |\n    */\n\n    'host' => env('MAIL_HOST', 'smtp.mailgun.org'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | SMTP Host Port\n    |--------------------------------------------------------------------------\n    |\n    | This is the SMTP port used by your application to deliver e-mails to\n    | users of the application. Like the host we have set this value to\n    | stay compatible with the Mailgun e-mail application by default.\n    |\n    */\n\n    'port' => env('MAIL_PORT', 587),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Global \"From\" Address\n    |--------------------------------------------------------------------------\n    |\n    | You may wish for all e-mails sent by your application to be sent from\n    | the same address. Here, you may specify a name and address that is\n    | used globally for all e-mails that are sent by your application.\n    |\n    */\n\n    'from' => [\n        'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),\n        'name' => env('MAIL_FROM_NAME', 'Example'),\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | E-Mail Encryption Protocol\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the encryption protocol that should be used when\n    | the application send e-mail messages. A sensible default using the\n    | transport layer security protocol should provide great security.\n    |\n    */\n\n    'encryption' => env('MAIL_ENCRYPTION', 'tls'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | SMTP Server Username\n    |--------------------------------------------------------------------------\n    |\n    | If your SMTP server requires a username for authentication, you should\n    | set it here. This will get used to authenticate with your server on\n    | connection. You may also set the \"password\" value below this one.\n    |\n    */\n\n    'username' => env('MAIL_USERNAME'),\n\n    'password' => env('MAIL_PASSWORD'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Sendmail System Path\n    |--------------------------------------------------------------------------\n    |\n    | When using the \"sendmail\" driver to send e-mails, we will need to know\n    | the path to where Sendmail lives on this server. A default path has\n    | been provided here, which will work well on most of your systems.\n    |\n    */\n\n    'sendmail' => '/usr/sbin/sendmail -bs',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Markdown Mail Settings\n    |--------------------------------------------------------------------------\n    |\n    | If you are using Markdown based email rendering, you may configure your\n    | theme and component paths here, allowing you to customize the design\n    | of the emails. Or, you may simply stick with the Laravel defaults!\n    |\n    */\n\n    'markdown' => [\n        'theme' => 'default',\n\n        'paths' => [\n            resource_path('views/vendor/mail'),\n        ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Log Channel\n    |--------------------------------------------------------------------------\n    |\n    | If you are using the \"log\" driver, you may specify the logging channel\n    | if you prefer to keep mail messages separate from other log entries\n    | for simpler reading. Otherwise, the default channel will be used.\n    |\n    */\n\n    'log_channel' => env('MAIL_LOG_CHANNEL'),\n\n];\n"
  },
  {
    "path": "config/queue.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Queue Connection Name\n    |--------------------------------------------------------------------------\n    |\n    | Laravel's queue API supports an assortment of back-ends via a single\n    | API, giving you convenient access to each back-end using the same\n    | syntax for every one. Here you may define a default connection.\n    |\n    */\n\n    'default' => env('QUEUE_CONNECTION', 'sync'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Queue Connections\n    |--------------------------------------------------------------------------\n    |\n    | Here you may configure the connection information for each server that\n    | is used by your application. A default configuration has been added\n    | for each back-end shipped with Laravel. You are free to add more.\n    |\n    | Drivers: \"sync\", \"database\", \"beanstalkd\", \"sqs\", \"redis\", \"null\"\n    |\n    */\n\n    'connections' => [\n\n        'sync' => [\n            'driver' => 'sync',\n        ],\n\n        'database' => [\n            'driver' => 'database',\n            'table' => 'jobs',\n            'queue' => 'default',\n            'retry_after' => 90,\n        ],\n\n        'beanstalkd' => [\n            'driver' => 'beanstalkd',\n            'host' => 'localhost',\n            'queue' => 'default',\n            'retry_after' => 90,\n            'block_for' => 0,\n        ],\n\n        'sqs' => [\n            'driver' => 'sqs',\n            'key' => env('AWS_ACCESS_KEY_ID'),\n            'secret' => env('AWS_SECRET_ACCESS_KEY'),\n            'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),\n            'queue' => env('SQS_QUEUE', 'your-queue-name'),\n            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),\n        ],\n\n        'redis' => [\n            'driver' => 'redis',\n            'connection' => 'default',\n            'queue' => env('REDIS_QUEUE', 'default'),\n            'retry_after' => 90,\n            'block_for' => null,\n        ],\n\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Failed Queue Jobs\n    |--------------------------------------------------------------------------\n    |\n    | These options configure the behavior of failed queue job logging so you\n    | can control which database and table are used to store the jobs that\n    | have failed. You may change them to any database / table you wish.\n    |\n    */\n\n    'failed' => [\n        'driver' => env('QUEUE_FAILED_DRIVER', 'database'),\n        'database' => env('DB_CONNECTION', 'mysql'),\n        'table' => 'failed_jobs',\n    ],\n\n];\n"
  },
  {
    "path": "config/sentry.php",
    "content": "<?php\n\nreturn [\n\n    'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),\n\n    // capture release as git sha\n    // 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty=\"%h\" -n1 HEAD')),\n\n    'breadcrumbs' => [\n        // Capture Laravel logs in breadcrumbs\n        'logs' => true,\n\n        // Capture SQL queries in breadcrumbs\n        'sql_queries' => true,\n\n        // Capture bindings on SQL queries logged in breadcrumbs\n        'sql_bindings' => true,\n\n        // Capture queue job information in breadcrumbs\n        'queue_info' => true,\n    ],\n\n];\n"
  },
  {
    "path": "config/services.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Third Party Services\n    |--------------------------------------------------------------------------\n    |\n    | This file is for storing the credentials for third party services such\n    | as Mailgun, Postmark, AWS and more. This file provides the de facto\n    | location for this type of information, allowing packages to have\n    | a conventional file to locate the various service credentials.\n    |\n    */\n\n    'mailgun' => [\n        'domain' => env('MAILGUN_DOMAIN'),\n        'secret' => env('MAILGUN_SECRET'),\n        'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),\n    ],\n\n    'postmark' => [\n        'token' => env('POSTMARK_TOKEN'),\n    ],\n\n    'ses' => [\n        'key' => env('AWS_ACCESS_KEY_ID'),\n        'secret' => env('AWS_SECRET_ACCESS_KEY'),\n        'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),\n    ],\n\n];\n"
  },
  {
    "path": "config/session.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Str;\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Session Driver\n    |--------------------------------------------------------------------------\n    |\n    | This option controls the default session \"driver\" that will be used on\n    | requests. By default, we will use the lightweight native driver but\n    | you may specify any of the other wonderful drivers provided here.\n    |\n    | Supported: \"file\", \"cookie\", \"database\", \"apc\",\n    |            \"memcached\", \"redis\", \"dynamodb\", \"array\"\n    |\n    */\n\n    'driver' => env('SESSION_DRIVER', 'cookie'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Lifetime\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify the number of minutes that you wish the session\n    | to be allowed to remain idle before it expires. If you want them\n    | to immediately expire on the browser closing, set that option.\n    |\n    */\n\n    'lifetime' => env('SESSION_LIFETIME', 120),\n\n    'expire_on_close' => false,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Encryption\n    |--------------------------------------------------------------------------\n    |\n    | This option allows you to easily specify that all of your session data\n    | should be encrypted before it is stored. All encryption will be run\n    | automatically by Laravel and you can use the Session like normal.\n    |\n    */\n\n    'encrypt' => false,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session File Location\n    |--------------------------------------------------------------------------\n    |\n    | When using the native session driver, we need a location where session\n    | files may be stored. A default has been set for you but a different\n    | location may be specified. This is only needed for file sessions.\n    |\n    */\n\n    'files' => storage_path('framework/sessions'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Database Connection\n    |--------------------------------------------------------------------------\n    |\n    | When using the \"database\" or \"redis\" session drivers, you may specify a\n    | connection that should be used to manage these sessions. This should\n    | correspond to a connection in your database configuration options.\n    |\n    */\n\n    'connection' => env('SESSION_CONNECTION', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Database Table\n    |--------------------------------------------------------------------------\n    |\n    | When using the \"database\" session driver, you may specify the table we\n    | should use to manage the sessions. Of course, a sensible default is\n    | provided for you; however, you are free to change this as needed.\n    |\n    */\n\n    'table' => 'sessions',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Cache Store\n    |--------------------------------------------------------------------------\n    |\n    | When using the \"apc\", \"memcached\", or \"dynamodb\" session drivers you may\n    | list a cache store that should be used for these sessions. This value\n    | must match with one of the application's configured cache \"stores\".\n    |\n    */\n\n    'store' => env('SESSION_STORE', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Sweeping Lottery\n    |--------------------------------------------------------------------------\n    |\n    | Some session drivers must manually sweep their storage location to get\n    | rid of old sessions from storage. Here are the chances that it will\n    | happen on a given request. By default, the odds are 2 out of 100.\n    |\n    */\n\n    'lottery' => [2, 100],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Cookie Name\n    |--------------------------------------------------------------------------\n    |\n    | Here you may change the name of the cookie used to identify a session\n    | instance by ID. The name specified here will get used every time a\n    | new session cookie is created by the framework for every driver.\n    |\n    */\n\n    'cookie' => env(\n        'SESSION_COOKIE',\n        Str::slug(env('APP_NAME', 'laravel'), '_').'_session'\n    ),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Cookie Path\n    |--------------------------------------------------------------------------\n    |\n    | The session cookie path determines the path for which the cookie will\n    | be regarded as available. Typically, this will be the root path of\n    | your application but you are free to change this when necessary.\n    |\n    */\n\n    'path' => '/',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Session Cookie Domain\n    |--------------------------------------------------------------------------\n    |\n    | Here you may change the domain of the cookie used to identify a session\n    | in your application. This will determine which domains the cookie is\n    | available to in your application. A sensible default has been set.\n    |\n    */\n\n    'domain' => env('SESSION_DOMAIN', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | HTTPS Only Cookies\n    |--------------------------------------------------------------------------\n    |\n    | By setting this option to true, session cookies will only be sent back\n    | to the server if the browser has a HTTPS connection. This will keep\n    | the cookie from being sent to you if it can not be done securely.\n    |\n    */\n\n    'secure' => env('SESSION_SECURE_COOKIE', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | HTTP Access Only\n    |--------------------------------------------------------------------------\n    |\n    | Setting this value to true will prevent JavaScript from accessing the\n    | value of the cookie and the cookie will only be accessible through\n    | the HTTP protocol. You are free to modify this option if needed.\n    |\n    */\n\n    'http_only' => true,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Same-Site Cookies\n    |--------------------------------------------------------------------------\n    |\n    | This option determines how your cookies behave when cross-site requests\n    | take place, and can be used to mitigate CSRF attacks. By default, we\n    | do not enable this as other CSRF protection services are in place.\n    |\n    | Supported: \"lax\", \"strict\", \"none\"\n    |\n    */\n\n    'same_site' => null,\n\n];\n"
  },
  {
    "path": "config/view.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | View Storage Paths\n    |--------------------------------------------------------------------------\n    |\n    | Most templating systems load templates from disk. Here you may specify\n    | an array of paths that should be checked for your views. Of course\n    | the usual Laravel view path has already been registered for you.\n    |\n    */\n\n    'paths' => [\n        resource_path('views'),\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Compiled View Path\n    |--------------------------------------------------------------------------\n    |\n    | This option determines where all the compiled Blade templates will be\n    | stored for your application. Typically, this is within the storage\n    | directory. However, as usual, you are free to change this value.\n    |\n    */\n\n    'compiled' => env(\n        'VIEW_COMPILED_PATH',\n        realpath(storage_path('framework/views'))\n    ),\n\n];\n"
  },
  {
    "path": "database/.gitignore",
    "content": "*.sqlite\n"
  },
  {
    "path": "database/factories/ContactFactory.php",
    "content": "<?php\n\nuse Faker\\Generator as Faker;\n\n$factory->define(App\\Contact::class, function (Faker $faker) {\n    return [\n        'first_name' => $faker->firstName,\n        'last_name' => $faker->lastName,\n        'email' => $faker->unique()->safeEmail,\n        'phone' => $faker->tollFreePhoneNumber,\n        'address' => $faker->streetAddress,\n        'city' => $faker->city,\n        'region' => $faker->state,\n        'country' => 'US',\n        'postal_code' => $faker->postcode,\n    ];\n});\n"
  },
  {
    "path": "database/factories/OrganizationFactory.php",
    "content": "<?php\n\nuse Faker\\Generator as Faker;\n\n$factory->define(App\\Organization::class, function (Faker $faker) {\n    return [\n        'name' => $faker->company,\n        'email' => $faker->companyEmail,\n        'phone' => $faker->tollFreePhoneNumber,\n        'address' => $faker->streetAddress,\n        'city' => $faker->city,\n        'region' => $faker->state,\n        'country' => 'US',\n        'postal_code' => $faker->postcode,\n    ];\n});\n"
  },
  {
    "path": "database/factories/UserFactory.php",
    "content": "<?php\n\nuse Faker\\Generator as Faker;\nuse Illuminate\\Support\\Str;\n\n/*\n|--------------------------------------------------------------------------\n| Model Factories\n|--------------------------------------------------------------------------\n|\n| This directory should contain each of the model factory definitions for\n| your application. Factories provide a convenient way to generate new\n| model instances for testing / seeding your application's database.\n|\n*/\n\n$factory->define(App\\User::class, function (Faker $faker) {\n    return [\n        'first_name' => $faker->firstName,\n        'last_name' => $faker->lastName,\n        'email' => $faker->unique()->safeEmail,\n        'password' => 'secret',\n        'remember_token' => Str::random(10),\n        'owner' => false,\n    ];\n});\n"
  },
  {
    "path": "database/migrations/2019_03_05_000000_create_accounts_table.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateAccountsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('accounts', function (Blueprint $table) {\n            $table->increments('id');\n            $table->string('name', 50);\n            $table->timestamps();\n        });\n    }\n}\n"
  },
  {
    "path": "database/migrations/2019_03_05_000000_create_contacts_table.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateContactsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('contacts', function (Blueprint $table) {\n            $table->increments('id');\n            $table->integer('account_id')->index();\n            $table->integer('organization_id')->nullable()->index();\n            $table->string('first_name', 25);\n            $table->string('last_name', 25);\n            $table->string('email', 50)->nullable();\n            $table->string('phone', 50)->nullable();\n            $table->string('address', 150)->nullable();\n            $table->string('city', 50)->nullable();\n            $table->string('region', 50)->nullable();\n            $table->string('country', 2)->nullable();\n            $table->string('postal_code', 25)->nullable();\n            $table->timestamps();\n            $table->softDeletes();\n        });\n    }\n}\n"
  },
  {
    "path": "database/migrations/2019_03_05_000000_create_organizations_table.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateOrganizationsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('organizations', function (Blueprint $table) {\n            $table->increments('id');\n            $table->integer('account_id')->index();\n            $table->string('name', 100);\n            $table->string('email', 50)->nullable();\n            $table->string('phone', 50)->nullable();\n            $table->string('address', 150)->nullable();\n            $table->string('city', 50)->nullable();\n            $table->string('region', 50)->nullable();\n            $table->string('country', 2)->nullable();\n            $table->string('postal_code', 25)->nullable();\n            $table->timestamps();\n            $table->softDeletes();\n        });\n    }\n}\n"
  },
  {
    "path": "database/migrations/2019_03_05_000000_create_password_resets_table.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreatePasswordResetsTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('password_resets', function (Blueprint $table) {\n            $table->string('email')->index();\n            $table->string('token');\n            $table->timestamp('created_at')->nullable();\n        });\n    }\n}\n"
  },
  {
    "path": "database/migrations/2019_03_05_000000_create_users_table.php",
    "content": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateUsersTable extends Migration\n{\n    public function up()\n    {\n        Schema::create('users', function (Blueprint $table) {\n            $table->increments('id');\n            $table->integer('account_id')->index();\n            $table->string('first_name', 25);\n            $table->string('last_name', 25);\n            $table->string('email', 50)->unique();\n            $table->string('password')->nullable();\n            $table->boolean('owner')->default(false);\n            $table->string('photo_path', 100)->nullable();\n            $table->rememberToken();\n            $table->timestamps();\n            $table->softDeletes();\n        });\n    }\n}\n"
  },
  {
    "path": "database/seeds/DatabaseSeeder.php",
    "content": "<?php\n\nuse App\\User;\nuse App\\Account;\nuse App\\Contact;\nuse App\\Organization;\nuse Illuminate\\Database\\Seeder;\n\nclass DatabaseSeeder extends Seeder\n{\n    public function run()\n    {\n        $account = Account::create(['name' => 'Acme Corporation']);\n\n        factory(User::class)->create([\n            'account_id' => $account->id,\n            'first_name' => 'John',\n            'last_name' => 'Doe',\n            'email' => 'johndoe@example.com',\n            'owner' => true,\n        ]);\n\n        factory(User::class, 5)->create(['account_id' => $account->id]);\n\n        $organizations = factory(Organization::class, 100)\n            ->create(['account_id' => $account->id]);\n\n        factory(Contact::class, 100)\n            ->create(['account_id' => $account->id])\n            ->each(function ($contact) use ($organizations) {\n                $contact->update(['organization_id' => $organizations->random()->id]);\n            });\n    }\n}\n"
  },
  {
    "path": "jsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"./resources/js/*\"]\n    }\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"npm run development\",\n    \"development\": \"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\",\n    \"watch\": \"npm run development -- --watch\",\n    \"watch-poll\": \"npm run watch -- --watch-poll\",\n    \"hot\": \"cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js\",\n    \"prod\": \"npm run production\",\n    \"production\": \"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\"\n  },\n  \"dependencies\": {\n    \"@fullhuman/postcss-purgecss\": \"^1.3.0\",\n    \"@inertiajs/inertia\": \"^0.1.7\",\n    \"@inertiajs/inertia-svelte\": \"^0.1.0\",\n    \"@sentry/browser\": \"^5.15.0\",\n    \"axios\": \"^0.19.2\",\n    \"classnames\": \"^2.2.6\",\n    \"cross-env\": \"^6.0.3\",\n    \"eslint\": \"^6.8.0\",\n    \"laravel-mix\": \"^5.0.4\",\n    \"laravel-mix-svelte\": \"^0.1.3\",\n    \"lodash\": \"^4.17.15\",\n    \"postcss-import\": \"^12.0.1\",\n    \"postcss-nesting\": \"^7.0.1\",\n    \"resolve-url-loader\": \"^3.1.1\",\n    \"tailwindcss\": \"^1.2.0\"\n  },\n  \"devDependencies\": {\n    \"babel-eslint\": \"^10.1.0\",\n    \"eslint-plugin-svelte3\": \"^2.7.3\",\n    \"svelte\": \"^3.20.1\",\n    \"svelte-loader\": \"^2.13.6\",\n    \"vue-template-compiler\": \"^2.6.11\"\n  }\n}\n"
  },
  {
    "path": "phpunit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit backupGlobals=\"false\"\n         backupStaticAttributes=\"false\"\n         bootstrap=\"vendor/autoload.php\"\n         colors=\"true\"\n         convertErrorsToExceptions=\"true\"\n         convertNoticesToExceptions=\"true\"\n         convertWarningsToExceptions=\"true\"\n         processIsolation=\"false\"\n         stopOnFailure=\"false\">\n    <testsuites>\n        <testsuite name=\"Unit\">\n            <directory suffix=\"Test.php\">./tests/Unit</directory>\n        </testsuite>\n\n        <testsuite name=\"Feature\">\n            <directory suffix=\"Test.php\">./tests/Feature</directory>\n        </testsuite>\n    </testsuites>\n    <filter>\n        <whitelist processUncoveredFilesFromWhitelist=\"true\">\n            <directory suffix=\".php\">./app</directory>\n        </whitelist>\n    </filter>\n    <php>\n        <server name=\"APP_ENV\" value=\"testing\"/>\n        <server name=\"BCRYPT_ROUNDS\" value=\"4\"/>\n        <server name=\"CACHE_DRIVER\" value=\"array\"/>\n        <server name=\"MAIL_DRIVER\" value=\"array\"/>\n        <server name=\"QUEUE_CONNECTION\" value=\"sync\"/>\n        <server name=\"SESSION_DRIVER\" value=\"array\"/>\n        <server name=\"DB_CONNECTION\" value=\"sqlite\"/>\n        <server name=\"DB_DATABASE\" value=\":memory:\"/>\n    </php>\n</phpunit>\n"
  },
  {
    "path": "public/.htaccess",
    "content": "<IfModule mod_rewrite.c>\n    <IfModule mod_negotiation.c>\n        Options -MultiViews -Indexes\n    </IfModule>\n\n    RewriteEngine On\n\n    # Handle Authorization Header\n    RewriteCond %{HTTP:Authorization} .\n    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n\n    # Redirect Trailing Slashes If Not A Folder...\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteCond %{REQUEST_URI} (.+)/$\n    RewriteRule ^ %1 [L,R=301]\n\n    # Handle Front Controller...\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteRule ^ index.php [L]\n</IfModule>\n"
  },
  {
    "path": "public/index.php",
    "content": "<?php\n\n/**\n * Laravel - A PHP Framework For Web Artisans\n *\n * @package  Laravel\n * @author   Taylor Otwell <taylor@laravel.com>\n */\n\ndefine('LARAVEL_START', microtime(true));\n\n/*\n|--------------------------------------------------------------------------\n| Register The Auto Loader\n|--------------------------------------------------------------------------\n|\n| Composer provides a convenient, automatically generated class loader for\n| our application. We just need to utilize it! We'll simply require it\n| into the script here so that we don't have to worry about manual\n| loading any of our classes later on. It feels great to relax.\n|\n*/\n\nrequire __DIR__.'/../vendor/autoload.php';\n\n/*\n|--------------------------------------------------------------------------\n| Turn On The Lights\n|--------------------------------------------------------------------------\n|\n| We need to illuminate PHP development, so let us turn on the lights.\n| This bootstraps the framework and gets it ready for use, then it\n| will load up this application so that we can run it and send\n| the responses back to the browser and delight our users.\n|\n*/\n\n$app = require_once __DIR__.'/../bootstrap/app.php';\n\n/*\n|--------------------------------------------------------------------------\n| Run The Application\n|--------------------------------------------------------------------------\n|\n| Once we have the application, we can handle the incoming request\n| through the kernel, and send the associated response back to\n| the client's browser allowing them to enjoy the creative\n| and wonderful application we have prepared for them.\n|\n*/\n\n$kernel = $app->make(Illuminate\\Contracts\\Http\\Kernel::class);\n\n$response = $kernel->handle(\n    $request = Illuminate\\Http\\Request::capture()\n);\n\n$response->send();\n\n$kernel->terminate($request, $response);\n"
  },
  {
    "path": "public/robots.txt",
    "content": "User-agent: *\nDisallow:\n"
  },
  {
    "path": "public/web.config",
    "content": "<!--\n    Rewrites requires Microsoft URL Rewrite Module for IIS\n    Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337\n    Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules\n-->\n<configuration>\n  <system.webServer>\n    <rewrite>\n      <rules>\n        <rule name=\"Imported Rule 1\" stopProcessing=\"true\">\n          <match url=\"^(.*)/$\" ignoreCase=\"false\" />\n          <conditions>\n            <add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />\n          </conditions>\n          <action type=\"Redirect\" redirectType=\"Permanent\" url=\"/{R:1}\" />\n        </rule>\n        <rule name=\"Imported Rule 2\" stopProcessing=\"true\">\n          <match url=\"^\" ignoreCase=\"false\" />\n          <conditions>\n            <add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />\n            <add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" negate=\"true\" />\n          </conditions>\n          <action type=\"Rewrite\" url=\"index.php\" />\n        </rule>\n      </rules>\n    </rewrite>\n  </system.webServer>\n</configuration>\n"
  },
  {
    "path": "readme.md",
    "content": "# Ping CRM Svelte\n\nA demo application to illustrate how [Inertia.js](https://inertiajs.com/) works with [Laravel](https://laravel.com/) and [Svelte](https://svelte.dev/).\n\n> This is a port of the original [Ping CRM](https://github.com/inertiajs/pingcrm) written in Laravel and Vue.\n\n![](https://raw.githubusercontent.com/zgabievi/pingcrm-svelte/master/screenshot.png)\n\n## Installation\n\nClone the repo locally:\n\n```sh\ngit clone https://github.com/zgabievi/pingcrm-svelte.git\ncd pingcrm-svelte\n```\n\nInstall PHP dependencies:\n\n```sh\ncomposer install\n```\n\nInstall NPM dependencies:\n\n```sh\nnpm install\n```\n\nBuild assets:\n\n```sh\nnpm run dev\n```\n\nSetup configuration:\n\n```sh\ncp .env.example .env\n```\n\nGenerate application key:\n\n```sh\nphp artisan key:generate\n```\n\nCreate an SQLite database. You can also use another database (MySQL, Postgres), simply update your configuration accordingly.\n\n```sh\ntouch database/database.sqlite\n```\n\nRun database migrations:\n\n```sh\nphp artisan migrate\n```\n\nRun database seeder:\n\n```sh\nphp artisan db:seed\n```\n\nRun artisan server:\n\n```sh\nphp artisan serve\n```\n\nYou're ready to go! [Visit Ping CRM](http://127.0.0.1:8000/) in your browser, and login with:\n\n- **Username:** johndoe@example.com\n- **Password:** secret\n\n## Running tests\n\nTo run the Ping CRM tests, run:\n\n```\nphpunit\n```\n\n## Credits\n\n- Original work by Jonathan Reinink (@reinink) and contributors\n- Port to Ruby on Rails by Georg Ledermann (@ledermann)\n- Port to React by Lado Lomidze (@landish)\n- Port to Svelte by Zura Gabievi (@zgabievi)\n"
  },
  {
    "path": "resources/css/app.css",
    "content": "/* Reset */\n@import 'reset';\n@import 'tailwindcss/base';\n@import 'tailwindcss/components';\n\n/* Components */\n@import 'buttons';\n@import 'form';\n@import 'nprogress';\n\n/* Utilities */\n@import 'tailwindcss/utilities';\n"
  },
  {
    "path": "resources/css/buttons.css",
    "content": ".btn-indigo {\n  @apply px-6 py-3 rounded bg-indigo-700 text-white text-sm font-bold whitespace-no-wrap;\n\n  &:hover,\n  &:focus {\n    @apply bg-orange-500;\n  }\n}\n\n.btn-spinner,\n.btn-spinner:after {\n  border-radius: 50%;\n  width: 1.5em;\n  height: 1.5em;\n}\n\n.btn-spinner {\n  font-size: 10px;\n  position: relative;\n  text-indent: -9999em;\n  border-top: 0.2em solid white;\n  border-right: 0.2em solid white;\n  border-bottom: 0.2em solid white;\n  border-left: 0.2em solid transparent;\n  transform: translateZ(0);\n  animation: spinning 1s infinite linear;\n}\n\n@keyframes spinning {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "resources/css/form.css",
    "content": ".form-label {\n  @apply .mb-2 .block .text-gray-800 .select-none;\n}\n\n.form-input,\n.form-textarea,\n.form-select {\n  @apply .p-2 .leading-normal .block .w-full .border .text-gray-800 .bg-white .font-sans .rounded .text-left .appearance-none .relative;\n\n  &:focus-within,\n  &:focus,\n  &.focus {\n    @apply .border-indigo-500;\n    box-shadow: 0 0 0 1px theme('colors.indigo.500');\n  }\n\n  &::placeholder {\n    @apply .text-gray-600 .opacity-100;\n  }\n}\n\n.form-select {\n  @apply .pr-6;\n\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAABGdBTUEAALGPC/xhBQAAAQtJREFUOBG1lEEOgjAQRalbGj2OG9caOACn4ALGtfEuHACiazceR1PWOH/CNA3aMiTaBDpt/7zPdBKy7M/DCL9pGkvxxVp7KsvyJftL5rZt1865M+Ucq6pyyF3hNcI7Cuu+728QYn/JQA5yKaempxuZmQngOwEaYx55nu+1lQh8GIatMGi+01NwBcEmhxBqK4nAPZJ78K0KKFAJmR3oPp8+Iwgob0Oa6+TLoeCvRx+mTUYf/FVBGTPRwDkfLxnaSrRwcH0FWhNOmrkWYbE2XEicqgSa1J0LQ+aPCuQgZiLnwewbGuz5MGoAhcIkCQcjaTBjMgtXGURMVHC1wcQEy0J+Zlj8bKAnY1/UzDe2dbAVqfXn6wAAAABJRU5ErkJggg==');\n  background-size: 0.7rem;\n  background-repeat: no-repeat;\n  background-position: right 0.7rem center;\n\n  &::-ms-expand {\n    @apply .opacity-0;\n  }\n}\n\n.form-error {\n  @apply .text-red-500 .mt-2 .text-sm;\n}\n\n.form-input.error,\n.form-textarea.error,\n.form-select.error {\n  @apply .border-red-400;\n\n  &:focus {\n    box-shadow: 0 0 0 1px theme('colors.red.400');\n  }\n}\n"
  },
  {
    "path": "resources/css/nprogress.css",
    "content": "/* Make clicks pass-through */\n#nprogress {\n  pointer-events: none;\n}\n\n#nprogress .bar {\n  background: theme('colors.indigo.500');\n\n  position: fixed;\n  z-index: 1031;\n  top: 0;\n  left: 0;\n\n  width: 100%;\n  height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n  display: block;\n  position: absolute;\n  right: 0px;\n  width: 100px;\n  height: 100%;\n  box-shadow: 0 0 10px theme('colors.indigo.500'),\n    0 0 5px theme('colors.indigo.500');\n  opacity: 1;\n\n  -webkit-transform: rotate(3deg) translate(0px, -4px);\n  -ms-transform: rotate(3deg) translate(0px, -4px);\n  transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n  display: block;\n  position: fixed;\n  z-index: 1031;\n  top: 15px;\n  right: 15px;\n}\n\n#nprogress .spinner-icon {\n  width: 18px;\n  height: 18px;\n  box-sizing: border-box;\n\n  border: solid 2px transparent;\n  border-top-color: theme('colors.indigo.500');\n  border-left-color: theme('colors.indigo.500');\n  border-radius: 50%;\n\n  -webkit-animation: nprogress-spinner 400ms linear infinite;\n  animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n  overflow: hidden;\n  position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n  position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n  0% {\n    -webkit-transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n  }\n}\n@keyframes nprogress-spinner {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n"
  },
  {
    "path": "resources/css/reset.css",
    "content": "html {\n  line-height: 1.15;\n}\n\ninput,\nselect,\ntextarea,\nbutton,\ndiv,\na {\n  &:focus,\n  &:active {\n    outline: none;\n  }\n}\n"
  },
  {
    "path": "resources/js/Pages/Auth/Login.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import {page} from '@inertiajs/inertia-svelte';\n    import Logo from '@/Shared/Logo.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n\n    $: errors = $page.errors;\n\n    let sending = false;\n    let values = {\n        email: 'johndoe@example.com',\n        password: 'secret',\n        remember: true\n    };\n\n    function handleChange(e) {\n        const key = e.target.name;\n        const value =\n            e.target.type === 'checkbox' ? e.target.checked : e.target.value;\n\n        values = {\n            ...values,\n            [key]: value\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n        Inertia.post(route('login.attempt'), values).then(() => sending = false);\n    }\n</script>\n\n<Helmet title=\"Login\"/>\n\n<div class=\"p-6 bg-indigo-900 min-h-screen flex justify-center items-center\">\n    <div class=\"w-full max-w-md\">\n        <Logo\n            class=\"block mx-auto w-full max-w-xs text-white fill-current\"\n            height={50}\n        />\n\n        <form\n            on:submit|preventDefault={handleSubmit}\n            class=\"mt-8 bg-white rounded-lg shadow-xl overflow-hidden\"\n        >\n            <div class=\"px-10 py-12\">\n                <h1 class=\"text-center font-bold text-3xl\">Welcome Back!</h1>\n                <div class=\"mx-auto mt-6 w-24 border-b-2\"/>\n\n                <TextInput\n                    className=\"mt-10\"\n                    label=\"Email\"\n                    name=\"email\"\n                    type=\"email\"\n                    errors={errors.email}\n                    value={values.email}\n                    onChange={handleChange}\n                />\n\n                <TextInput\n                    className=\"mt-6\"\n                    label=\"Password\"\n                    name=\"password\"\n                    type=\"password\"\n                    errors={errors.password}\n                    value={values.password}\n                    onChange={handleChange}\n                />\n\n                <label\n                    class=\"mt-6 select-none flex items-center\"\n                    for=\"remember\"\n                >\n                    <input\n                        name=\"remember\"\n                        id=\"remember\"\n                        class=\"mr-1\"\n                        type=\"checkbox\"\n                        checked={values.remember}\n                        on:change={handleChange}\n                    />\n\n                    <span class=\"text-sm\">Remember Me</span>\n                </label>\n            </div>\n\n            <div class=\"px-10 py-4 bg-gray-100 border-t border-gray-200 flex justify-between items-center\">\n                <a class=\"hover:underline\" tabindex=\"-1\" href=\"#reset-password\">\n                    Forget password?\n                </a>\n\n                <LoadingButton\n                    type=\"submit\"\n                    loading={sending}\n                    className=\"btn-indigo\"\n                >\n                    Login\n                </LoadingButton>\n            </div>\n        </form>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/js/Pages/Contacts/Create.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n\n    const route = window.route;\n\n    $: organizations = $page.organizations;\n    $: errors = $page.errors;\n\n    let sending = false;\n\n    let values = {\n        first_name: '',\n        last_name: '',\n        organization_id: '',\n        email: '',\n        phone: '',\n        address: '',\n        city: '',\n        region: '',\n        country: '',\n        postal_code: ''\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values = {\n            ...values,\n            [name]: value\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n        Inertia.post(route('contacts.store'), values).then(() => sending = false);\n    }\n</script>\n\n<Helmet title=\"Create Contact\" />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">\n            <InertiaLink\n                href={route('contacts')}\n                class=\"text-indigo-600 hover:text-indigo-700\"\n            >\n                Contacts\n            </InertiaLink>\n\n            <span class=\"text-indigo-600 font-medium\"> /</span> Create\n        </h1>\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"First Name\"\n                        name=\"first_name\"\n                        errors={errors.first_name}\n                        value={values.first_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Last Name\"\n                        name=\"last_name\"\n                        errors={errors.last_name}\n                        value={values.last_name}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Organization\"\n                        name=\"organization_id\"\n                        errors={errors.organization_id}\n                        value={values.organization_id}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        {#each organizations as {id, name} (id)}\n                            <option value={`${id}`}>{name}</option>\n                        {/each}\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Phone\"\n                        name=\"phone\"\n                        type=\"text\"\n                        errors={errors.phone}\n                        value={values.phone}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Address\"\n                        name=\"address\"\n                        type=\"text\"\n                        errors={errors.address}\n                        value={values.address}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"City\"\n                        name=\"city\"\n                        type=\"text\"\n                        errors={errors.city}\n                        value={values.city}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Province/State\"\n                        name=\"region\"\n                        type=\"text\"\n                        errors={errors.region}\n                        value={values.region}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Country\"\n                        name=\"country\"\n                        errors={errors.country}\n                        value={values.country}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Postal Code\"\n                        name=\"postal_code\"\n                        type=\"text\"\n                        errors={errors.postal_code}\n                        value={values.postal_code}\n                        onChange={handleChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex justify-end items-center\">\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        class=\"btn-indigo\"\n                    >\n                        Create Contact\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Contacts/Edit.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import DeleteButton from '@/Shared/DeleteButton.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n    import TrashedMessage from '@/Shared/TrashedMessage.svelte';\n\n    const route = window.route;\n\n    let { contact } = $page;\n    $: contact = $page.contact;\n    $: organizations = $page.organizations;\n    $: errors = $page.errors;\n\n    let sending = false;\n    let values = {\n        first_name: contact.first_name || '',\n        last_name: contact.last_name || '',\n        organization_id: contact.organization_id || '',\n        email: contact.email || '',\n        phone: contact.phone || '',\n        address: contact.address || '',\n        city: contact.city || '',\n        region: contact.region || '',\n        country: contact.country || '',\n        postal_code: contact.postal_code || ''\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values ={\n            ...values,\n            [name]: value\n        };\n    }\n\n    function handleSubmit(e) {\n        sending = true;\n        Inertia.put(route('contacts.update', contact.id), values).then(() => sending = false);\n    }\n\n    function destroy() {\n        if (confirm('Are you sure you want to delete this contact?')) {\n            Inertia.delete(route('contacts.destroy', contact.id));\n        }\n    }\n\n    function restore() {\n        if (confirm('Are you sure you want to restore this contact?')) {\n            Inertia.put(route('contacts.restore', contact.id));\n        }\n    }\n</script>\n\n<Helmet title={`${values.first_name} ${values.last_name}`} />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">\n            <InertiaLink\n                href={route('contacts')}\n                class=\"text-indigo-600 hover:text-indigo-700\"\n            >\n                Contacts\n            </InertiaLink>\n\n            <span class=\"text-indigo-600 font-medium mx-2\">/</span>\n            {values.first_name} {values.last_name}\n        </h1>\n\n        {#if contact.deleted_at}\n            <TrashedMessage onRestore={restore}>This contact has been deleted.</TrashedMessage>\n        {/if}\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"First Name\"\n                        name=\"first_name\"\n                        errors={errors.first_name}\n                        value={values.first_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Last Name\"\n                        name=\"last_name\"\n                        errors={errors.last_name}\n                        value={values.last_name}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Organization\"\n                        name=\"organization_id\"\n                        errors={errors.organization_id}\n                        value={values.organization_id}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        {#each organizations as { id, name } (id)}\n                            <option value={`${id}`}>{name}</option>\n                        {/each}\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Phone\"\n                        name=\"phone\"\n                        type=\"text\"\n                        errors={errors.phone}\n                        value={values.phone}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Address\"\n                        name=\"address\"\n                        type=\"text\"\n                        errors={errors.address}\n                        value={values.address}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"City\"\n                        name=\"city\"\n                        type=\"text\"\n                        errors={errors.city}\n                        value={values.city}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Province/State\"\n                        name=\"region\"\n                        type=\"text\"\n                        errors={errors.region}\n                        value={values.region}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Country\"\n                        name=\"country\"\n                        errors={errors.country}\n                        value={values.country}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Postal Code\"\n                        name=\"postal_code\"\n                        type=\"text\"\n                        errors={errors.postal_code}\n                        value={values.postal_code}\n                        onChange={handleChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex items-center\">\n                    {#if !contact.deleted_at}\n                        <DeleteButton onDelete={destroy}>Delete Contact</DeleteButton>\n                    {/if}\n\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        className=\"btn-indigo ml-auto\"\n                    >\n                        Update Contact\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Contacts/Index.svelte",
    "content": "<script>\n    import Helmet from '@/Shared/Helmet.svelte';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import Icon from '@/Shared/Icon.svelte';\n    import Pagination from '@/Shared/Pagination.svelte';\n    import SearchFilter from '@/Shared/SearchFilter.svelte';\n\n    const route = window.route;\n\n    $: data = $page.contacts.data;\n    $: links = $page.contacts.links;\n</script>\n\n<Helmet title=\"Contacts\" />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">Contacts</h1>\n\n        <div class=\"mb-6 flex justify-between items-center\">\n            <SearchFilter />\n\n            <InertiaLink class=\"btn-indigo\" href={route('contacts.create')}>\n                <span>Create</span>\n                <span class=\"hidden md:inline\"> Contact</span>\n            </InertiaLink>\n        </div>\n\n        <div class=\"bg-white rounded shadow overflow-x-auto\">\n            <table class=\"w-full whitespace-no-wrap\">\n                <thead>\n                    <tr class=\"text-left font-bold\">\n                        <th class=\"px-6 pt-5 pb-4\">Name</th>\n                        <th class=\"px-6 pt-5 pb-4\">Organization</th>\n                        <th class=\"px-6 pt-5 pb-4\">City</th>\n                        <th class=\"px-6 pt-5 pb-4\" colspan=\"2\">Phone</th>\n                    </tr>\n                </thead>\n                <tbody>\n                    {#if !data || data.length === 0}\n                        <tr>\n                            <td class=\"border-t px-6 py-4\" colspan=\"4\">\n                                No contacts found.\n                            </td>\n                        </tr>\n                    {:else}\n                        {#each data as { id, name, city, phone, organization, deleted_at } (id)}\n                            <tr class=\"hover:bg-gray-100 focus-within:bg-gray-100\">\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo-700\"\n                                    >\n                                        {name}\n\n                                        {#if deleted_at}\n                                            <Icon\n                                                name=\"trash\"\n                                                class=\"flex-shrink-0 w-3 h-3 text-gray-400 fill-current ml-2\"\n                                            />\n                                        {/if}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"1\"\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                        href={route('contacts.edit', id)}\n                                    >\n                                        {organization && organization.name}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {city}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {phone}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t w-px\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-4 flex items-center\"\n                                    >\n                                        <Icon\n                                            name=\"cheveron-right\"\n                                            className=\"block w-6 h-6 text-gray-400 fill-current\"\n                                        />\n                                    </InertiaLink>\n                                </td>\n                            </tr>\n                        {/each}\n                    {/if}\n                </tbody>\n            </table>\n        </div>\n\n        <Pagination links={links} />\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Dashboard/Index.svelte",
    "content": "<script>\n    import {InertiaLink} from '@inertiajs/inertia-svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n</script>\n\n<Helmet title=\"Dashboard\"/>\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">Dashboard</h1>\n\n        <p class=\"mb-12 leading-normal\">\n            Hey there! Welcome to Ping CRM, a demo app designed to help illustrate\n            how\n            <a\n                class=\"text-indigo-600 underline hover:text-orange-500 mx-1\"\n                href=\"https://inertiajs.com\"\n            >\n                Inertia.js\n            </a>\n            works with\n            <a\n                class=\"text-indigo-600 underline hover:text-orange-500 ml-1\"\n                href=\"https://svelte.dev/\"\n            >\n                Svelte\n            </a>\n            .\n        </p>\n\n        <div>\n            <InertiaLink class=\"btn-indigo mr-1\" href=\"/500\">\n                500 error\n            </InertiaLink>\n\n            <InertiaLink class=\"btn-indigo\" href=\"/404\">\n                404 error\n            </InertiaLink>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Error.svelte",
    "content": "<script>\n    import Helmet from '@/Shared/Helmet.svelte';\n\n    export let status;\n\n    let title = {\n        503: '503: Service Unavailable',\n        500: '500: Server Error',\n        404: '404: Page Not Found',\n        403: '403: Forbidden'\n    }[status];\n\n    let description = {\n        503: 'Sorry, we are doing some maintenance. Please check back soon.',\n        500: 'Whoops, something went wrong on our servers.',\n        404: 'Sorry, the page you are looking for could not be found.',\n        403: 'Sorry, you are forbidden from accessing this page.'\n    }[status];\n</script>\n\n<Helmet title={title} />\n\n<div class=\"p-5 bg-indigo-800 text-indigo-100 min-h-screen flex justify-center items-center\">\n    <div class=\"w-full max-w-md\">\n        <h1 class=\"text-3xl\">{title}</h1>\n        <p class=\"mt-3 text-lg leading-tight\">{description}</p>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/js/Pages/Organizations/Create.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n\n    const route = window.route;\n\n    $: errors = $page.errors;\n\n    let sending = false;\n    let values = {\n        name: '',\n        email: '',\n        phone: '',\n        address: '',\n        city: '',\n        region: '',\n        country: '',\n        postal_code: ''\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values = {\n            ...values,\n            [name]: value\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n        Inertia.post(route('organizations.store'), values).then(() => sending = false);\n    }\n</script>\n\n<Helmet title=\"Create Organization\" />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">\n            <InertiaLink\n                href={route('organizations')}\n                class=\"text-indigo-600 hover:text-indigo-700\"\n            >\n                Organizations\n            </InertiaLink>\n\n            <span class=\"text-indigo-600 font-medium\"> /</span> Create\n        </h1>\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Name\"\n                        name=\"name\"\n                        errors={errors.name}\n                        value={values.name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Phone\"\n                        name=\"phone\"\n                        type=\"text\"\n                        errors={errors.phone}\n                        value={values.phone}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Address\"\n                        name=\"address\"\n                        type=\"text\"\n                        errors={errors.address}\n                        value={values.address}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"City\"\n                        name=\"city\"\n                        type=\"text\"\n                        errors={errors.city}\n                        value={values.city}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Province/State\"\n                        name=\"region\"\n                        type=\"text\"\n                        errors={errors.region}\n                        value={values.region}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Country\"\n                        name=\"country\"\n                        errors={errors.country}\n                        value={values.country}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Postal Code\"\n                        name=\"postal_code\"\n                        type=\"text\"\n                        errors={errors.postal_code}\n                        value={values.postal_code}\n                        onChange={handleChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex justify-end items-center\">\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        className=\"btn-indigo\"\n                    >\n                        Create Organization\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Organizations/Edit.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import DeleteButton from '@/Shared/DeleteButton.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n    import TrashedMessage from '@/Shared/TrashedMessage.svelte';\n    import Icon from '@/Shared/Icon.svelte';\n\n    const route = window.route;\n\n    let { organization } = $page;\n    $: errors = $page.errors;\n    $: organization = $page.organization;\n\n    let sending = false;\n    let values = {\n        name: organization.name || '',\n        email: organization.email || '',\n        phone: organization.phone || '',\n        address: organization.address || '',\n        city: organization.city || '',\n        region: organization.region || '',\n        country: organization.country || '',\n        postal_code: organization.postal_code || ''\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values = {\n            ...values,\n            [name]: value\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n        Inertia.put(route('organizations.update', organization.id), values).then(() => sending = false);\n    }\n\n    function destroy() {\n        if (confirm('Are you sure you want to delete this organization?')) {\n            Inertia.delete(route('organizations.destroy', organization.id));\n        }\n    }\n\n    function restore() {\n        if (confirm('Are you sure you want to restore this organization?')) {\n            Inertia.put(route('organizations.restore', organization.id));\n        }\n    }\n</script>\n\n<Helmet title={values.name} />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">\n            <InertiaLink\n                href={route('organizations')}\n                class=\"text-indigo-600 hover:text-indigo-700\"\n            >\n                Organizations\n            </InertiaLink>\n\n            <span class=\"text-indigo-600 font-medium mx-2\">/</span>\n            {values.name}\n        </h1>\n\n        {#if organization.deleted_at}\n            <TrashedMessage onRestore={restore}>This organization has been deleted.</TrashedMessage>\n        {/if}\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Name\"\n                        name=\"name\"\n                        errors={errors.name}\n                        value={values.name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Phone\"\n                        name=\"phone\"\n                        type=\"text\"\n                        errors={errors.phone}\n                        value={values.phone}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Address\"\n                        name=\"address\"\n                        type=\"text\"\n                        errors={errors.address}\n                        value={values.address}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"City\"\n                        name=\"city\"\n                        type=\"text\"\n                        errors={errors.city}\n                        value={values.city}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Province/State\"\n                        name=\"region\"\n                        type=\"text\"\n                        errors={errors.region}\n                        value={values.region}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Country\"\n                        name=\"country\"\n                        errors={errors.country}\n                        value={values.country}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        <option value=\"CA\">Canada</option>\n                        <option value=\"US\">United States</option>\n                    </SelectInput>\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Postal Code\"\n                        name=\"postal_code\"\n                        type=\"text\"\n                        errors={errors.postal_code}\n                        value={values.postal_code}\n                        onChange={handleChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex items-center\">\n                    {#if !organization.deleted_at}\n                        <DeleteButton onDelete={destroy}>Delete Organization</DeleteButton>\n                    {/if}\n\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        className=\"btn-indigo ml-auto\"\n                    >\n                        Update Organization\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n\n        <h2 class=\"mt-12 font-bold text-2xl\">Contacts</h2>\n\n        <div class=\"mt-6 bg-white rounded shadow overflow-x-auto\">\n            <table class=\"w-full whitespace-no-wrap\">\n                <thead>\n                    <tr class=\"text-left font-bold\">\n                        <th class=\"px-6 pt-5 pb-4\">Name</th>\n                        <th class=\"px-6 pt-5 pb-4\">City</th>\n                        <th class=\"px-6 pt-5 pb-4\" colspan=\"2\">Phone</th>\n                    </tr>\n                </thead>\n                <tbody>\n                    {#if !organization.contacts || organization.contacts.length === 0}\n                        <tr>\n                            <td class=\"border-t px-6 py-4\" colspan=\"4\">\n                                No contacts found.\n                            </td>\n                        </tr>\n                    {:else}\n                        {#each organization.contacts as { id, name, phone, city, deleted_at } (id)}\n                            <tr class=\"hover:bg-gray-100 focus-within:bg-gray-100\">\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {name}\n\n                                        {#if deleted_at}\n                                            <Icon\n                                                name=\"trash\"\n                                                className=\"flex-shrink-0 w-3 h-3 text-gray-400 fill-current ml-2\"\n                                            />\n                                        {/if}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {city}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {phone}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t w-px\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('contacts.edit', id)}\n                                        class=\"px-4 flex items-center\"\n                                    >\n                                        <Icon\n                                            name=\"cheveron-right\"\n                                            className=\"block w-6 h-6 text-gray-400 fill-current\"\n                                        />\n                                    </InertiaLink>\n                                </td>\n                            </tr>\n                        {/each}\n                    {/if}\n                </tbody>\n            </table>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Organizations/Index.svelte",
    "content": "<script>\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import Icon from '@/Shared/Icon.svelte';\n    import SearchFilter from '@/Shared/SearchFilter.svelte';\n    import Pagination from '@/Shared/Pagination.svelte';\n\n    const route = window.route;\n\n    $: links = $page.organizations.links;\n    $: data = $page.organizations.data;\n</script>\n\n<Helmet title=\"Organizations\" />\n\n<Layout>\n    <div>\n        <div>\n            <h1 class=\"mb-8 font-bold text-3xl\">Organizations</h1>\n            <div class=\"mb-6 flex justify-between items-center\">\n                <SearchFilter />\n\n                <InertiaLink\n                    class=\"btn-indigo\"\n                    href={route('organizations.create')}\n                >\n                    <span>Create</span>\n                    <span class=\"hidden md:inline\"> Organization</span>\n                </InertiaLink>\n            </div>\n\n            <div class=\"bg-white rounded shadow overflow-x-auto\">\n                <table class=\"w-full whitespace-no-wrap\">\n                    <thead>\n                        <tr class=\"text-left font-bold\">\n                            <th class=\"px-6 pt-5 pb-4\">Name</th>\n                            <th class=\"px-6 pt-5 pb-4\">City</th>\n                            <th class=\"px-6 pt-5 pb-4\" colspan=\"2\">Phone</th>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        {#if !data || data.length === 0}\n                            <tr>\n                                <td class=\"border-t px-6 py-4\" colspan=\"4\">\n                                    No organizations found.\n                                </td>\n                            </tr>\n                        {:else}\n                            {#each data as { id, name, city, phone, deleted_at } (id)}\n                                <tr class=\"hover:bg-gray-100 focus-within:bg-gray-100\">\n                                    <td class=\"border-t\">\n                                        <InertiaLink\n                                            href={route('organizations.edit', id)}\n                                            class=\"px-6 py-4 flex items-center focus:text-indigo-700\"\n                                        >\n                                            {name}\n\n                                            {#if deleted_at}\n                                                <Icon\n                                                    name=\"trash\"\n                                                    className=\"flex-shrink-0 w-3 h-3 text-gray-400 fill-current ml-2\"\n                                                />\n                                            {/if}\n                                        </InertiaLink>\n                                    </td>\n\n                                    <td class=\"border-t\">\n                                        <InertiaLink\n                                            tabindex=\"-1\"\n                                            href={route('organizations.edit', id)}\n                                            class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                        >\n                                            {city}\n                                        </InertiaLink>\n                                    </td>\n\n                                    <td class=\"border-t\">\n                                        <InertiaLink\n                                            tabindex=\"-1\"\n                                            href={route('organizations.edit', id)}\n                                            class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                        >\n                                            {phone}\n                                        </InertiaLink>\n                                    </td>\n\n                                    <td class=\"border-t w-px\">\n                                        <InertiaLink\n                                            tabindex=\"-1\"\n                                            href={route('organizations.edit', id)}\n                                            class=\"px-4 flex items-center\"\n                                        >\n                                            <Icon\n                                                name=\"cheveron-right\"\n                                                className=\"block w-6 h-6 text-gray-400 fill-current\"\n                                            />\n                                        </InertiaLink>\n                                    </td>\n                                </tr>\n                            {/each}\n                        {/if}\n                    </tbody>\n                </table>\n            </div>\n\n            <Pagination links={links} />\n        </div>\n    </div>\n</Layout>\n\n"
  },
  {
    "path": "resources/js/Pages/Reports/Index.svelte",
    "content": "<script>\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n</script>\n\n<Helmet title=\"Reports\" />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">Reports</h1>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Users/Create.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n    import FileInput from '@/Shared/FileInput.svelte';\n    import { toFormData } from '@/utils';\n\n    const route = window.route;\n\n    $: errors = $page.errors;\n\n    let sending = false;\n    let values = {\n        first_name: '',\n        last_name: '',\n        email: '',\n        password: '',\n        owner: '0',\n        photo: ''\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values = {\n            ...values,\n            [key]: value\n        };\n    }\n\n    function handleFileChange(file) {\n        values = {\n            ...values,\n            photo: file\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n\n        // since we are uploading an image\n        // we need to use FormData object\n        // for more info check utils.js\n        const formData = toFormData(values);\n\n        Inertia.post(route('users.store'), formData).then(() =>  sending = false);\n    }\n</script>\n\n<Helmet title=\"Create User\" />\n\n<Layout>\n    <div>\n        <div>\n            <h1 class=\"mb-8 font-bold text-3xl\">\n                <InertiaLink\n                    href={route('users')}\n                    class=\"text-indigo-600 hover:text-indigo-700\"\n                >\n                    Users\n                </InertiaLink>\n\n                <span class=\"text-indigo-600 font-medium\"> /</span> Create\n            </h1>\n        </div>\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form name=\"createForm\" on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"First Name\"\n                        name=\"first_name\"\n                        errors={errors.first_name}\n                        value={values.first_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Last Name\"\n                        name=\"last_name\"\n                        errors={errors.last_name}\n                        value={values.last_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Password\"\n                        name=\"password\"\n                        type=\"password\"\n                        errors={errors.password}\n                        value={values.password}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Owner\"\n                        name=\"owner\"\n                        errors={errors.owner}\n                        value={values.owner}\n                        onChange={handleChange}\n                    >\n                        <option value=\"1\">Yes</option>\n                        <option value=\"0\">No</option>\n                    </SelectInput>\n\n                    <FileInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Photo\"\n                        name=\"photo\"\n                        accept=\"image/*\"\n                        errors={errors.photo}\n                        value={values.photo}\n                        onChange={handleFileChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex justify-end items-center\">\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        className=\"btn-indigo\"\n                    >\n                        Create User\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Users/Edit.svelte",
    "content": "<script>\n    import { Inertia } from '@inertiajs/inertia';\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import DeleteButton from '@/Shared/DeleteButton.svelte';\n    import LoadingButton from '@/Shared/LoadingButton.svelte';\n    import TextInput from '@/Shared/TextInput.svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n    import FileInput from '@/Shared/FileInput.svelte';\n    import TrashedMessage from '@/Shared/TrashedMessage.svelte';\n    import { toFormData } from '@/utils';\n\n    const route = window.route;\n\n    let { user } = $page;\n    $: user = $page.user;\n    $: errors = $page.errors;\n\n    let sending = false;\n    let values = {\n        first_name: user.first_name || '',\n        last_name: user.last_name || '',\n        email: user.email || '',\n        password: user.password || '',\n        owner: user.owner ? '1' : '0' || '0'\n        // photo: '',\n    };\n\n    function handleChange({ target: { name, value } }) {\n        values = {\n            ...values,\n            [name]: value\n        };\n    }\n\n    function handleFileChange(file) {\n        values = {\n            ...values,\n            photo: file\n        };\n    }\n\n    function handleSubmit() {\n        sending = true;\n\n        // since we are uploading an image\n        // we need to use FormData object\n\n        // NOTE: When working with Laravel PUT/PATCH requests and FormData\n        // you SHOULD send POST request and fake the PUT request like this.\n        // For more info check utils.jf file\n        const formData = toFormData(values, 'PUT');\n\n        Inertia.post(route('users.update', user.id), formData).then(() => sending = false);\n    }\n\n    function destroy() {\n        if (confirm('Are you sure you want to delete this user?')) {\n            Inertia.delete(route('users.destroy', user.id));\n        }\n    }\n\n    function restore() {\n        if (confirm('Are you sure you want to restore this user?')) {\n            Inertia.put(route('users.restore', user.id));\n        }\n    }\n</script>\n\n<Helmet title={`${values.first_name} ${values.last_name}`} />\n\n<Layout>\n    <div>\n        <div class=\"mb-8 flex justify-start max-w-lg\">\n            <h1 class=\"font-bold text-3xl\">\n                <InertiaLink\n                    href={route('users')}\n                    class=\"text-indigo-600 hover:text-indigo-700\"\n                >\n                    Users\n                </InertiaLink>\n\n                <span class=\"text-indigo-600 font-medium mx-2\">/</span>\n                {values.first_name} {values.last_name}\n            </h1>\n\n            {#if user.photo}\n                <img class=\"block w-8 h-8 rounded-full ml-4\" src={user.photo} alt={user.name} />\n            {/if}\n        </div>\n\n        {#if user.deleted_at}\n            <TrashedMessage onRestore={restore}>\n                This contact has been deleted.\n            </TrashedMessage>\n        {/if}\n\n        <div class=\"bg-white rounded shadow overflow-hidden max-w-3xl\">\n            <form on:submit|preventDefault={handleSubmit}>\n                <div class=\"p-8 -mr-6 -mb-8 flex flex-wrap\">\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"First Name\"\n                        name=\"first_name\"\n                        errors={errors.first_name}\n                        value={values.first_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Last Name\"\n                        name=\"last_name\"\n                        errors={errors.last_name}\n                        value={values.last_name}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Email\"\n                        name=\"email\"\n                        type=\"email\"\n                        errors={errors.email}\n                        value={values.email}\n                        onChange={handleChange}\n                    />\n\n                    <TextInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Password\"\n                        name=\"password\"\n                        type=\"password\"\n                        errors={errors.password}\n                        value={values.password}\n                        onChange={handleChange}\n                    />\n\n                    <SelectInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Owner\"\n                        name=\"owner\"\n                        errors={errors.owner}\n                        value={values.owner}\n                        onChange={handleChange}\n                    >\n                        <option value=\"1\">Yes</option>\n                        <option value=\"0\">No</option>\n                    </SelectInput>\n\n                    <FileInput\n                        className=\"pr-6 pb-8 w-full lg:w-1/2\"\n                        label=\"Photo\"\n                        name=\"photo\"\n                        accept=\"image/*\"\n                        errors={errors.photo}\n                        value={values.photo}\n                        onChange={handleFileChange}\n                    />\n                </div>\n\n                <div class=\"px-8 py-4 bg-gray-100 border-t border-gray-200 flex items-center\">\n                    {#if !user.deleted_at}\n                        <DeleteButton onDelete={destroy}>Delete User</DeleteButton>\n                    {/if}\n\n                    <LoadingButton\n                        loading={sending}\n                        type=\"submit\"\n                        className=\"btn-indigo ml-auto\"\n                    >\n                        Update User\n                    </LoadingButton>\n                </div>\n            </form>\n        </div>\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Pages/Users/Index.svelte",
    "content": "<script>\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Helmet from '@/Shared/Helmet.svelte';\n    import Layout from '@/Shared/Layout.svelte';\n    import Icon from '@/Shared/Icon.svelte';\n    import SearchFilter from '@/Shared/SearchFilter.svelte';\n    import Pagination from '@/Shared/Pagination.svelte';\n\n    const route = window.route;\n\n    $: data = $page.users.data;\n    $: links = $page.users.links;\n</script>\n\n<Helmet title=\"Users\" />\n\n<Layout>\n    <div>\n        <h1 class=\"mb-8 font-bold text-3xl\">Users</h1>\n\n        <div class=\"mb-6 flex justify-between items-center\">\n            <SearchFilter />\n\n            <InertiaLink class=\"btn-indigo\" href={route('users.create')}>\n                <span>Create</span>\n                <span class=\"hidden md:inline\"> User</span>\n            </InertiaLink>\n        </div>\n\n        <div class=\"bg-white rounded shadow overflow-x-auto\">\n            <table class=\"w-full whitespace-no-wrap\">\n                <thead>\n                    <tr class=\"text-left font-bold\">\n                        <th class=\"px-6 pt-5 pb-4\">Name</th>\n                        <th class=\"px-6 pt-5 pb-4\">Email</th>\n                        <th class=\"px-6 pt-5 pb-4\" colspan=\"2\">Role</th>\n                    </tr>\n                </thead>\n                <tbody>\n                    {#if !data || data.length === 0}\n                        <tr>\n                            <td class=\"border-t px-6 py-4\" colspan=\"4\">\n                                No users found.\n                            </td>\n                        </tr>\n                    {:else}\n                        {#each data as { id, name, photo, email, owner, deleted_at } (id)}\n                            <tr class=\"hover:bg-gray-100 focus-within:bg-gray-100\">\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        href={route('users.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo-700\"\n                                    >\n                                    {#if photo}\n                                        <img\n                                            src={photo}\n                                            class=\"block w-5 h-5 rounded-full mr-2 -my-2\"\n                                            alt={name}\n                                        />\n                                    {/if}\n                                    {name}\n                                    {#if deleted_at}\n                                        <Icon\n                                            name=\"trash\"\n                                            className=\"flex-shrink-0 w-3 h-3 text-gray-400 fill-current ml-2\"\n                                        />\n                                    {/if}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('users.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {email}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('users.edit', id)}\n                                        class=\"px-6 py-4 flex items-center focus:text-indigo\"\n                                    >\n                                        {owner ? 'Owner' : 'User'}\n                                    </InertiaLink>\n                                </td>\n\n                                <td class=\"border-t w-px\">\n                                    <InertiaLink\n                                        tabindex=\"-1\"\n                                        href={route('users.edit', id)}\n                                        class=\"px-4 flex items-center\"\n                                    >\n                                        <Icon\n                                            name=\"cheveron-right\"\n                                            className=\"block w-6 h-6 text-gray-400 fill-current\"\n                                        />\n                                    </InertiaLink>\n                                </td>\n                            </tr>\n                        {/each}\n                    {/if}\n                </tbody>\n            </table>\n        </div>\n\n        <Pagination links={links} />\n    </div>\n</Layout>\n"
  },
  {
    "path": "resources/js/Shared/BottomHeader.svelte",
    "content": "<script>\n    import { InertiaLink, page } from '@inertiajs/inertia-svelte';\n    import Icon from '@/Shared/Icon.svelte';\n\n    const route = window.route;\n\n    let { auth } = $page;\n    $: auth = $page.auth;\n\n    let menuOpened = false;\n</script>\n\n<div class=\"bg-white border-b w-full p-4 md:py-0 md:px-12 text-sm d:text-md flex justify-between items-center\">\n    <div class=\"mt-1 mr-4\">{auth.user.account.name}</div>\n    <div class=\"relative\">\n        <div\n            class=\"flex items-center cursor-pointer select-none group\"\n            on:click={() => menuOpened = true}\n        >\n            <div class=\"text-gray-800 group-hover:text-indigo-600 focus:text-indigo-600 mr-1 whitespace-no-wrap\">\n                <span>{auth.user.first_name}</span>\n                <span class=\"ml-1 hidden md:inline\">{auth.user.last_name}</span>\n            </div>\n\n            <Icon\n                className=\"w-5 h-5 fill-current text-gray-800 group-hover:text-indigo-600 focus:text-indigo-600\"\n                name=\"cheveron-down\"\n            />\n        </div>\n\n        <div class:hidden={!menuOpened}>\n            <div\n                class=\"whitespace-no-wrap absolute z-20 mt-8 left-auto top-0 right-0 py-2 shadow-xl bg-white rounded text-sm\">\n                <InertiaLink\n                    href={route('users.edit', auth.user.id)}\n                    class=\"block px-6 py-2 hover:bg-indigo-600 hover:text-white\"\n                >\n                    My Profile\n                </InertiaLink>\n\n                <InertiaLink\n                    href={route('users')}\n                    class=\"block px-6 py-2 hover:bg-indigo-600 hover:text-white\"\n                >\n                    Manage Users\n                </InertiaLink>\n\n                <InertiaLink\n                    href={route('logout')}\n                    class=\"block px-6 py-2 hover:bg-indigo-600 hover:text-white\"\n                    method=\"post\"\n                >\n                    Logout\n                </InertiaLink>\n            </div>\n\n            <div\n                on:click={() => menuOpened = false}\n                class=\"bg-black opacity-25 fixed inset-0 z-10\"\n            />\n        </div>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/DeleteButton.svelte",
    "content": "<script>\n    export let onDelete;\n</script>\n\n<button\n    class=\"text-red-600 focus:outline-none hover:underline\"\n    tabindex=\"-1\"\n    type=\"button\"\n    on:click={onDelete}\n>\n    <slot />\n</button>\n"
  },
  {
    "path": "resources/js/Shared/FileInput.svelte",
    "content": "<script>\n    import { filesize } from '@/utils';\n\n    export let className = '';\n    export let name;\n    export let label;\n    export let accept;\n    export let errors = [];\n    export let onChange;\n    export let value;\n\n    // unused value for now\n    console.log(value);\n\n    let fileInput;\n    let file = null;\n\n    function browse() {\n        fileInput.click();\n    }\n\n    function remove() {\n        file = null;\n        onChange(null);\n        fileInput.value = null;\n    }\n\n    function handleFileChange(e) {\n        file = e.target.files[0];\n        onChange(file);\n    }\n</script>\n\n<div class={className}>\n    {#if label}\n        <label class=\"form-label\" for={name}>{label}:</label>\n    {/if}\n\n    <div class=\"form-input p-0\" class:error={errors && errors.length}>\n        <input\n        id={name}\n        bind:this={fileInput}\n        accept={accept}\n        type=\"file\"\n        class=\"hidden\"\n        on:change={handleFileChange}\n        />\n\n        {#if file}\n            <div class=\"flex items-center justify-between p-2\">\n                <div class=\"flex-1 pr-1\">\n                    {file.name}\n                    <span class=\"text-gray-600 text-xs ml-1\">\n                        ({filesize(file.size)})\n                    </span>\n                </div>\n\n                <button\n                    type=\"button\"\n                    class=\"focus:outline-none px-4 py-1 bg-gray-600 hover:bg-gray-700 rounded-sm text-xs font-medium text-white\"\n                    on:click={remove}\n                >\n                    Remove\n                </button>\n            </div>\n        {:else}\n            <div class=\"p-2\">\n                <button\n                    type=\"button\"\n                    class=\"focus:outline-none px-4 py-1 bg-gray-600 hover:bg-gray-700 rounded-sm text-xs font-medium text-white\"\n                    on:click={browse}\n                >\n                    Browse\n                </button>\n            </div>\n        {/if}\n    </div>\n\n    {#if errors && errors.length > 0}\n        <div class=\"form-error\">{errors[0]}</div>\n    {/if}\n</div>\n"
  },
  {
    "path": "resources/js/Shared/FlashMessages.svelte",
    "content": "<script>\n    import {page} from '@inertiajs/inertia-svelte';\n\n    let { flash, errors } = $page;\n    $: flash = $page.flash;\n    $: errors = $page.errors;\n\n    let numOfErrors = Object.keys(errors).length;\n\n    let visible = true;\n    $: (flash || errors) && (visible = true);\n</script>\n\n<div>\n    {#if flash.success && visible}\n        <div class=\"mb-8 flex items-center justify-between bg-green-500 rounded max-w-3xl\">\n            <div class=\"flex items-center\">\n                <svg\n                    class=\"ml-4 mr-2 flex-shrink-0 w-4 h-4 text-white fill-current\"\n                    xmlns=\"http://www.w3.org/2000/svg\"\n                    viewBox=\"0 0 20 20\"\n                >\n                    <polygon points=\"0 11 2 9 7 14 18 3 20 5 7 18\"/>\n                </svg>\n\n                <div class=\"py-4 text-white text-sm font-medium\">\n                    {flash.success}\n                </div>\n            </div>\n\n            <button\n                on:click={() => visible = false}\n                type=\"button\"\n                class=\"focus:outline-none group mr-2 p-2\"\n            >\n                <svg\n                    class=\"block  w-2 h-2 fill-current text-green-700 group-hover:text-green-800\"\n                    xmlns=\"http://www.w3.org/2000/svg\"\n                    width=\"235.908\"\n                    height=\"235.908\"\n                    viewBox=\"278.046 126.846 235.908 235.908\"\n                >\n                    <path\n                        d=\"M506.784 134.017c-9.56-9.56-25.06-9.56-34.62 0L396 210.18l-76.164-76.164c-9.56-9.56-25.06-9.56-34.62 0-9.56 9.56-9.56 25.06 0 34.62L361.38 244.8l-76.164 76.165c-9.56 9.56-9.56 25.06 0 34.62 9.56 9.56 25.06 9.56 34.62 0L396 279.42l76.164 76.165c9.56 9.56 25.06 9.56 34.62 0 9.56-9.56 9.56-25.06 0-34.62L430.62 244.8l76.164-76.163c9.56-9.56 9.56-25.06 0-34.62z\"/>\n                </svg>\n            </button>\n        </div>\n    {/if}\n\n    {#if (flash.error || numOfErrors > 0) && visible}\n        <div class=\"mb-8 flex items-center justify-between bg-red-500 rounded max-w-3xl\">\n            <div class=\"flex items-center\">\n                <svg\n                    class=\"ml-4 mr-2 flex-shrink-0 w-4 h-4 text-white fill-current\"\n                    xmlns=\"http://www.w3.org/2000/svg\"\n                    viewBox=\"0 0 20 20\"\n                >\n                    <path\n                        d=\"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm1.41-1.41A8 8 0 1 0 15.66 4.34 8 8 0 0 0 4.34 15.66zm9.9-8.49L11.41 10l2.83 2.83-1.41 1.41L10 11.41l-2.83 2.83-1.41-1.41L8.59 10 5.76 7.17l1.41-1.41L10 8.59l2.83-2.83 1.41 1.41z\"/>\n                </svg>\n\n                <div class=\"py-4 text-white text-sm font-medium\">\n                    {flash.error && flash.error}\n                    {numOfErrors === 1 && 'There is one form error'}\n                    {numOfErrors > 1 && `There are ${numOfErrors} form errors.`}\n                </div>\n            </div>\n\n            <button\n                on:click={() => visible = false}\n                type=\"button\"\n                class=\"focus:outline-none group mr-2 p-2\"\n            >\n                <svg\n                    class=\"block  w-2 h-2 fill-current text-red-700 group-hover:text-red-800\"\n                    xmlns=\"http://www.w3.org/2000/svg\"\n                    width=\"235.908\"\n                    height=\"235.908\"\n                    viewBox=\"278.046 126.846 235.908 235.908\"\n                >\n                    <path\n                        d=\"M506.784 134.017c-9.56-9.56-25.06-9.56-34.62 0L396 210.18l-76.164-76.164c-9.56-9.56-25.06-9.56-34.62 0-9.56 9.56-9.56 25.06 0 34.62L361.38 244.8l-76.164 76.165c-9.56 9.56-9.56 25.06 0 34.62 9.56 9.56 25.06 9.56 34.62 0L396 279.42l76.164 76.165c9.56 9.56 25.06 9.56 34.62 0 9.56-9.56 9.56-25.06 0-34.62L430.62 244.8l76.164-76.163c9.56-9.56 9.56-25.06 0-34.62z\"/>\n                </svg>\n            </button>\n        </div>\n    {/if}\n</div>\n"
  },
  {
    "path": "resources/js/Shared/Helmet.svelte",
    "content": "<script>\n    export let title;\n</script>\n\n<svelte:head>\n    <title>{title ? `${title} | Ping CRM` : 'Ping CRM'}</title>\n</svelte:head>\n"
  },
  {
    "path": "resources/js/Shared/Icon.svelte",
    "content": "<script>\n    export let name;\n    export let className = '';\n</script>\n\n{#if name === 'apple'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"100\"\n        height=\"100\"\n        viewBox=\"0 0 100 100\"\n    >\n        <g fill-rule=\"nonzero\">\n            <path\n                d=\"M46.173 19.967C49.927-1.838 19.797-.233 14.538.21c-.429.035-.648.4-.483.8 2.004 4.825 14.168 31.66 32.118 18.957zm13.18 1.636c1.269-.891 1.35-1.614.047-2.453l-2.657-1.71c-.94-.607-1.685-.606-2.532.129-5.094 4.42-7.336 9.18-8.211 15.24 1.597.682 3.55.79 5.265.328 1.298-4.283 3.64-8.412 8.088-11.534z\"/>\n            <path\n                d=\"M88.588 67.75c9.65-27.532-13.697-45.537-35.453-32.322-1.84 1.118-4.601 1.118-6.441 0-21.757-13.215-45.105 4.79-35.454 32.321 5.302 15.123 17.06 39.95 37.295 29.995.772-.38 1.986-.38 2.758 0 20.235 9.955 31.991-14.872 37.295-29.995z\"/>\n        </g>\n    </svg>\n{:else if name === 'book'}\n\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path\n            d=\"M6 4H5a1 1 0 1 1 0-2h11V1a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V5a1 1 0 0 0-1-1h-7v8l-2-2-2 2V4z\"/>\n    </svg>\n\n{:else if name === 'cheveron-down'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path d=\"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z\"/>\n    </svg>\n{:else if name === 'cheveron-right'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <polygon points=\"12.95 10.707 13.657 10 8 4.343 6.586 5.757 10.828 10 6.586 14.243 8 15.657 12.95 10.707\"/>\n    </svg>\n\n{:else if name === 'dashboard'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path\n            d=\"M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm-5.6-4.29a9.95 9.95 0 0 1 11.2 0 8 8 0 1 0-11.2 0zm6.12-7.64l3.02-3.02 1.41 1.41-3.02 3.02a2 2 0 1 1-1.41-1.41z\"/>\n    </svg>\n\n{:else if name === 'location'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path d=\"M10 20S3 10.87 3 7a7 7 0 1 1 14 0c0 3.87-7 13-7 13zm0-11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\"/>\n    </svg>\n\n{:else if name === 'office'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"100\"\n        height=\"100\"\n        viewBox=\"0 0 100 100\"\n    >\n        <path\n            fill-rule=\"evenodd\"\n            d=\"M7 0h86v100H57.108V88.418H42.892V100H7V0zm9 64h11v15H16V64zm57 0h11v15H73V64zm-19 0h11v15H54V64zm-19 0h11v15H35V64zM16 37h11v15H16V37zm57 0h11v15H73V37zm-19 0h11v15H54V37zm-19 0h11v15H35V37zM16 11h11v15H16V11zm57 0h11v15H73V11zm-19 0h11v15H54V11zm-19 0h11v15H35V11z\"\n        />\n    </svg>\n\n{:else if name === 'printer'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path d=\"M4 16H0V6h20v10h-4v4H4v-4zm2-4v6h8v-6H6zM4 0h12v5H4V0zM2 8v2h2V8H2zm4 0v2h2V8H6z\"/>\n    </svg>\n{:else if name === 'shopping-cart'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path\n            d=\"M4 2h16l-3 9H4a1 1 0 1 0 0 2h13v2H4a3 3 0 0 1 0-6h.33L3 5 2 2H0V0h3a1 1 0 0 1 1 1v1zm1 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm10 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z\"/>\n    </svg>\n{:else if name === 'store-front'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path\n            d=\"M18 9.87V20H2V9.87a4.25 4.25 0 0 0 3-.38V14h10V9.5a4.26 4.26 0 0 0 3 .37zM3 0h4l-.67 6.03A3.43 3.43 0 0 1 3 9C1.34 9 .42 7.73.95 6.15L3 0zm5 0h4l.7 6.3c.17 1.5-.91 2.7-2.42 2.7h-.56A2.38 2.38 0 0 1 7.3 6.3L8 0zm5 0h4l2.05 6.15C19.58 7.73 18.65 9 17 9a3.42 3.42 0 0 1-3.33-2.97L13 0z\"/>\n    </svg>\n{:else if name === 'trash'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path d=\"M6 2l2-2h4l2 2h4v2H2V2h4zM3 6h14l-1 14H4L3 6zm5 2v10h1V8H8zm3 0v10h1V8h-1z\"/>\n    </svg>\n{:else if name === 'users'}\n    <svg\n        class={className}\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 20 20\"\n    >\n        <path\n            d=\"M7 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0 1c2.15 0 4.2.4 6.1 1.09L12 16h-1.25L10 20H4l-.75-4H2L.9 10.09A17.93 17.93 0 0 1 7 9zm8.31.17c1.32.18 2.59.48 3.8.92L18 16h-1.25L16 20h-3.96l.37-2h1.25l1.65-8.83zM13 0a4 4 0 1 1-1.33 7.76 5.96 5.96 0 0 0 0-7.52C12.1.1 12.53 0 13 0z\"/>\n    </svg>\n{/if}\n"
  },
  {
    "path": "resources/js/Shared/Layout.svelte",
    "content": "<script>\n    import MainMenu from '@/Shared/MainMenu.svelte';\n    import FlashMessages from '@/Shared/FlashMessages.svelte';\n    import TopHeader from '@/Shared/TopHeader.svelte';\n    import BottomHeader from '@/Shared/BottomHeader.svelte';\n</script>\n\n<div class=\"flex flex-col\">\n    <div class=\"h-screen flex flex-col\">\n        <div class=\"md:flex\">\n            <TopHeader />\n            <BottomHeader />\n        </div>\n\n        <div class=\"flex flex-grow overflow-hidden\">\n            <MainMenu className=\"bg-indigo-800 flex-shrink-0 w-56 p-12 hidden md:block overflow-y-auto\" />\n\n            <!-- To reset scroll region (https://inertiajs.com/pages#scroll-regions) add `scroll-region=\"true\"` to div below -->\n            <div class=\"w-full overflow-hidden px-4 py-8 md:p-12 overflow-y-auto\">\n                <FlashMessages />\n                <slot />\n            </div>\n        </div>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/LoadingButton.svelte",
    "content": "<script>\n    export let loading;\n    export let className = '';\n\n    $: props = (({loading, className, ...rest}) => rest)($$props);\n</script>\n\n<button\n    disabled={loading}\n    class=\"focus:outline-none flex items-center {className}\"\n    {...props}\n>\n    {#if loading}\n        <div class=\"btn-spinner mr-2\"/>\n    {/if}\n    <slot/>\n</button>\n"
  },
  {
    "path": "resources/js/Shared/Logo.svelte",
    "content": "<svg {...$$props} viewBox=\"0 0 1131 266\" xmlns=\"http://www.w3.org/2000/svg\">\n    <g fill=\"currentColor\" fill-rule=\"nonzero\">\n        <path\n            d=\"M341.752 2.4c37.152 0 65.088 27.936 65.088 64.8 0 36.576-27.936 64.8-65.088 64.8h-46.368v72H268.6V2.4h73.152zm0 104.544c22.176 0 38.592-16.992 38.592-39.744 0-23.04-16.416-39.744-38.592-39.744h-46.368v79.488h46.368zM448.6 33.792c-9.504 0-16.992-7.488-16.992-16.704 0-9.216 7.488-16.992 16.992-16.992 9.216 0 16.704 7.776 16.704 16.992 0 9.216-7.488 16.704-16.704 16.704zM435.928 204V60h25.056v144h-25.056zM571 56.256c33.696 0 55.872 22.464 55.872 59.328V204h-25.056v-86.976c0-23.616-13.536-36.864-35.712-36.864-23.04 0-41.76 13.536-41.76 47.52V204h-25.056V60h25.056v20.736C535 63.744 550.84 56.256 571 56.256zM781.24 60h24.768v137.952c0 44.928-36 67.392-73.44 67.392-32.256 0-56.448-12.384-68.256-35.136l21.888-12.384c6.624 13.536 18.72 24.192 46.944 24.192 29.952 0 48.096-16.992 48.096-44.064v-20.448c-11.52 17.568-29.952 28.8-54.144 28.8-40.896 0-73.44-33.12-73.44-75.168 0-41.76 32.544-74.88 73.44-74.88 24.192 0 42.624 10.944 54.144 28.512V60zm-51.264 122.4c29.088 0 51.264-22.176 51.264-51.264 0-28.8-22.176-50.976-51.264-50.976-29.088 0-51.264 22.176-51.264 50.976 0 29.088 22.176 51.264 51.264 51.264zM892.8 205.08c-28.21 0-45.63-20.8-41.08-48.88 4.42-27.17 26.91-46.28 53.56-46.28 19.37 0 31.59 9.36 38.35 22.36l-23.79 12.61c-3.25-5.85-9.1-9.49-16.9-9.49-12.35 0-23.14 9.23-25.35 22.1-2.08 11.83 4.29 22.1 17.16 22.1 8.06 0 13.91-4.03 18.59-10.14l21.58 13.65c-9.36 13.78-24.44 21.97-42.12 21.97zm126.36-59.93c-1.95 11.18-8.58 19.5-18.2 24.44l11.7 33.28h-26l-9.36-28.6h-8.32l-5.07 28.6h-26l16.12-91h36.4c18.33 0 32.24 13.65 28.73 33.28zm-43.42-9.36l-2.99 16.9h10.66c5.07.13 8.84-2.99 9.75-8.32.91-5.33-1.82-8.58-7.02-8.58h-10.4zM1130.05 112l-15.99 91h-26l7.67-43.81-25.48 33.54h-2.34l-14.82-35.23-7.93 45.5h-26l15.99-91h26l13.65 37.31 27.95-37.31h27.3z\"></path>\n        <g transform=\"scale(1.6)\">\n            <path id=\"back\" fill=\"currentColor\"\n                  d=\"M110.23,28.39C99.83,13.51,79.29,9.1,64.44,18.56L38.36,35.18a29.9,29.9,0,0,0-13.52,20,31.53,31.53,0,0,0,3.1,20.24,29.94,29.94,0,0,0-4.47,11.18,31.86,31.86,0,0,0,5.45,24.12c10.4,14.88,30.94,19.29,45.79,9.83L100.79,104a30,30,0,0,0,13.52-20,31.52,31.52,0,0,0-3.11-20.23,30.13,30.13,0,0,0,4.48-11.18,31.9,31.9,0,0,0-5.45-24.12\"></path>\n            <path id=\"front\" fill=\"#3c366b\"\n                  d=\"M61.89,112.16a20.73,20.73,0,0,1-22.24-8.25,19.14,19.14,0,0,1-3.27-14.5A17,17,0,0,1,37,87l.49-1.5,1.34,1A33.78,33.78,0,0,0,49,91.56l1,.29-.09,1A5.9,5.9,0,0,0,51,96.7a6.25,6.25,0,0,0,6.7,2.48,5.85,5.85,0,0,0,1.6-.7L85.34,81.86a5.42,5.42,0,0,0,2.45-3.64,5.77,5.77,0,0,0-1-4.37,6.25,6.25,0,0,0-6.7-2.48,5.72,5.72,0,0,0-1.6.7l-10,6.35a19.1,19.1,0,0,1-5.29,2.32A20.72,20.72,0,0,1,41,72.5,19.16,19.16,0,0,1,37.75,58a18,18,0,0,1,8.13-12.06L72,29.32A19.05,19.05,0,0,1,77.26,27a20.71,20.71,0,0,1,22.23,8.25,19.14,19.14,0,0,1,3.28,14.5,20.15,20.15,0,0,1-.62,2.43l-.5,1.5-1.33-1a33.78,33.78,0,0,0-10.2-5.1l-1-.29.09-1a5.86,5.86,0,0,0-1.06-3.88A6.23,6.23,0,0,0,81.49,40a5.72,5.72,0,0,0-1.6.7L53.8,57.29a5.45,5.45,0,0,0-2.45,3.63,5.84,5.84,0,0,0,1,4.38A6.25,6.25,0,0,0,59,67.78a6,6,0,0,0,1.6-.7l10-6.34a18.61,18.61,0,0,1,5.3-2.33,20.7,20.7,0,0,1,22.23,8.24,19.16,19.16,0,0,1,3.28,14.5,18,18,0,0,1-8.13,12.06L67.19,109.83a19.18,19.18,0,0,1-5.3,2.33\"></path>\n        </g>\n    </g>\n</svg>\n"
  },
  {
    "path": "resources/js/Shared/MainMenu.svelte",
    "content": "<script>\n    export let className = '';\n\n    import MainMenuItem from '@/Shared/MainMenuItem.svelte';\n</script>\n\n<div class={className}>\n    <MainMenuItem text=\"Dashboard\" link=\"dashboard\" icon=\"dashboard\"/>\n    <MainMenuItem text=\"Organizations\" link=\"organizations\" icon=\"office\"/>\n    <MainMenuItem text=\"Contacts\" link=\"contacts\" icon=\"users\"/>\n    <MainMenuItem text=\"Reports\" link=\"reports\" icon=\"printer\"/>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/MainMenuItem.svelte",
    "content": "<script>\n    import {InertiaLink} from '@inertiajs/inertia-svelte';\n    import Icon from '@/Shared/Icon.svelte';\n\n    export let icon;\n    export let link;\n    export let text;\n\n    const route = window.route;\n    let isActive = route().current(link + '*');\n</script>\n\n<div class=\"mb-4\">\n    <InertiaLink href={route(link)} class=\"flex items-center group py-3\">\n        <Icon name={icon} className=\"w-4 h-4 mr-2 {isActive ? 'text-white fill-current' : 'text-indigo-400 group-hover:text-white fill-current'}\" />\n        <div class={isActive ? 'text-white' : 'text-indigo-200 group-hover:text-white'}>{text}</div>\n    </InertiaLink>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/Pagination.svelte",
    "content": "<script>\n    import { InertiaLink } from '@inertiajs/inertia-svelte';\n    import classNames from 'classnames';\n\n    export let links = [];\n</script>\n\n<!-- dont render, if there's only 1 page (previous, 1, next) -->\n{#if links && links.length !== 3}\n    <div class=\"mt-6 -mb-1 flex flex-wrap\">\n        {#each links as { active, label, url } (label)}\n            {#if url === null}\n                <!-- Previous, if on first page -->\n                <!-- Next, if on last page -->\n                <!-- and dots, if exists (...) -->\n                <div class=\"mr-1 mb-1 px-4 py-3 text-sm border rounded text-gray {label === 'Next' && 'ml-auto'}\">{label}</div>\n            {:else}\n                <InertiaLink class=\"mr-1 mb-1 px-4 py-3 border rounded text-sm hover:bg-white focus:border-indigo-700 focus:text-indigo-700 {active && 'bg-white', label === 'Next' && 'ml-auto'}\" href={url}>\n                    {label}\n                </InertiaLink>\n            {/if}\n        {/each}\n    </div>\n{/if}\n"
  },
  {
    "path": "resources/js/Shared/SearchFilter.svelte",
    "content": "<script>\n    import { onMount } from 'svelte';\n    import { Inertia } from '@inertiajs/inertia';\n    import { page } from '@inertiajs/inertia-svelte';\n    import SelectInput from '@/Shared/SelectInput.svelte';\n    import pickBy from 'lodash/pickBy';\n\n    let { filters } = $page;\n    $: filters = $page.filters;\n\n    const route = window.route;\n\n    let opened = false;\n    let values = {\n        role: filters.role || '', // role is used only on users page\n        search: filters.search || '',\n        trashed: filters.trashed || ''\n    };\n\n    let prevValues;\n\n    onMount(() => {\n        prevValues = values;\n    });\n\n    function reset() {\n        values = {\n            role: '',\n            search: '',\n            trashed: ''\n        };\n    }\n\n    $: {\n        if (prevValues) {\n            const query = Object.keys(pickBy(values)).length\n                ? pickBy(values)\n                : { remember: 'forget' };\n            Inertia.replace(route(route().current(), query));\n        }\n    }\n\n    function handleChange(e) {\n        const key = e.target.name;\n        const value = e.target.value;\n\n        values = {\n            ...values,\n            [key]: value\n        };\n\n        if (opened) {\n            opened = false;\n        }\n    }\n</script>\n\n<div class=\"flex items-center w-full max-w-md mr-4\">\n    <div class=\"relative flex w-full bg-white shadow rounded\">\n        <div\n            style=\"top: 100%\"\n            class=\"absolute\" class:hidden={!opened}\n        >\n            <div\n                on:click={() => opened = false}\n                class=\"bg-black opacity-25 fixed inset-0 z-20\"\n            />\n\n            <div class=\"relative w-64 mt-2 px-4 py-6 shadow-lg bg-white rounded z-30\">\n                {#if filters.hasOwnProperty('role')}\n                    <SelectInput\n                        className=\"mb-4\"\n                        label=\"Role\"\n                        name=\"role\"\n                        value={values.role}\n                        onChange={handleChange}\n                    >\n                        <option value=\"\"></option>\n                        <option value=\"user\">User</option>\n                        <option value=\"owner\">Owner</option>\n                    </SelectInput>\n                {/if}\n\n                <SelectInput\n                    label=\"Trashed\"\n                    name=\"trashed\"\n                    value={values.trashed}\n                    onChange={handleChange}\n                >\n                    <option value=\"\"></option>\n                    <option value=\"with\">With Trashed</option>\n                    <option value=\"only\">Only Trashed</option>\n                </SelectInput>\n            </div>\n        </div>\n\n        <button\n            on:click={() => opened = true}\n            class=\"px-4 md:px-6 rounded-l border-r hover:bg-gray-100 focus:outline-none focus:border-white focus:shadow-outline focus:z-10\"\n        >\n            <div class=\"flex items-baseline\">\n                <span class=\"text-gray-700 hidden md:inline\">Filter</span>\n\n                <svg\n                    class=\"w-2 h-2 fill-current text-gray-700 md:ml-2\"\n                    xmlns=\"http://www.w3.org/2000/svg\"\n                    viewBox=\"0 0 961.243 599.998\"\n                >\n                    <path d=\"M239.998 239.999L0 0h961.243L721.246 240c-131.999 132-240.28 240-240.624 239.999-.345-.001-108.625-108.001-240.624-240z\" />\n                </svg>\n            </div>\n        </button>\n\n        <input\n            class=\"relative w-full px-6 py-3 rounded-r focus:shadow-outline\"\n            autocomplete=\"off\"\n            type=\"text\"\n            name=\"search\"\n            value={values.search}\n            on:change={handleChange}\n            placeholder=\"Search…\"\n        />\n    </div>\n\n    <button\n        on:click={reset}\n        class=\"ml-3 text-sm text-gray-600 hover:text-gray-700 focus:text-indigo-700 focus:outline-none\"\n        type=\"button\"\n    >\n        Reset\n    </button>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/SelectInput.svelte",
    "content": "<script>\n    export let label;\n    export let name;\n    export let className = '';\n    export let onChange;\n    export let value;\n    export let errors = [];\n\n    $: props = (({ label, name, className, errors, onChange, value, ...rest }) => rest)($$props);\n</script>\n\n\n<div class={className}>\n    {#if label}\n        <label class=\"form-label\" for={name}>{label}:</label>\n    {/if}\n\n    <select\n        id={name}\n        name={name}\n        {...props}\n        class=\"form-select\"\n        class:error={errors && errors.length}\n        on:change={onChange}\n        bind:value\n    >\n        <slot/>\n    </select>\n\n    {#if errors && errors.length}\n        <div class=\"form-error\">{errors[0]}</div>\n    {/if}\n</div>\n"
  },
  {
    "path": "resources/js/Shared/TextInput.svelte",
    "content": "<script>\n    export let onChange;\n    export let label;\n    export let name;\n    export let className = '';\n    export let errors = [];\n\n    $: props = (({ onChange, label, name, className, errors, ...rest }) => rest)($$props);\n</script>\n\n<div class={className}>\n    {#if label}\n        <label class=\"form-label\" for={name}>{label}:</label>\n    {/if}\n\n    <input\n        id={name}\n        name={name}\n        {...props}\n        on:change={onChange}\n        class=\"form-input\"\n        class:error={errors && errors.length}\n    />\n\n    {#if errors && errors.length}\n        <div class=\"form-error\">{errors[0]}</div>\n    {/if}\n</div>\n"
  },
  {
    "path": "resources/js/Shared/TopHeader.svelte",
    "content": "<script>\n    import {InertiaLink} from '@inertiajs/inertia-svelte';\n    import Logo from '@/Shared/Logo.svelte';\n    import MainMenu from '@/Shared/MainMenu.svelte';\n\n    let menuOpened = false;\n</script>\n\n<div class=\"bg-indigo-900 md:flex-shrink-0 md:w-56 px-6 py-4 flex items-center justify-between md:justify-center\">\n    <InertiaLink class=\"mt-1\" href=\"/\">\n        <Logo class=\"text-white fill-current\" width=\"120\" height=\"28\"/>\n    </InertiaLink>\n\n    <div class=\"relative md:hidden\">\n        <svg\n            on:click={() => menuOpened = true}\n            class=\"fill-current text-white w-6 h-6 cursor-pointer\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            viewBox=\"0 0 20 20\"\n        >\n            <path d=\"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z\"/>\n        </svg>\n\n        <div class:hidden={!menuOpened} class=\"absolute right-0 z-20\">\n            <MainMenu className=\"relative z-20 mt-2 px-8 py-4 pb-2 shadow-lg bg-indigo-800 rounded\"/>\n\n            <div\n                on:click={() => menuOpened = false}\n                class=\"bg-black opacity-25 fixed inset-0 z-10\"\n            />\n        </div>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/js/Shared/TrashedMessage.svelte",
    "content": "<script>\n    import Icon from '@/Shared/Icon.svelte';\n\n    export let onRestore;\n</script>\n\n<div class=\"max-w-3xl mb-6 p-4 bg-yellow-400 rounded border border-yellow-500 flex items-center justify-between\">\n    <div class=\"flex items-center\">\n        <Icon\n            name=\"trash\"\n            className=\"flex-shrink-0 w-4 h-4 fill-yellow-800 mr-2\"\n        />\n\n        <div class=\"text-yellow-800\">\n            <slot/>\n        </div>\n    </div>\n\n    <button\n        class=\"text-yellow-800 focus:outline-none text-sm hover:underline\"\n        tabindex=\"-1\"\n        type=\"button\"\n        on:click={onRestore}\n    >\n        Restore\n    </button>\n</div>\n"
  },
  {
    "path": "resources/js/app.js",
    "content": "import { InertiaApp } from '@inertiajs/inertia-svelte';\nimport * as Sentry from '@sentry/browser';\n\nSentry.init({\n  dsn: process.env.MIX_SENTRY_LARAVEL_DSN\n});\n\nconst app = document.getElementById('app');\n\nnew InertiaApp({\n  target: app,\n  props: {\n    initialPage: JSON.parse(app.dataset.page),\n    resolveComponent: name =>\n      import(`./Pages/${name}.svelte`).then(module => module.default)\n  }\n});\n"
  },
  {
    "path": "resources/js/utils.js",
    "content": "export function filesize(size) {\n  const i = Math.floor(Math.log(size) / Math.log(1024));\n  return (\n    (size / Math.pow(1024, i)).toFixed(2) * 1 +\n    ' ' +\n    ['B', 'kB', 'MB', 'GB', 'TB'][i]\n  );\n}\n\n// Transforms key/value pairs to FormData() object\nexport function toFormData(values = {}, method = 'POST') {\n  const formData = new FormData();\n  for (const field of Object.keys(values)) {\n    formData.append(field, values[field]);\n  }\n\n  // NOTE: When working with Laravel PUT/PATCH requests and FormData\n  // you SHOULD send POST request and fake the PUT request like this.\n  // More info: http://stackoverflow.com/q/50691938\n  if (method.toUpperCase() === 'PUT') {\n    formData.append('_method', 'PUT');\n  }\n\n  return formData;\n}\n"
  },
  {
    "path": "resources/lang/en/auth.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Authentication Language Lines\n    |--------------------------------------------------------------------------\n    |\n    | The following language lines are used during authentication for various\n    | messages that we need to display to the user. You are free to modify\n    | these language lines according to your application's requirements.\n    |\n    */\n\n    'failed' => 'These credentials do not match our records.',\n    'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',\n\n];\n"
  },
  {
    "path": "resources/lang/en/pagination.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Pagination Language Lines\n    |--------------------------------------------------------------------------\n    |\n    | The following language lines are used by the paginator library to build\n    | the simple pagination links. You are free to change them to anything\n    | you want to customize your views to better match your application.\n    |\n    */\n\n    'previous' => '&laquo; Previous',\n    'next' => 'Next &raquo;',\n\n];\n"
  },
  {
    "path": "resources/lang/en/passwords.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Password Reset Language Lines\n    |--------------------------------------------------------------------------\n    |\n    | The following language lines are the default lines which match reasons\n    | that are given by the password broker for a password update attempt\n    | has failed, such as for an invalid token or invalid new password.\n    |\n    */\n\n    'password' => 'Passwords must be at least eight characters and match the confirmation.',\n    'reset' => 'Your password has been reset!',\n    'sent' => 'We have e-mailed your password reset link!',\n    'token' => 'This password reset token is invalid.',\n    'user' => \"We can't find a user with that e-mail address.\",\n\n];\n"
  },
  {
    "path": "resources/lang/en/validation.php",
    "content": "<?php\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Validation Language Lines\n    |--------------------------------------------------------------------------\n    |\n    | The following language lines contain the default error messages used by\n    | the validator class. Some of these rules have multiple versions such\n    | as the size rules. Feel free to tweak each of these messages here.\n    |\n    */\n\n    'accepted' => 'The :attribute must be accepted.',\n    'active_url' => 'The :attribute is not a valid URL.',\n    'after' => 'The :attribute must be a date after :date.',\n    'after_or_equal' => 'The :attribute must be a date after or equal to :date.',\n    'alpha' => 'The :attribute may only contain letters.',\n    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',\n    'alpha_num' => 'The :attribute may only contain letters and numbers.',\n    'array' => 'The :attribute must be an array.',\n    'before' => 'The :attribute must be a date before :date.',\n    'before_or_equal' => 'The :attribute must be a date before or equal to :date.',\n    'between' => [\n        'numeric' => 'The :attribute must be between :min and :max.',\n        'file' => 'The :attribute must be between :min and :max kilobytes.',\n        'string' => 'The :attribute must be between :min and :max characters.',\n        'array' => 'The :attribute must have between :min and :max items.',\n    ],\n    'boolean' => 'The :attribute field must be true or false.',\n    'confirmed' => 'The :attribute confirmation does not match.',\n    'date' => 'The :attribute is not a valid date.',\n    'date_equals' => 'The :attribute must be a date equal to :date.',\n    'date_format' => 'The :attribute does not match the format :format.',\n    'different' => 'The :attribute and :other must be different.',\n    'digits' => 'The :attribute must be :digits digits.',\n    'digits_between' => 'The :attribute must be between :min and :max digits.',\n    'dimensions' => 'The :attribute has invalid image dimensions.',\n    'distinct' => 'The :attribute field has a duplicate value.',\n    'email' => 'The :attribute must be a valid email address.',\n    'exists' => 'The selected :attribute is invalid.',\n    'file' => 'The :attribute must be a file.',\n    'filled' => 'The :attribute field must have a value.',\n    'gt' => [\n        'numeric' => 'The :attribute must be greater than :value.',\n        'file' => 'The :attribute must be greater than :value kilobytes.',\n        'string' => 'The :attribute must be greater than :value characters.',\n        'array' => 'The :attribute must have more than :value items.',\n    ],\n    'gte' => [\n        'numeric' => 'The :attribute must be greater than or equal :value.',\n        'file' => 'The :attribute must be greater than or equal :value kilobytes.',\n        'string' => 'The :attribute must be greater than or equal :value characters.',\n        'array' => 'The :attribute must have :value items or more.',\n    ],\n    'image' => 'The :attribute must be an image.',\n    'in' => 'The selected :attribute is invalid.',\n    'in_array' => 'The :attribute field does not exist in :other.',\n    'integer' => 'The :attribute must be an integer.',\n    'ip' => 'The :attribute must be a valid IP address.',\n    'ipv4' => 'The :attribute must be a valid IPv4 address.',\n    'ipv6' => 'The :attribute must be a valid IPv6 address.',\n    'json' => 'The :attribute must be a valid JSON string.',\n    'lt' => [\n        'numeric' => 'The :attribute must be less than :value.',\n        'file' => 'The :attribute must be less than :value kilobytes.',\n        'string' => 'The :attribute must be less than :value characters.',\n        'array' => 'The :attribute must have less than :value items.',\n    ],\n    'lte' => [\n        'numeric' => 'The :attribute must be less than or equal :value.',\n        'file' => 'The :attribute must be less than or equal :value kilobytes.',\n        'string' => 'The :attribute must be less than or equal :value characters.',\n        'array' => 'The :attribute must not have more than :value items.',\n    ],\n    'max' => [\n        'numeric' => 'The :attribute may not be greater than :max.',\n        'file' => 'The :attribute may not be greater than :max kilobytes.',\n        'string' => 'The :attribute may not be greater than :max characters.',\n        'array' => 'The :attribute may not have more than :max items.',\n    ],\n    'mimes' => 'The :attribute must be a file of type: :values.',\n    'mimetypes' => 'The :attribute must be a file of type: :values.',\n    'min' => [\n        'numeric' => 'The :attribute must be at least :min.',\n        'file' => 'The :attribute must be at least :min kilobytes.',\n        'string' => 'The :attribute must be at least :min characters.',\n        'array' => 'The :attribute must have at least :min items.',\n    ],\n    'not_in' => 'The selected :attribute is invalid.',\n    'not_regex' => 'The :attribute format is invalid.',\n    'numeric' => 'The :attribute must be a number.',\n    'present' => 'The :attribute field must be present.',\n    'regex' => 'The :attribute format is invalid.',\n    'required' => 'The :attribute field is required.',\n    'required_if' => 'The :attribute field is required when :other is :value.',\n    'required_unless' => 'The :attribute field is required unless :other is in :values.',\n    'required_with' => 'The :attribute field is required when :values is present.',\n    'required_with_all' => 'The :attribute field is required when :values are present.',\n    'required_without' => 'The :attribute field is required when :values is not present.',\n    'required_without_all' => 'The :attribute field is required when none of :values are present.',\n    'same' => 'The :attribute and :other must match.',\n    'size' => [\n        'numeric' => 'The :attribute must be :size.',\n        'file' => 'The :attribute must be :size kilobytes.',\n        'string' => 'The :attribute must be :size characters.',\n        'array' => 'The :attribute must contain :size items.',\n    ],\n    'starts_with' => 'The :attribute must start with one of the following: :values',\n    'string' => 'The :attribute must be a string.',\n    'timezone' => 'The :attribute must be a valid zone.',\n    'unique' => 'The :attribute has already been taken.',\n    'uploaded' => 'The :attribute failed to upload.',\n    'url' => 'The :attribute format is invalid.',\n    'uuid' => 'The :attribute must be a valid UUID.',\n\n    /*\n    |--------------------------------------------------------------------------\n    | Custom Validation Language Lines\n    |--------------------------------------------------------------------------\n    |\n    | Here you may specify custom validation messages for attributes using the\n    | convention \"attribute.rule\" to name the lines. This makes it quick to\n    | specify a specific custom language line for a given attribute rule.\n    |\n    */\n\n    'custom' => [\n        'attribute-name' => [\n            'rule-name' => 'custom-message',\n        ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Custom Validation Attributes\n    |--------------------------------------------------------------------------\n    |\n    | The following language lines are used to swap our attribute placeholder\n    | with something more reader friendly such as \"E-Mail Address\" instead\n    | of \"email\". This simply helps us make our message more expressive.\n    |\n    */\n\n    'attributes' => [],\n\n];\n"
  },
  {
    "path": "resources/views/app.blade.php",
    "content": "<!DOCTYPE html>\n<html class=\"h-full bg-gray-200\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\">\n    <link href=\"{{ mix('/css/app.css') }}\" rel=\"stylesheet\">\n    <script src=\"{{ mix('/js/app.js') }}\" defer></script>\n    @routes\n</head>\n<body class=\"font-sans leading-none text-gray-800 antialiased\">\n\n@inertia\n\n</body>\n</html>\n"
  },
  {
    "path": "routes/api.php",
    "content": "<?php\n\nuse Illuminate\\Http\\Request;\n\n/*\n|--------------------------------------------------------------------------\n| API Routes\n|--------------------------------------------------------------------------\n|\n| Here is where you can register API routes for your application. These\n| routes are loaded by the RouteServiceProvider within a group which\n| is assigned the \"api\" middleware group. Enjoy building your API!\n|\n*/\n\nRoute::middleware('auth:api')->get('/user', function (Request $request) {\n    return $request->user();\n});\n"
  },
  {
    "path": "routes/channels.php",
    "content": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Broadcast Channels\n|--------------------------------------------------------------------------\n|\n| Here you may register all of the event broadcasting channels that your\n| application supports. The given channel authorization callbacks are\n| used to check if an authenticated user can listen to the channel.\n|\n*/\n\nBroadcast::channel('App.User.{id}', function ($user, $id) {\n    return (int) $user->id === (int) $id;\n});\n"
  },
  {
    "path": "routes/console.php",
    "content": "<?php\n\nuse Illuminate\\Foundation\\Inspiring;\n\n/*\n|--------------------------------------------------------------------------\n| Console Routes\n|--------------------------------------------------------------------------\n|\n| This file is where you may define all of your Closure based console\n| commands. Each Closure is bound to a command instance allowing a\n| simple approach to interacting with each command's IO methods.\n|\n*/\n\nArtisan::command('inspire', function () {\n    $this->comment(Inspiring::quote());\n})->describe('Display an inspiring quote');\n"
  },
  {
    "path": "routes/web.php",
    "content": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Web Routes\n|--------------------------------------------------------------------------\n|\n| Here is where you can register web routes for your application. These\n| routes are loaded by the RouteServiceProvider within a group which\n| contains the \"web\" middleware group. Now create something great!\n|\n*/\n\n// Auth\nRoute::get('login')->name('login')->uses('Auth\\LoginController@showLoginForm')->middleware('guest');\nRoute::post('login')->name('login.attempt')->uses('Auth\\LoginController@login')->middleware('guest');\nRoute::post('logout')->name('logout')->uses('Auth\\LoginController@logout');\n\n// Dashboard\nRoute::get('/')->name('dashboard')->uses('DashboardController')->middleware('auth');\n\n// Users\nRoute::get('users')->name('users')->uses('UsersController@index')->middleware('remember', 'auth');\nRoute::get('users/create')->name('users.create')->uses('UsersController@create')->middleware('auth');\nRoute::post('users')->name('users.store')->uses('UsersController@store')->middleware('auth');\nRoute::get('users/{user}/edit')->name('users.edit')->uses('UsersController@edit')->middleware('auth');\nRoute::put('users/{user}')->name('users.update')->uses('UsersController@update')->middleware('auth');\nRoute::delete('users/{user}')->name('users.destroy')->uses('UsersController@destroy')->middleware('auth');\nRoute::put('users/{user}/restore')->name('users.restore')->uses('UsersController@restore')->middleware('auth');\n\n// Images\nRoute::get('/img/{path}', 'ImagesController@show')->where('path', '.*');\n\n// Organizations\nRoute::get('organizations')->name('organizations')->uses('OrganizationsController@index')->middleware('remember', 'auth');\nRoute::get('organizations/create')->name('organizations.create')->uses('OrganizationsController@create')->middleware('auth');\nRoute::post('organizations')->name('organizations.store')->uses('OrganizationsController@store')->middleware('auth');\nRoute::get('organizations/{organization}/edit')->name('organizations.edit')->uses('OrganizationsController@edit')->middleware('auth');\nRoute::put('organizations/{organization}')->name('organizations.update')->uses('OrganizationsController@update')->middleware('auth');\nRoute::delete('organizations/{organization}')->name('organizations.destroy')->uses('OrganizationsController@destroy')->middleware('auth');\nRoute::put('organizations/{organization}/restore')->name('organizations.restore')->uses('OrganizationsController@restore')->middleware('auth');\n\n// Contacts\nRoute::get('contacts')->name('contacts')->uses('ContactsController@index')->middleware('remember', 'auth');\nRoute::get('contacts/create')->name('contacts.create')->uses('ContactsController@create')->middleware('auth');\nRoute::post('contacts')->name('contacts.store')->uses('ContactsController@store')->middleware('auth');\nRoute::get('contacts/{contact}/edit')->name('contacts.edit')->uses('ContactsController@edit')->middleware('auth');\nRoute::put('contacts/{contact}')->name('contacts.update')->uses('ContactsController@update')->middleware('auth');\nRoute::delete('contacts/{contact}')->name('contacts.destroy')->uses('ContactsController@destroy')->middleware('auth');\nRoute::put('contacts/{contact}/restore')->name('contacts.restore')->uses('ContactsController@restore')->middleware('auth');\n\n// Reports\nRoute::get('reports')->name('reports')->uses('ReportsController')->middleware('auth');\n\n// 500 error\nRoute::get('500', function () {\n    echo $fail;\n});\n"
  },
  {
    "path": "server.php",
    "content": "<?php\n\n/**\n * Laravel - A PHP Framework For Web Artisans\n *\n * @package  Laravel\n * @author   Taylor Otwell <taylor@laravel.com>\n */\n\n$uri = urldecode(\n    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)\n);\n\n// This file allows us to emulate Apache's \"mod_rewrite\" functionality from the\n// built-in PHP web server. This provides a convenient way to test a Laravel\n// application without having installed a \"real\" web server software here.\nif ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {\n    return false;\n}\n\nrequire_once __DIR__.'/public/index.php';\n"
  },
  {
    "path": "storage/app/.gitignore",
    "content": "*\n!public/\n!.gitignore\n"
  },
  {
    "path": "storage/debugbar/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "storage/framework/.gitignore",
    "content": "config.php\nroutes.php\nschedule-*\ncompiled.php\nservices.json\nevents.scanned.php\nroutes.scanned.php\ndown\n"
  },
  {
    "path": "storage/framework/cache/.gitignore",
    "content": "*\n!data/\n!.gitignore\n"
  },
  {
    "path": "storage/framework/sessions/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "storage/framework/testing/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "storage/framework/views/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "storage/logs/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "tailwind.config.js",
    "content": "module.exports = {\n  theme: {\n    extend: {\n      boxShadow: theme => ({\n        outline: '0 0 0 2px ' + theme('colors.indigo.500')\n      }),\n    }\n  },\n  variants: {\n    backgroundColor: ['responsive', 'hover', 'focus', 'group-hover', 'focus-within'],\n    textColor: ['responsive', 'hover', 'focus', 'group-hover', 'focus-within'],\n    zIndex: ['responsive', 'focus']\n  },\n  plugins: []\n}\n"
  },
  {
    "path": "tests/CreatesApplication.php",
    "content": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Contracts\\Console\\Kernel;\n\ntrait CreatesApplication\n{\n    /**\n     * Creates the application.\n     *\n     * @return \\Illuminate\\Foundation\\Application\n     */\n    public function createApplication()\n    {\n        $app = require __DIR__.'/../bootstrap/app.php';\n\n        $app->make(Kernel::class)->bootstrap();\n\n        return $app;\n    }\n}\n"
  },
  {
    "path": "tests/Feature/ContactsTest.php",
    "content": "<?php\n\nnamespace Tests\\Feature;\n\nuse App\\User;\nuse App\\Account;\nuse App\\Contact;\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\WithFaker;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\n\nclass ContactsTest extends TestCase\n{\n    use RefreshDatabase;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $account = Account::create(['name' => 'Acme Corporation']);\n\n        $this->user = factory(User::class)->create([\n            'account_id' => $account->id,\n            'first_name' => 'John',\n            'last_name' => 'Doe',\n            'email' => 'johndoe@example.com',\n            'owner' => true,\n        ]);\n    }\n\n    public function test_can_view_contacts()\n    {\n        $this->user->account->contacts()->saveMany(\n            factory(Contact::class, 5)->make()\n        );\n\n        $this->actingAs($this->user)\n            ->get('/contacts')\n            ->assertStatus(200)\n            ->assertPropCount('contacts.data', 5)\n            ->assertPropValue('contacts.data', function ($contacts) {\n                $this->assertEquals(\n                    ['id', 'name', 'phone', 'city', \n                    'deleted_at', 'organization'],\n                    array_keys($contacts[0])\n                );\n            });\n    }\n\n    public function test_can_search_for_contacts()\n    {\n        $this->user->account->contacts()->saveMany(\n            factory(contact::class, 5)->make()\n        )->first()->update([\n            'first_name' => 'Greg',\n            'last_name' => 'Andersson'\n        ]);\n\n        $this->actingAs($this->user)\n            ->get('/contacts?search=Greg')\n            ->assertStatus(200)\n            ->assertPropValue('filters.search', 'Greg')\n            ->assertPropCount('contacts.data', 1)\n            ->assertPropValue('contacts.data', function ($contacts) {\n                $this->assertEquals('Greg Andersson', $contacts[0]['name']);\n            });\n    }\n\n    public function test_cannot_view_deleted_contacts()\n    {\n        $this->user->account->contacts()->saveMany(\n            factory(contact::class, 5)->make()\n        )->first()->delete();\n\n        $this->actingAs($this->user)\n            ->get('/contacts')\n            ->assertStatus(200)\n            ->assertPropCount('contacts.data', 4);\n    }\n\n    public function test_can_filter_to_view_deleted_contacts()\n    {\n        $this->user->account->contacts()->saveMany(\n            factory(contact::class, 5)->make()\n        )->first()->delete();\n\n        $this->actingAs($this->user)\n            ->get('/contacts?trashed=with')\n            ->assertStatus(200)\n            ->assertPropValue('filters.trashed', 'with')\n            ->assertPropCount('contacts.data', 5);\n    }\n}\n"
  },
  {
    "path": "tests/Feature/OrganizationsTest.php",
    "content": "<?php\n\nnamespace Tests\\Feature;\n\nuse App\\User;\nuse App\\Account;\nuse Tests\\TestCase;\nuse App\\Organization;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\n\nclass OrganizationsTest extends TestCase\n{\n    use RefreshDatabase;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $account = Account::create(['name' => 'Acme Corporation']);\n\n        $this->user = factory(User::class)->create([\n            'account_id' => $account->id,\n            'first_name' => 'John',\n            'last_name' => 'Doe',\n            'email' => 'johndoe@example.com',\n            'owner' => true,\n        ]);\n    }\n\n    public function test_can_view_organizations()\n    {\n        $this->user->account->organizations()->saveMany(\n            factory(Organization::class, 5)->make()\n        );\n\n        $this->actingAs($this->user)\n            ->get('/organizations')\n            ->assertStatus(200)\n            ->assertPropCount('organizations.data', 5)\n            ->assertPropValue('organizations.data', function ($organizations) {\n                $this->assertEquals(\n                    ['id', 'name', 'phone', 'city', 'deleted_at'],\n                    array_keys($organizations[0])\n                );\n            });\n    }\n\n    public function test_can_search_for_organizations()\n    {\n        $this->user->account->organizations()->saveMany(\n            factory(Organization::class, 5)->make()\n        )->first()->update(['name' => 'Some Big Fancy Company Name']);\n\n        $this->actingAs($this->user)\n            ->get('/organizations?search=Some Big Fancy Company Name')\n            ->assertStatus(200)\n            ->assertPropValue('filters.search', 'Some Big Fancy Company Name')\n            ->assertPropCount('organizations.data', 1)\n            ->assertPropValue('organizations.data', function ($organizations) {\n                $this->assertEquals('Some Big Fancy Company Name', $organizations[0]['name']);\n            });\n    }\n\n    public function test_cannot_view_deleted_organizations()\n    {\n        $this->user->account->organizations()->saveMany(\n            factory(Organization::class, 5)->make()\n        )->first()->delete();\n\n        $this->actingAs($this->user)\n            ->get('/organizations')\n            ->assertStatus(200)\n            ->assertPropCount('organizations.data', 4);\n    }\n\n    public function test_can_filter_to_view_deleted_organizations()\n    {\n        $this->user->account->organizations()->saveMany(\n            factory(Organization::class, 5)->make()\n        )->first()->delete();\n\n        $this->actingAs($this->user)\n            ->get('/organizations?trashed=with')\n            ->assertStatus(200)\n            ->assertPropValue('filters.trashed', 'with')\n            ->assertPropCount('organizations.data', 5);\n    }\n}\n"
  },
  {
    "path": "tests/TestCase.php",
    "content": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Support\\Arr;\nuse PHPUnit\\Framework\\Assert;\nuse Illuminate\\Foundation\\Testing\\TestResponse;\nuse Illuminate\\Foundation\\Testing\\TestCase as BaseTestCase;\n\nabstract class TestCase extends BaseTestCase\n{\n    use CreatesApplication;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        TestResponse::macro('props', function ($key = null) {\n            $props = json_decode(json_encode($this->original->getData()['page']['props']), JSON_OBJECT_AS_ARRAY);\n\n            if ($key) {\n                return Arr::get($props, $key);\n            }\n\n            return $props;\n        });\n\n        TestResponse::macro('assertHasProp', function ($key) {\n            Assert::assertTrue(Arr::has($this->props(), $key));\n\n            return $this;\n        });\n\n        TestResponse::macro('assertPropValue', function ($key, $value) {\n            $this->assertHasProp($key);\n\n            if (is_callable($value)) {\n                $value($this->props($key));\n            } else {\n                Assert::assertEquals($this->props($key), $value);\n            }\n\n            return $this;\n        });\n\n        TestResponse::macro('assertPropCount', function ($key, $count) {\n            $this->assertHasProp($key);\n\n            Assert::assertCount($count, $this->props($key));\n\n            return $this;\n        });\n    }\n}\n"
  },
  {
    "path": "webpack.mix.js",
    "content": "const cssImport = require('postcss-import');\nconst cssNesting = require('postcss-nesting');\nconst mix = require('laravel-mix');\nconst path = require('path');\nconst purgecss = require('@fullhuman/postcss-purgecss');\nconst tailwindcss = require('tailwindcss');\n\nrequire('laravel-mix-svelte');\n\n/*\n |--------------------------------------------------------------------------\n | Mix Asset Management\n |--------------------------------------------------------------------------\n |\n | Mix provides a clean, fluent API for defining some Webpack build steps\n | for your Laravel application. By default, we are compiling the Sass\n | file for the application as well as bundling up all the JS files.\n |\n */\n\nmix\n    .js('resources/js/app.js', 'public/js')\n    .postCss('resources/css/app.css', 'public/css/app.css')\n    .svelte({\n        dev: !mix.inProduction()\n    })\n    .options({\n        postCss: [\n            cssImport(),\n            cssNesting(),\n            tailwindcss('tailwind.config.js'),\n            ...(mix.inProduction()\n                ? [\n                    purgecss({\n                        content: [\n                            './resources/views/**/*.blade.php',\n                            './resources/js/**/*.svelte'\n                        ],\n                        defaultExtractor: content =>\n                            content.match(/[\\w-/:.]+(?<!:)/g) || [],\n                        whitelistPatternsChildren: [/nprogress/]\n                    })\n                ]\n                : [])\n        ]\n    })\n    .webpackConfig({\n        output: {chunkFilename: 'js/[name].js?id=[chunkhash]'},\n        resolve: {\n            alias: {\n                '@': path.resolve('resources/js')\n            }\n        }\n    })\n    .version()\n    .sourceMaps();\n"
  }
]