From 1c926adf06a7e0801a64ff2457d528246b08246a Mon Sep 17 00:00:00 2001 From: Daniele Rosario Date: Tue, 8 Mar 2022 11:27:42 +0100 Subject: [PATCH 1/5] 1.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 403f290..8e4dbab 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": "^7.4 || ^8.0", "laravel/nova": "^3.0", - "weble/laravel-ecommerce": "dev-master", + "weble/laravel-ecommerce": "^1.0", "madewithlove/laravel-nova-uuid-support": "^1.1.1" }, "autoload": { From 8147296a52a4adeb11af9c1f0ea7738e3be82e07 Mon Sep 17 00:00:00 2001 From: Daniele Rosario Date: Thu, 1 Dec 2022 10:56:56 +0100 Subject: [PATCH 2/5] laravel-ecommerce 3.0 --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8e4dbab..1af5dd6 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "laravel/nova": "^3.0", - "weble/laravel-ecommerce": "^1.0", - "madewithlove/laravel-nova-uuid-support": "^1.1.1" + "weble/laravel-ecommerce": "^3.0", + "madewithlove/laravel-nova-uuid-support": "^v1.1.1" }, "autoload": { "psr-4": { From e6264480b2341eb1777dba7e67e21e9dad6a9451 Mon Sep 17 00:00:00 2001 From: Daniele Rosario Date: Thu, 1 Dec 2022 11:07:36 +0100 Subject: [PATCH 3/5] nvoa 4.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1af5dd6..9de4b92 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.0", - "laravel/nova": "^3.0", + "laravel/nova": "^4.0", "weble/laravel-ecommerce": "^3.0", "madewithlove/laravel-nova-uuid-support": "^v1.1.1" }, From 69a3ce755189eef54dc07dac5ee3dd532fb53420 Mon Sep 17 00:00:00 2001 From: Daniele Rosario Date: Fri, 2 Dec 2022 15:28:54 +0100 Subject: [PATCH 4/5] v2 --- composer.json | 6 +- dist/js/field.js | 36074 ++++++++++++------------------------ dist/js/tool.js | 37719 ++++++++++++-------------------------- nova.mix.js | 33 + package.json | 48 +- resources/js/tool.js | 8 +- src/ManageOrderTool.php | 2 +- webpack.mix.js | 15 +- 8 files changed, 23386 insertions(+), 50519 deletions(-) create mode 100644 nova.mix.js diff --git a/composer.json b/composer.json index 9de4b92..3317cb0 100644 --- a/composer.json +++ b/composer.json @@ -47,13 +47,9 @@ "type": "composer", "url": "https://nova.laravel.com" }, - { - "type": "path", - "url": "../laravel-ecommerce" - }, { "type": "vcs", - "url": "https://github.com/sebdesign/state-machine" + "url": "https://github.com/weble/laravel-ecommerce" } ] } diff --git a/dist/js/field.js b/dist/js/field.js index cc1715c..999960e 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,3940 +1,882 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 11); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file. -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=script&lang=js": +/*!*****************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=script&lang=js ***! + \*****************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - options._compiled = true - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['resource', 'resourceName', 'resourceId', 'field'] +}); - // functional template - if (functionalTemplate) { - options.functional = true - } +/***/ }), - // scopedId - if (scopeId) { - options._scopeId = scopeId - } +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js": +/*!***************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js ***! + \***************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! laravel-nova */ "./vendor/laravel/nova/resources/js/mixins/packages.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + mixins: [laravel_nova__WEBPACK_IMPORTED_MODULE_0__.FormField, laravel_nova__WEBPACK_IMPORTED_MODULE_0__.HandlesValidationErrors], + props: ['resourceName', 'resourceId', 'field'], + computed: { + defaultAttributes: function defaultAttributes() { + return { + type: this.field.type || 'number', + min: this.field.min, + max: this.field.max, + step: this.field.step, + pattern: this.field.pattern, + placeholder: this.field.placeholder || this.field.name, + "class": this.errorClasses + }; + }, + extraAttributes: function extraAttributes() { + var attrs = this.field.extraAttributes; + return _objectSpread(_objectSpread({}, this.defaultAttributes), attrs); } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } + }, + methods: { + /* + * Set the initial, internal value for the field. + */ + setInitialValue: function setInitialValue() { + this.value = this.field.value || 0; + }, + /** + * Fill the given FormData object with the field's internal value. + */ + fill: function fill(formData) { + formData.append(this.field.attribute, this.value || 0); + }, + /** + * Update the field's internal value. + */ + handleChange: function handleChange(value) { + this.value = value; } + }, + mounted: function mounted() { + this.value = parseFloat(this.value).toFixed(this.field.subUnits); } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - +}); /***/ }), -/* 1 */, -/* 2 */, -/* 3 */, -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(12); - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=script&lang=js": +/*!****************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=script&lang=js ***! + \****************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -Nova.booting(function (Vue, router) { - Vue.component('index-nova-laravel-ecommerce-money-field', __webpack_require__(13)); - Vue.component('detail-nova-laravel-ecommerce-money-field', __webpack_require__(16)); - Vue.component('form-nova-laravel-ecommerce-money-field', __webpack_require__(19)); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: ['resourceName', 'field'] }); /***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(14) -/* template */ -var __vue_template__ = __webpack_require__(15) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/IndexField.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-9e63f81a", Component.options) - } else { - hotAPI.reload("data-v-9e63f81a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} -module.exports = Component.exports +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=template&id=0224618e": +/*!*********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=template&id=0224618e ***! + \*********************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + "class": "flex border-b border-40" +}; +var _hoisted_2 = { + "class": "w-1/4 py-4" +}; +var _hoisted_3 = { + "class": "font-normal text-80" +}; +var _hoisted_4 = { + "class": "w-3/4 py-4" +}; +var _hoisted_5 = { + "class": "text-90" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "default", {}, function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h4", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.name), 1 /* TEXT */)]; + })]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "value", {}, function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.value), 1 /* TEXT */)]; + })])]); +} /***/ }), -/* 14 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=template&id=c023248a": +/*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=template&id=c023248a ***! + \*******************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resourceName', 'field'] -}); +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +var _hoisted_1 = { + slot: "field" +}; +var _hoisted_2 = { + "class": "flex flex-wrap items-stretch w-full relative" +}; +var _hoisted_3 = { + "class": "flex -mr-px" +}; +var _hoisted_4 = { + "class": "flex items-center bg-30 rounded-r-none px-3 whitespace-no-wrap text-sm form-control form-input-bordered" +}; +var _hoisted_5 = ["id"]; +var _hoisted_6 = { + key: 0, + "class": "my-2 text-danger" +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_default_field = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("default-field"); + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_default_field, { + field: $props.field + }, { + "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { + return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("template", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.currency), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("input", (0,vue__WEBPACK_IMPORTED_MODULE_0__.mergeProps)({ + id: $props.field.attribute, + type: "number", + "class": "flex-1 relative focus:border-blue focus:shadow form-control form-input form-input-bordered", + style: { + "border-top-left-radius": "0", + "border-bottom-left-radius": "0" + } + }, $options.extraAttributes, { + "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { + return _ctx.value = $event; + }) + }), null, 16 /* FULL_PROPS */, _hoisted_5), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelText, _ctx.value]])]), _ctx.hasError ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("p", _hoisted_6, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.firstError), 1 /* TEXT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]; + }), + _: 1 /* STABLE */ + }, 8 /* PROPS */, ["field"]); +} + +/***/ }), + +/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a": +/*!********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a ***! + \********************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); + +function render(_ctx, _cache, $props, $setup, $data, $options) { + return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.field.value), 1 /* TEXT */); +} /***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("span", [_vm._v(_vm._s(_vm.field.value))]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-9e63f81a", module.exports) + +/***/ "./vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js": +/*!**********************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), +/* harmony export */ "useCopyValueToClipboard": () => (/* binding */ useCopyValueToClipboard) +/* harmony export */ }); +var mixin = { + methods: { + copyValueToClipboard: function copyValueToClipboard(value) { + if (navigator.clipboard) { + navigator.clipboard.writeText(value); + } else if (window.clipboardData) { + window.clipboardData.setData('Text', value); + } else { + var input = document.createElement('input'); + var _ref = [document.documentElement.scrollTop, document.documentElement.scrollLeft], + scrollTop = _ref[0], + scrollLeft = _ref[1]; + document.body.appendChild(input); + input.value = value; + input.focus(); + input.select(); + document.documentElement.scrollTop = scrollTop; + document.documentElement.scrollLeft = scrollLeft; + document.execCommand('copy'); + input.remove(); + } + } } +}; +function useCopyValueToClipboard() { + return { + copyValueToClipboard: function copyValueToClipboard(value) { + return mixin.methods.copyValueToClipboard(value); + } + }; } +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mixin); /***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(17) -/* template */ -var __vue_template__ = __webpack_require__(18) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/DetailField.vue" -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0224618e", Component.options) - } else { - hotAPI.reload("data-v-0224618e", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} +/***/ "./vendor/laravel/nova/resources/js/mixins/DependentFormField.js": +/*!***********************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/DependentFormField.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -module.exports = Component.exports +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./vendor/laravel/nova/node_modules/axios/index.js"); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./vendor/laravel/nova/node_modules/lodash/debounce.js"); +/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var lodash_forIn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/forIn */ "./vendor/laravel/nova/node_modules/lodash/forIn.js"); +/* harmony import */ var lodash_forIn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_forIn__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/get */ "./vendor/laravel/nova/node_modules/lodash/get.js"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/identity */ "./vendor/laravel/nova/node_modules/lodash/identity.js"); +/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "./vendor/laravel/nova/node_modules/lodash/isEmpty.js"); +/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isNil */ "./vendor/laravel/nova/node_modules/lodash/isNil.js"); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/pickBy */ "./vendor/laravel/nova/node_modules/lodash/pickBy.js"); +/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _FormField__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FormField */ "./vendor/laravel/nova/resources/js/mixins/FormField.js"); +/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./propTypes */ "./vendor/laravel/nova/resources/js/mixins/propTypes.js"); +/* harmony import */ var _util_escapeUnicode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/escapeUnicode */ "./vendor/laravel/nova/resources/js/util/escapeUnicode.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -/***/ }), -/* 17 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['resource', 'resourceName', 'resourceId', 'field'] -}); -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("div", { staticClass: "flex border-b border-40" }, [ - _c( - "div", - { staticClass: "w-1/4 py-4" }, - [ - _vm._t("default", [ - _c("h4", { staticClass: "font-normal text-80" }, [ - _vm._v( - "\n " + _vm._s(_vm.field.name) + "\n " - ) - ]) - ]) - ], - 2 - ), - _vm._v(" "), - _c( - "div", - { staticClass: "w-3/4 py-4" }, - [ - _vm._t("value", [ - _c("p", { staticClass: "text-90" }, [_vm._v(_vm._s(_vm.field.value))]) - ]) - ], - 2 - ) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-0224618e", module.exports) - } -} -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(20) -/* template */ -var __vue_template__ = __webpack_require__(22) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "resources/js/components/FormField.vue" -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-c023248a", Component.options) - } else { - hotAPI.reload("data-v-c023248a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} -module.exports = Component.exports -/***/ }), -/* 20 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_laravel_nova___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_laravel_nova__); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - mixins: [__WEBPACK_IMPORTED_MODULE_0_laravel_nova__["FormField"], __WEBPACK_IMPORTED_MODULE_0_laravel_nova__["HandlesValidationErrors"]], - - props: ['resourceName', 'resourceId', 'field'], - - computed: { - defaultAttributes: function defaultAttributes() { - return { - type: this.field.type || 'number', - min: this.field.min, - max: this.field.max, - step: this.field.step, - pattern: this.field.pattern, - placeholder: this.field.placeholder || this.field.name, - class: this.errorClasses - }; - }, - extraAttributes: function extraAttributes() { - var attrs = this.field.extraAttributes; - return _extends({}, this.defaultAttributes, attrs); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + "extends": _FormField__WEBPACK_IMPORTED_MODULE_8__["default"], + emits: ['field-shown', 'field-hidden'], + props: _objectSpread(_objectSpread({}, (0,_propTypes__WEBPACK_IMPORTED_MODULE_9__.mapProps)(['shownViaNewRelationModal', 'field', 'viaResource', 'viaResourceId', 'viaRelationship', 'resourceName', 'resourceId', 'relatedResourceName', 'relatedResourceId'])), {}, { + syncEndpoint: { + type: String, + required: false + } + }), + data: function data() { + return { + dependentFieldDebouncer: null, + canceller: null, + watchedFields: {}, + watchedEvents: {}, + syncedField: null, + pivot: false, + editMode: 'create' + }; + }, + created: function created() { + this.dependentFieldDebouncer = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (callback) { + return callback(); + }, 50); + }, + mounted: function mounted() { + var _this = this; + if (this.relatedResourceName !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_6___default()(this.relatedResourceName)) { + this.pivot = true; + if (this.relatedResourceId !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_6___default()(this.relatedResourceId)) { + this.editMode = 'update-attached'; + } else { + this.editMode = 'attach'; + } + } else { + if (this.resourceId !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_6___default()(this.resourceId)) { + this.editMode = 'update'; + } + } + if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this.dependsOn)) { + lodash_forIn__WEBPACK_IMPORTED_MODULE_2___default()(this.dependsOn, function (defaultValue, dependsOn) { + _this.watchedEvents[dependsOn] = function (value) { + _this.watchedFields[dependsOn] = value; + _this.dependentFieldDebouncer(function () { + _this.watchedFields[dependsOn] = value; + _this.syncField(); + }); + }; + _this.watchedFields[dependsOn] = defaultValue; + Nova.$on(_this.getFieldAttributeChangeEventName(dependsOn), _this.watchedEvents[dependsOn]); + }); + } + }, + beforeUnmount: function beforeUnmount() { + var _this2 = this; + if (this.canceller !== null) this.canceller(); + if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(this.watchedEvents)) { + lodash_forIn__WEBPACK_IMPORTED_MODULE_2___default()(this.watchedEvents, function (event, dependsOn) { + Nova.$off(_this2.getFieldAttributeChangeEventName(dependsOn), event); + }); + } + }, + methods: { + /* + * Set the initial value for the field + */ + setInitialValue: function setInitialValue() { + this.value = !(this.currentField.value === undefined || this.currentField.value === null) ? this.currentField.value : this.value; + }, + /** + * Provide a function to fills FormData when field is visible. + */ + fillIfVisible: function fillIfVisible(formData, attribute, value) { + if (this.currentlyIsVisible) { + formData.append(attribute, value); + } + }, + syncField: function syncField() { + var _this3 = this; + if (this.canceller !== null) this.canceller(); + Nova.request().patch(this.syncEndpoint || this.syncFieldEndpoint, this.dependentFieldValues, { + params: lodash_pickBy__WEBPACK_IMPORTED_MODULE_7___default()({ + editing: true, + editMode: this.editMode, + viaResource: this.viaResource, + viaResourceId: this.viaResourceId, + viaRelationship: this.viaRelationship, + field: this.field.attribute, + component: this.field.dependentComponentKey + }, (lodash_identity__WEBPACK_IMPORTED_MODULE_4___default())), + cancelToken: new axios__WEBPACK_IMPORTED_MODULE_0__.CancelToken(function (canceller) { + _this3.canceller = canceller; + }) + }).then(function (response) { + var wasVisible = _this3.currentlyIsVisible; + _this3.syncedField = response.data; + if (_this3.syncedField.visible !== wasVisible) { + _this3.$emit(_this3.syncedField.visible === true ? 'field-shown' : 'field-hidden', _this3.field.attribute); + } + if (lodash_isNil__WEBPACK_IMPORTED_MODULE_6___default()(_this3.syncedField.value)) { + _this3.syncedField.value = _this3.field.value; + } else { + _this3.setInitialValue(); } + _this3.onSyncedField(); + }); }, + onSyncedField: function onSyncedField() { + // + } + }, + computed: { + /** + * Determine the current field + */ + currentField: function currentField() { + return this.syncedField || this.field; + }, + /** + * Determine if the field is in visible mode + */ + currentlyIsVisible: function currentlyIsVisible() { + return this.currentField.visible; + }, + /** + * Determine if the field is in readonly mode + */ + currentlyIsReadonly: function currentlyIsReadonly() { + if (this.syncedField !== null) { + return Boolean(this.syncedField.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_3___default()(this.syncedField, 'extraAttributes.readonly')); + } + return Boolean(this.field.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_3___default()(this.field, 'extraAttributes.readonly')); + }, + dependsOn: function dependsOn() { + return this.field.dependsOn || []; + }, + currentFieldValues: function currentFieldValues() { + return _defineProperty({}, this.field.attribute, this.value); + }, + dependentFieldValues: function dependentFieldValues() { + return _objectSpread(_objectSpread({}, this.currentFieldValues), this.watchedFields); + }, + encodedDependentFieldValues: function encodedDependentFieldValues() { + return btoa((0,_util_escapeUnicode__WEBPACK_IMPORTED_MODULE_10__.escapeUnicode)(JSON.stringify(this.dependentFieldValues))); + }, + syncFieldEndpoint: function syncFieldEndpoint() { + if (this.editMode === 'update-attached') { + return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/update-pivot-fields/").concat(this.relatedResourceName, "/").concat(this.relatedResourceId); + } else if (this.editMode === 'attach') { + return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/creation-pivot-fields/").concat(this.relatedResourceName); + } else if (this.editMode === 'update') { + return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/update-fields"); + } + return "/nova-api/".concat(this.resourceName, "/creation-fields"); + } + } +}); - methods: { - /* - * Set the initial, internal value for the field. - */ - setInitialValue: function setInitialValue() { - this.value = this.field.value || 0; - }, - +/***/ }), - /** - * Fill the given FormData object with the field's internal value. - */ - fill: function fill(formData) { - formData.append(this.field.attribute, this.value || 0); - }, +/***/ "./vendor/laravel/nova/resources/js/mixins/FieldValue.js": +/*!***************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/FieldValue.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _util_filled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/filled */ "./vendor/laravel/nova/resources/js/util/filled.js"); - /** - * Update the field's internal value. - */ - handleChange: function handleChange(value) { - this.value = value; - } +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + computed: { + fieldHasValue: function fieldHasValue() { + return (0,_util_filled__WEBPACK_IMPORTED_MODULE_0__["default"])(this.field.value); }, - - mounted: function mounted() { - this.value = parseFloat(this.value).toFixed(this.field.subUnits); + usesCustomizedDisplay: function usesCustomizedDisplay() { + return this.field.usesCustomizedDisplay && (0,_util_filled__WEBPACK_IMPORTED_MODULE_0__["default"])(this.field.displayedAs); + }, + fieldValue: function fieldValue() { + if (!this.usesCustomizedDisplay && !this.fieldHasValue) { + return null; + } + return String(this.field.displayedAs || this.field.value); + }, + shouldDisplayAsHtml: function shouldDisplayAsHtml() { + return this.field.asHtml; } + } }); /***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["laravel-nova"] = factory(); - else - root["laravel-nova"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 49); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./vendor/laravel/nova/resources/js/mixins/FormEvents.js": +/*!***************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/FormEvents.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isNil */ "./vendor/laravel/nova/node_modules/lodash/isNil.js"); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./propTypes */ "./vendor/laravel/nova/resources/js/mixins/propTypes.js"); -var bind = __webpack_require__(48); -var isBuffer = __webpack_require__(158); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: { + formUniqueId: { + type: String + } + }, + methods: { + emitFieldValue: function emitFieldValue(attribute, value) { + Nova.$emit("".concat(attribute, "-value"), value); + if (this.hasFormUniqueId === true) { + Nova.$emit("".concat(this.formUniqueId, "-").concat(attribute, "-value"), value); + } + }, + emitFieldValueChange: function emitFieldValueChange(attribute, value) { + Nova.$emit("".concat(attribute, "-change"), value); + if (this.hasFormUniqueId === true) { + Nova.$emit("".concat(this.formUniqueId, "-").concat(attribute, "-change"), value); + } + }, + /** + * Get field attribue value event name. + */ + getFieldAttributeValueEventName: function getFieldAttributeValueEventName(attribute) { + return this.hasFormUniqueId === true ? "".concat(this.formUniqueId, "-").concat(attribute, "-value") : "".concat(attribute, "-value"); + }, + /** + * Get field attribue value event name. + */ + getFieldAttributeChangeEventName: function getFieldAttributeChangeEventName(attribute) { + return this.hasFormUniqueId === true ? "".concat(this.formUniqueId, "-").concat(attribute, "-change") : "".concat(attribute, "-change"); + } + }, + computed: { + /** + * Determine if the field has Form Unique ID. + */ + hasFormUniqueId: function hasFormUniqueId() { + return !lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(this.formUniqueId) && this.formUniqueId !== ''; + }, + /** + * Get field attribue value event name. + */ + fieldAttributeValueEventName: function fieldAttributeValueEventName() { + return this.getFieldAttributeValueEventName(this.field.attribute); + }, + /** + * Get field attribue value event name. + */ + fieldAttributeChangeEventName: function fieldAttributeChangeEventName() { + return this.getFieldAttributeChangeEventName(this.field.attribute); + } + } +}); -/*global toString:true*/ +/***/ }), -// utils is a library of generic helper functions non-specific to axios +/***/ "./vendor/laravel/nova/resources/js/mixins/FormField.js": +/*!**************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/FormField.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim -}; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(62)('wks'); -var uid = __webpack_require__(67); -var Symbol = __webpack_require__(1).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.7' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(9); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(29)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(1); -var core = __webpack_require__(3); -var ctx = __webpack_require__(16); -var hide = __webpack_require__(7); -var has = __webpack_require__(17); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(11); -var createDesc = __webpack_require__(61); -module.exports = __webpack_require__(5) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(4); -var IE8_DOM_DEFINE = __webpack_require__(124); -var toPrimitive = __webpack_require__(144); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(70); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(14); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var eq = __webpack_require__(38); - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -module.exports = assocIndexOf; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(36), - getRawTag = __webpack_require__(190), - objectToString = __webpack_require__(215); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -var isKeyable = __webpack_require__(199); - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -module.exports = getMapData; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var getNative = __webpack_require__(37); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -module.exports = nativeCreate; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -var isFunction = __webpack_require__(74), - isLength = __webpack_require__(75); - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -module.exports = isArrayLike; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGetTag = __webpack_require__(19), - isObjectLike = __webpack_require__(23); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -var utils = __webpack_require__(0); -var normalizeHeaderName = __webpack_require__(111); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(44); - } else if (typeof process !== 'undefined') { - // For node use HTTP adapter - adapter = __webpack_require__(44); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } -}; - -defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(77))) - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _defineProperty = __webpack_require__(115); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}; - -/***/ }), -/* 27 */ -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(9); -var document = __webpack_require__(1).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -module.exports = true; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(14); - -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} - -module.exports.f = function (C) { - return new PromiseCapability(C); -}; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(11).f; -var has = __webpack_require__(17); -var TAG = __webpack_require__(2)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__(62)('keys'); -var uid = __webpack_require__(67); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(56); -var defined = __webpack_require__(27); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { - -var root = __webpack_require__(12); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsNative = __webpack_require__(172), - getValue = __webpack_require__(191); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports) { - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports) { - -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.mapProps = undefined; - -var _lodash = __webpack_require__(236); - -var _lodash2 = _interopRequireDefault(_lodash); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var propTypes = { - shownViaNewRelationModal: { - type: Boolean, - default: false - }, - - resourceId: { type: [Number, String] }, - - resourceName: { type: String }, - - field: { - type: Object, - required: true - }, - - viaResource: { - type: String, - required: false - }, - - viaResourceId: { - type: [String, Number], - required: false - }, - - viaRelationship: { - type: String, - required: false - } -}; - -function mapProps(attributes) { - return _lodash2.default.pick(propTypes, attributes); -} - -exports.mapProps = mapProps; - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ['1/2', '1/3', '2/3', '1/4', '3/4', '1/5', '2/5', '3/5', '4/5', '1/6', '5/6']; - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Form = __webpack_require__(156); - -Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Form).default; - } -}); -Object.defineProperty(exports, 'Form', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Form).default; - } -}); - -var _Errors = __webpack_require__(68); - -Object.defineProperty(exports, 'Errors', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_Errors).default; - } -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -var utils = __webpack_require__(0); -var settle = __webpack_require__(103); -var buildURL = __webpack_require__(106); -var parseHeaders = __webpack_require__(112); -var isURLSameOrigin = __webpack_require__(110); -var createError = __webpack_require__(47); -var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(105); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - var loadEvent = 'onreadystatechange'; - var xDomain = false; - - // For IE 8/9 CORS support - // Only supports POST and GET calls and doesn't returns the response headers. - // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. - if (process.env.NODE_ENV !== 'test' && - typeof window !== 'undefined' && - window.XDomainRequest && !('withCredentials' in request) && - !isURLSameOrigin(config.url)) { - request = new window.XDomainRequest(); - loadEvent = 'onload'; - xDomain = true; - request.onprogress = function handleProgress() {}; - request.ontimeout = function handleTimeout() {}; - } - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request[loadEvent] = function handleLoad() { - if (!request || (request.readyState !== 4 && !xDomain)) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201) - status: request.status === 1223 ? 204 : request.status, - statusText: request.status === 1223 ? 'No Content' : request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(108); - - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (requestData === undefined) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(77))) - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var enhanceError = __webpack_require__(102); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.mapProps = exports.CardSizes = exports.SingularOrPlural = exports.Minimum = exports.Capitalize = exports.Inflector = exports.Errors = exports.TogglesTrashed = exports.PerPageable = exports.PerformsSearches = exports.Paginatable = exports.InteractsWithResourceInformation = exports.InteractsWithQueryString = exports.InteractsWithDates = exports.HasCards = exports.HandlesValidationErrors = exports.FormField = exports.Filterable = exports.Deletable = exports.BehavesAsPanel = undefined; - -var _BehavesAsPanel = __webpack_require__(79); - -var _BehavesAsPanel2 = _interopRequireDefault(_BehavesAsPanel); - -var _Deletable = __webpack_require__(80); - -var _Deletable2 = _interopRequireDefault(_Deletable); - -var _Filterable = __webpack_require__(81); - -var _Filterable2 = _interopRequireDefault(_Filterable); - -var _FormField = __webpack_require__(82); - -var _FormField2 = _interopRequireDefault(_FormField); - -var _HandlesValidationErrors = __webpack_require__(83); - -var _HandlesValidationErrors2 = _interopRequireDefault(_HandlesValidationErrors); - -var _HasCards = __webpack_require__(84); - -var _HasCards2 = _interopRequireDefault(_HasCards); - -var _InteractsWithDates = __webpack_require__(85); - -var _InteractsWithDates2 = _interopRequireDefault(_InteractsWithDates); - -var _InteractsWithQueryString = __webpack_require__(86); - -var _InteractsWithQueryString2 = _interopRequireDefault(_InteractsWithQueryString); - -var _InteractsWithResourceInformation = __webpack_require__(87); - -var _InteractsWithResourceInformation2 = _interopRequireDefault(_InteractsWithResourceInformation); - -var _Paginatable = __webpack_require__(88); - -var _Paginatable2 = _interopRequireDefault(_Paginatable); - -var _PerformsSearches = __webpack_require__(90); - -var _PerformsSearches2 = _interopRequireDefault(_PerformsSearches); - -var _PerPageable = __webpack_require__(89); - -var _PerPageable2 = _interopRequireDefault(_PerPageable); - -var _TogglesTrashed = __webpack_require__(91); - -var _TogglesTrashed2 = _interopRequireDefault(_TogglesTrashed); - -var _inflectorJs = __webpack_require__(95); - -var _inflectorJs2 = _interopRequireDefault(_inflectorJs); - -var _cardSizes = __webpack_require__(42); - -var _cardSizes2 = _interopRequireDefault(_cardSizes); - -var _capitalize = __webpack_require__(92); - -var _capitalize2 = _interopRequireDefault(_capitalize); - -var _minimum = __webpack_require__(93); - -var _minimum2 = _interopRequireDefault(_minimum); - -var _formBackendValidation = __webpack_require__(43); - -var _singularOrPlural = __webpack_require__(94); - -var _singularOrPlural2 = _interopRequireDefault(_singularOrPlural); - -var _propTypes = __webpack_require__(41); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Mixins -exports.BehavesAsPanel = _BehavesAsPanel2.default; -exports.Deletable = _Deletable2.default; -exports.Filterable = _Filterable2.default; -exports.FormField = _FormField2.default; -exports.HandlesValidationErrors = _HandlesValidationErrors2.default; -exports.HasCards = _HasCards2.default; -exports.InteractsWithDates = _InteractsWithDates2.default; -exports.InteractsWithQueryString = _InteractsWithQueryString2.default; -exports.InteractsWithResourceInformation = _InteractsWithResourceInformation2.default; -exports.Paginatable = _Paginatable2.default; -exports.PerformsSearches = _PerformsSearches2.default; -exports.PerPageable = _PerPageable2.default; -exports.TogglesTrashed = _TogglesTrashed2.default; -exports.Errors = _formBackendValidation.Errors; -exports.Inflector = _inflectorJs2.default; -exports.Capitalize = _capitalize2.default; -exports.Minimum = _minimum2.default; -exports.SingularOrPlural = _singularOrPlural2.default; -exports.CardSizes = _cardSizes2.default; -exports.mapProps = _propTypes.mapProps; - -// PropTypes - - -// Util - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(119), __esModule: true }; - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _promise = __webpack_require__(50); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(242); - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(15); -var TAG = __webpack_require__(2)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -var document = __webpack_require__(1).document; -module.exports = document && document.documentElement; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(15); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__(30); -var $export = __webpack_require__(6); -var redefine = __webpack_require__(140); -var hide = __webpack_require__(7); -var Iterators = __webpack_require__(10); -var $iterCreate = __webpack_require__(128); -var setToStringTag = __webpack_require__(32); -var getPrototypeOf = __webpack_require__(136); -var ITERATOR = __webpack_require__(2)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(137); -var enumBugKeys = __webpack_require__(54); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), -/* 59 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(4); -var isObject = __webpack_require__(9); -var newPromiseCapability = __webpack_require__(31); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - - -/***/ }), -/* 61 */ -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -var core = __webpack_require__(3); -var global = __webpack_require__(1); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__(30) ? 'pure' : 'global', - copyright: '© 2018 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(4); -var aFunction = __webpack_require__(14); -var SPECIES = __webpack_require__(2)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(16); -var invoke = __webpack_require__(125); -var html = __webpack_require__(55); -var cel = __webpack_require__(28); -var global = __webpack_require__(1); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(15)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; - - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(34); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(27); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), -/* 67 */ -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Errors = function () { - /** - * Create a new Errors instance. - */ - function Errors() { - var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Errors); - - this.record(errors); - } - - /** - * Get all the errors. - * - * @return {object} - */ - - - _createClass(Errors, [{ - key: "all", - value: function all() { - return this.errors; - } - - /** - * Determine if any errors exists for the given field or object. - * - * @param {string} field - */ - - }, { - key: "has", - value: function has(field) { - var hasError = this.errors.hasOwnProperty(field); - - if (!hasError) { - var errors = Object.keys(this.errors).filter(function (e) { - return e.startsWith(field + ".") || e.startsWith(field + "["); - }); - - hasError = errors.length > 0; - } - - return hasError; - } - }, { - key: "first", - value: function first(field) { - return this.get(field)[0]; - } - }, { - key: "get", - value: function get(field) { - return this.errors[field] || []; - } - - /** - * Determine if we have any errors. - */ - - }, { - key: "any", - value: function any() { - return Object.keys(this.errors).length > 0; - } - - /** - * Record the new errors. - * - * @param {object} errors - */ - - }, { - key: "record", - value: function record() { - var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.errors = errors; - } - - /** - * Clear a specific field, object or all error fields. - * - * @param {string|null} field - */ - - }, { - key: "clear", - value: function clear(field) { - if (!field) { - this.errors = {}; - - return; - } - - var errors = Object.assign({}, this.errors); - - Object.keys(errors).filter(function (e) { - return e === field || e.startsWith(field + ".") || e.startsWith(field + "["); - }).forEach(function (e) { - return delete errors[e]; - }); - - this.errors = errors; - } - }]); - - return Errors; -}(); - -exports.default = Errors; - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseTimes = __webpack_require__(179), - isArguments = __webpack_require__(231), - isArray = __webpack_require__(13), - isBuffer = __webpack_require__(232), - isIndex = __webpack_require__(72), - isTypedArray = __webpack_require__(233); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; - - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(78))) - -/***/ }), -/* 71 */ -/***/ (function(module, exports) { - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -module.exports = hasUnicode; - - -/***/ }), -/* 72 */ -/***/ (function(module, exports) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; - - -/***/ }), -/* 73 */ -/***/ (function(module, exports) { - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; - - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGetTag = __webpack_require__(19), - isObject = __webpack_require__(8); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; - - -/***/ }), -/* 75 */ -/***/ (function(module, exports) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; - - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseToString = __webpack_require__(180); - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -module.exports = toString; - - -/***/ }), -/* 77 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - props: ['resourceName', 'resourceId', 'resource', 'panel'], - - methods: { - /** - * Handle the actionExecuted event and pass it up the chain. - */ - actionExecuted: function actionExecuted() { - this.$emit('actionExecuted'); - } - } -}; - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(116); - -var _extends3 = _interopRequireDefault(_extends2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - methods: { - /** - * Open the delete menu modal. - */ - openDeleteModal: function openDeleteModal() { - this.deleteModalOpen = true; - }, - - - /** - * Delete the given resources. - */ - deleteResources: function deleteResources(resources) { - var _this = this; - - var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - if (this.viaManyToMany) { - return this.detachResources(resources); - } - - return Nova.request({ - url: '/nova-api/' + this.resourceName, - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: mapResources(resources) }) - }).then(callback ? callback : function () { - _this.deleteModalOpen = false; - _this.getResources(); - }); - }, - - - /** - * Delete the selected resources. - */ - deleteSelectedResources: function deleteSelectedResources() { - this.deleteResources(this.selectedResources); - }, - - - /** - * Delete all of the matching resources. - */ - deleteAllMatchingResources: function deleteAllMatchingResources() { - var _this2 = this; - - if (this.viaManyToMany) { - return this.detachAllMatchingResources(); - } - - return Nova.request({ - url: this.deleteAllMatchingResourcesEndpoint, - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: 'all' }) - }).then(function () { - _this2.deleteModalOpen = false; - _this2.getResources(); - }); - }, - - - /** - * Detach the given resources. - */ - detachResources: function detachResources(resources) { - var _this3 = this; - - return Nova.request({ - url: '/nova-api/' + this.resourceName + '/detach', - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: mapResources(resources) }) - }).then(function () { - _this3.deleteModalOpen = false; - _this3.getResources(); - }); - }, - - - /** - * Detach all of the matching resources. - */ - detachAllMatchingResources: function detachAllMatchingResources() { - var _this4 = this; - - return Nova.request({ - url: '/nova-api/' + this.resourceName + '/detach', - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: 'all' }) - }).then(function () { - _this4.deleteModalOpen = false; - _this4.getResources(); - }); - }, - - - /** - * Force delete the given resources. - */ - forceDeleteResources: function forceDeleteResources(resources) { - var _this5 = this; - - var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - return Nova.request({ - url: '/nova-api/' + this.resourceName + '/force', - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: mapResources(resources) }) - }).then(callback ? callback : function () { - _this5.deleteModalOpen = false; - - _this5.getResources(); - }); - }, +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/get */ "./vendor/laravel/nova/node_modules/lodash/get.js"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isNil */ "./vendor/laravel/nova/node_modules/lodash/isNil.js"); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./propTypes */ "./vendor/laravel/nova/resources/js/mixins/propTypes.js"); +/* harmony import */ var _FormEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormEvents */ "./vendor/laravel/nova/resources/js/mixins/FormEvents.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + "extends": _FormEvents__WEBPACK_IMPORTED_MODULE_3__["default"], + props: _objectSpread(_objectSpread({}, (0,_propTypes__WEBPACK_IMPORTED_MODULE_2__.mapProps)(['shownViaNewRelationModal', 'field', 'viaResource', 'viaResourceId', 'viaRelationship', 'resourceName', 'showHelpText', 'mode'])), {}, { + formUniqueId: { + type: String + } + }), + data: function data() { + return { + value: '' + }; + }, + mounted: function mounted() { + this.setInitialValue(); + // Add a default fill method for the field + this.field.fill = this.fill; - /** - * Force delete the selected resources. + // Register a global event for setting the field's value + Nova.$on(this.fieldAttributeValueEventName, this.listenToValueChanges); + }, + beforeUnmount: function beforeUnmount() { + Nova.$off(this.fieldAttributeValueEventName, this.listenToValueChanges); + }, + methods: { + /* + * Set the initial value for the field */ - forceDeleteSelectedResources: function forceDeleteSelectedResources() { - this.forceDeleteResources(this.selectedResources); + setInitialValue: function setInitialValue() { + this.value = !(this.field.value === undefined || this.field.value === null) ? this.field.value : ''; }, - - /** - * Force delete all of the matching resources. + * Provide a function that fills a passed FormData object with the + * field's internal value attribute */ - forceDeleteAllMatchingResources: function forceDeleteAllMatchingResources() { - var _this6 = this; - - return Nova.request({ - url: this.forceDeleteSelectedResourcesEndpoint, - method: 'delete', - params: (0, _extends3.default)({}, this.queryString, { resources: 'all' }) - }).then(function () { - _this6.deleteModalOpen = false; - _this6.getResources(); - }); + fill: function fill(formData) { + this.fillIfVisible(formData, this.field.attribute, String(this.value)); }, - - /** - * Restore the given resources. + * Provide a function to fills FormData when field is visible. */ - restoreResources: function restoreResources(resources) { - var _this7 = this; - - var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - return Nova.request({ - url: '/nova-api/' + this.resourceName + '/restore', - method: 'put', - params: (0, _extends3.default)({}, this.queryString, { resources: mapResources(resources) }) - }).then(callback ? callback : function () { - _this7.restoreModalOpen = false; - - _this7.getResources(); - }); + fillIfVisible: function fillIfVisible(formData, attribute, value) { + if (this.isVisible) { + formData.append(attribute, value); + } }, - - /** - * Restore the selected resources. + * Update the field's internal value */ - restoreSelectedResources: function restoreSelectedResources() { - this.restoreResources(this.selectedResources); + handleChange: function handleChange(event) { + this.value = event.target.value; + if (this.field) { + this.emitFieldValueChange(this.field.attribute, this.value); + } }, - - - /** - * Restore all of the matching resources. - */ - restoreAllMatchingResources: function restoreAllMatchingResources() { - var _this8 = this; - - return Nova.request({ - url: this.restoreAllMatchingResourcesEndpoint, - method: 'put', - params: (0, _extends3.default)({}, this.queryString, { resources: 'all' }) - }).then(function () { - _this8.restoreModalOpen = false; - _this8.getResources(); - }); + listenToValueChanges: function listenToValueChanges(value) { + this.value = value; } }, - computed: { /** - * Get the delete all matching resources endpoint. + * Determine the current field */ - deleteAllMatchingResourcesEndpoint: function deleteAllMatchingResourcesEndpoint() { - if (this.lens) { - return '/nova-api/' + this.resourceName + '/lens/' + this.lens; - } - - return '/nova-api/' + this.resourceName; + currentField: function currentField() { + return this.field; }, - - /** - * Get the force delete all of the matching resources endpoint. + * Determine if the field should use all the available white-space. */ - forceDeleteSelectedResourcesEndpoint: function forceDeleteSelectedResourcesEndpoint() { - if (this.lens) { - return '/nova-api/' + this.resourceName + '/lens/' + this.lens + '/force'; - } - - return '/nova-api/' + this.resourceName + '/force'; + fullWidthContent: function fullWidthContent() { + return this.currentField.fullWidth || this.field.fullWidth; }, - - /** - * Get the restore all of the matching resources endpoint. + * Return the placeholder text for the field. */ - restoreAllMatchingResourcesEndpoint: function restoreAllMatchingResourcesEndpoint() { - if (this.lens) { - return '/nova-api/' + this.resourceName + '/lens/' + this.lens + '/restore'; - } - - return '/nova-api/' + this.resourceName + '/restore'; + placeholder: function placeholder() { + return this.currentField.placeholder || this.field.name; }, - - /** - * Get the query string for a deletable resource request. + * Determine if the field is in visible mode */ - queryString: function queryString() { - return { - search: this.currentSearch, - filters: this.encodedFilters, - trashed: this.currentTrashed, - viaResource: this.viaResource, - viaResourceId: this.viaResourceId, - viaRelationship: this.viaRelationship - }; + isVisible: function isVisible() { + return this.field.visible; + }, + /** + * Determine if the field is in readonly mode + */ + isReadonly: function isReadonly() { + return Boolean(this.field.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(this.field, 'extraAttributes.readonly')); } } -}; - - -function mapResources(resources) { - return _.map(resources, function (resource) { - return resource.id.value; - }); -} - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true }); -var _regenerator = __webpack_require__(52); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _defineProperty2 = __webpack_require__(26); - -var _defineProperty3 = _interopRequireDefault(_defineProperty2); - -var _asyncToGenerator2 = __webpack_require__(51); - -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); - -var _each = __webpack_require__(228); - -var _each2 = _interopRequireDefault(_each); - -var _get = __webpack_require__(230); +/***/ }), -var _get2 = _interopRequireDefault(_get); +/***/ "./vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js": +/*!***********************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! form-backend-validation */ "./vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); -exports.default = { +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: { + formUniqueId: { + type: String + } + }, + data: function data() { + return { + validationErrors: new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors() + }; + }, methods: { /** - * Clear filters and reset the resource table + * Handle all response error. */ - clearSelectedFilters: function () { - var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(lens) { - var _updateQueryString; - - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!lens) { - _context.next = 5; - break; - } - - _context.next = 3; - return this.$store.dispatch(this.resourceName + '/resetFilterState', { - resourceName: this.resourceName, - lens: lens - }); - - case 3: - _context.next = 7; - break; - - case 5: - _context.next = 7; - return this.$store.dispatch(this.resourceName + '/resetFilterState', { - resourceName: this.resourceName - }); - - case 7: - - this.updateQueryString((_updateQueryString = {}, (0, _defineProperty3.default)(_updateQueryString, this.pageParameter, 1), (0, _defineProperty3.default)(_updateQueryString, this.filterParameter, ''), _updateQueryString)); - - case 8: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - function clearSelectedFilters(_x) { - return _ref.apply(this, arguments); + handleResponseError: function handleResponseError(error) { + if (error.response === undefined || error.response.status == 500) { + Nova.error(this.__('There was a problem submitting the form.')); + } else if (error.response.status == 422) { + this.validationErrors = new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(error.response.data.errors); + Nova.error(this.__('There was a problem submitting the form.')); + } else { + Nova.error(this.__('There was a problem submitting the form.') + ' "' + error.response.statusText + '"'); } - - return clearSelectedFilters; - }(), - - - /** - * Handle a filter state change. - */ - filterChanged: function filterChanged() { - var _updateQueryString2; - - this.updateQueryString((_updateQueryString2 = {}, (0, _defineProperty3.default)(_updateQueryString2, this.pageParameter, 1), (0, _defineProperty3.default)(_updateQueryString2, this.filterParameter, this.$store.getters[this.resourceName + '/currentEncodedFilters']), _updateQueryString2)); }, - - /** - * Set up filters for the current view + * Handle creating response error. */ - initializeFilters: function () { - var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(lens) { - return _regenerator2.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - // Clear out the filters from the store first - this.$store.commit(this.resourceName + '/clearFilters'); - - _context2.next = 3; - return this.$store.dispatch(this.resourceName + '/fetchFilters', { - resourceName: this.resourceName, - viaResource: this.viaResource, - viaResourceId: this.viaResourceId, - viaRelationship: this.viaRelationship, - lens: lens - }); - - case 3: - _context2.next = 5; - return this.initializeState(lens); - - case 5: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function initializeFilters(_x2) { - return _ref2.apply(this, arguments); - } - - return initializeFilters; - }(), - - + handleOnCreateResponseError: function handleOnCreateResponseError(error) { + this.handleResponseError(error); + }, /** - * Initialize the filter state + * Handle updating response error. */ - initializeState: function () { - var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(lens) { - return _regenerator2.default.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - if (!this.initialEncodedFilters) { - _context3.next = 5; - break; - } - - _context3.next = 3; - return this.$store.dispatch(this.resourceName + '/initializeCurrentFilterValuesFromQueryString', this.initialEncodedFilters); - - case 3: - _context3.next = 7; - break; - - case 5: - _context3.next = 7; - return this.$store.dispatch(this.resourceName + '/resetFilterState', { - resourceName: this.resourceName, - lens: lens - }); - - case 7: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - })); - - function initializeState(_x3) { - return _ref3.apply(this, arguments); + handleOnUpdateResponseError: function handleOnUpdateResponseError(error) { + if (error.response && error.response.status == 409) { + Nova.error(this.__('Another user has updated this resource since this page was loaded. Please refresh the page and try again.')); + } else { + this.handleResponseError(error); } - - return initializeState; - }() - }, - - computed: { - /** - * Get the name of the filter query string variable. - */ - filterParameter: function filterParameter() { - return this.resourceName + '_filter'; } } -}; - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true }); -var _propTypes = __webpack_require__(41); +/***/ }), -exports.default = { - props: (0, _propTypes.mapProps)(['shownViaNewRelationModal', 'field', 'viaResource', 'viaResourceId', 'viaRelationship', 'resourceName']), +/***/ "./vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js": +/*!***************************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var lodash_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/each */ "./vendor/laravel/nova/node_modules/lodash/each.js"); +/* harmony import */ var lodash_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_each__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/filter */ "./vendor/laravel/nova/node_modules/lodash/filter.js"); +/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_filter__WEBPACK_IMPORTED_MODULE_1__); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + emits: ['field-shown', 'field-hidden'], data: function data() { return { - value: '' + visibleFieldsForPanel: {} }; }, - - mounted: function mounted() { + created: function created() { var _this = this; - - this.setInitialValue(); - - // Add a default fill method for the field - this.field.fill = this.fill; - - // Register a global event for setting the field's value - Nova.$on(this.field.attribute + '-value', function (value) { - _this.value = value; + lodash_each__WEBPACK_IMPORTED_MODULE_0___default()(this.panel.fields, function (field) { + _this.visibleFieldsForPanel[field.attribute] = field.visible; }); }, - destroyed: function destroyed() { - Nova.$off(this.field.attribute + '-value'); - }, - - methods: { - /* - * Set the initial value for the field - */ - setInitialValue: function setInitialValue() { - this.value = !(this.field.value === undefined || this.field.value === null) ? this.field.value : ''; + handleFieldShown: function handleFieldShown(field) { + this.visibleFieldsForPanel[field] = true; + this.$emit('field-shown', field); }, + handleFieldHidden: function handleFieldHidden(field) { + this.visibleFieldsForPanel[field] = false; + this.$emit('field-hidden', field); + } + }, + computed: { + visibleFieldsCount: function visibleFieldsCount() { + return Object.entries(lodash_filter__WEBPACK_IMPORTED_MODULE_1___default()(this.visibleFieldsForPanel, function (visible) { + return visible === true; + })).length; + } + } +}); +/***/ }), - /** - * Provide a function that fills a passed FormData object with the - * field's internal value attribute - */ - fill: function fill(formData) { - formData.append(this.field.attribute, String(this.value)); - }, - +/***/ "./vendor/laravel/nova/resources/js/mixins/HandlesUploads.js": +/*!*******************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/HandlesUploads.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + data: function data() { + return { + isWorking: false, + fileUploadsCount: 0 + }; + }, + methods: { /** - * Update the field's internal value + * Handle file upload finishing */ - handleChange: function handleChange(value) { - this.value = value; - } - }, - - computed: { + handleFileUploadFinished: function handleFileUploadFinished() { + this.fileUploadsCount--; + if (this.fileUploadsCount < 1) { + this.fileUploadsCount = 0; + this.isWorking = false; + } + }, /** - * Determine if the field is in readonly mode + * Handle file upload starting */ - isReadonly: function isReadonly() { - return this.field.readonly || _.get(this.field, 'extraAttributes.readonly'); + handleFileUploadStarted: function handleFileUploadStarted() { + this.isWorking = true; + this.fileUploadsCount++; } } -}; +}); /***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ "./vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js": +/*!****************************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _formBackendValidation = __webpack_require__(43); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! form-backend-validation */ "./vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); -exports.default = { +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ props: { errors: { - default: function _default() { - return new _formBackendValidation.Errors(); + "default": function _default() { + return new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(); } } }, - data: function data() { return { - errorClass: 'border-danger' + errorClass: 'form-input-border-error' }; }, - computed: { errorClasses: function errorClasses() { return this.hasError ? [this.errorClass] : []; @@ -3954,129 +896,96 @@ exports.default = { } } } -}; - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true }); -var _regenerator = __webpack_require__(52); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _asyncToGenerator2 = __webpack_require__(51); - -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); - -var _cardSizes = __webpack_require__(42); - -var _cardSizes2 = _interopRequireDefault(_cardSizes); +/***/ }), -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ "./vendor/laravel/nova/resources/js/mixins/HasCards.js": +/*!*************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/HasCards.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -exports.default = { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/filter */ "./vendor/laravel/nova/node_modules/lodash/filter.js"); +/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_filter__WEBPACK_IMPORTED_MODULE_0__); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ props: { loadCards: { type: Boolean, - default: true + "default": true } }, - data: function data() { - return { cards: [] }; + return { + cards: [] + }; }, - /** * Fetch all of the metrics panels for this view */ created: function created() { this.fetchCards(); }, - - watch: { cardsEndpoint: function cardsEndpoint() { this.fetchCards(); } }, - methods: { - fetchCards: function () { - var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() { - var _ref2, cards; - - return _regenerator2.default.wrap(function _callee$(_context) { + fetchCards: function fetchCards() { + var _this = this; + return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { + var _yield$Nova$request$g, cards; + return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - if (!this.loadCards) { + if (!_this.loadCards) { _context.next = 6; break; } - _context.next = 3; - return Nova.request().get(this.cardsEndpoint, { - params: this.extraCardParams + return Nova.request().get(_this.cardsEndpoint, { + params: _this.extraCardParams }); - case 3: - _ref2 = _context.sent; - cards = _ref2.data; - - this.cards = cards; - + _yield$Nova$request$g = _context.sent; + cards = _yield$Nova$request$g.data; + _this.cards = cards; case 6: - case 'end': + case "end": return _context.stop(); } } - }, _callee, this); - })); - - function fetchCards() { - return _ref.apply(this, arguments); - } - - return fetchCards; - }() + }, _callee); + }))(); + } }, - computed: { /** - * Determine whether we have cards to show on the Dashboard + * Determine whether we have cards to show on the Dashboard. */ shouldShowCards: function shouldShowCards() { return this.cards.length > 0; }, - - - /** - * Return the small cards used for the Dashboard - */ - smallCards: function smallCards() { - return _.filter(this.cards, function (c) { - return _cardSizes2.default.indexOf(c.width) !== -1; - }); - }, - - /** - * Return the full-width cards used for the Dashboard + * Determine if the cards array contains some detail-only cards. */ - largeCards: function largeCards() { - return _.filter(this.cards, function (c) { - return c.width == 'full'; - }); + hasDetailOnlyCards: function hasDetailOnlyCards() { + return lodash_filter__WEBPACK_IMPORTED_MODULE_0___default()(this.cards, function (c) { + return c.onlyOnDetail == true; + }).length > 0; }, - - /** * Get the extra card params to pass to the endpoint. */ @@ -4084,803 +993,1145 @@ exports.default = { return null; } } -}; +}); /***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ "./vendor/laravel/nova/resources/js/mixins/Localization.js": +/*!*****************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/Localization.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), +/* harmony export */ "useLocalization": () => (/* binding */ useLocalization) +/* harmony export */ }); +/* harmony import */ var lodash_forEach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/forEach */ "./vendor/laravel/nova/node_modules/lodash/forEach.js"); +/* harmony import */ var lodash_forEach__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_forEach__WEBPACK_IMPORTED_MODULE_0__); + +var mixin = { methods: { /** - * Convert the given localized date time string to the application's timezone. + * Translate the given key. */ - toAppTimezone: function toAppTimezone(value) { - return value ? moment.tz(value, this.userTimezone).clone().tz(Nova.config.timezone).format('YYYY-MM-DD HH:mm:ss') : value; - }, + __: function __(key, replace) { + var translation = Nova.config('translations')[key] ? Nova.config('translations')[key] : key; + lodash_forEach__WEBPACK_IMPORTED_MODULE_0___default()(replace, function (value, key) { + key = new String(key); + if (value === null) { + console.error("Translation '".concat(translation, "' for key '").concat(key, "' contains a null replacement.")); + return; + } + value = new String(value); + var searches = [':' + key, ':' + key.toUpperCase(), ':' + key.charAt(0).toUpperCase() + key.slice(1)]; + var replacements = [value, value.toUpperCase(), value.charAt(0).toUpperCase() + value.slice(1)]; + for (var i = searches.length - 1; i >= 0; i--) { + translation = translation.replace(searches[i], replacements[i]); + } + }); + return translation; + } + } +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mixin); +function useLocalization() { + return { + __: function __(key, replace) { + return mixin.methods.__(key, replace); + } + }; +} +/***/ }), - /** - * Convert the given application timezone date time string to the local timezone. - */ - fromAppTimezone: function fromAppTimezone(value) { - if (!value) { - return value; - } +/***/ "./vendor/laravel/nova/resources/js/mixins/MetricBehavior.js": +/*!*******************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/MetricBehavior.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return moment.tz(value, Nova.config.timezone).clone().tz(this.userTimezone).format('YYYY-MM-DD HH:mm:ss'); - }, +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + created: function created() { + Nova.$on('metric-refresh', this.fetch); + Nova.$on('resources-deleted', this.fetch); + Nova.$on('resources-restored', this.fetch); + if (this.card.refreshWhenActionRuns) { + Nova.$on('action-executed', this.fetch); + } + }, + beforeUnmount: function beforeUnmount() { + Nova.$off('metric-refresh', this.fetch); + Nova.$off('resources-deleted', this.fetch); + Nova.$off('resources-restored', this.fetch); + Nova.$off('action-executed', this.fetch); + } +}); + +/***/ }), +/***/ "./vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js": +/*!****************************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ "./vendor/laravel/nova/node_modules/vuex/dist/vuex.esm-bundler.js"); +/* harmony import */ var _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia */ "./vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + created: function created() { + var _this = this; + this.removeOnNavigationChangesEvent = _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.on('before', function (event) { + _this.removeOnNavigationChangesEvent(); + _this.handlePreventFormAbandonmentOnInertia(event); + }); + window.addEventListener('beforeunload', this.handlePreventFormAbandonmentOnInertia); + this.removeOnBeforeUnloadEvent = function () { + window.removeEventListener('beforeunload', _this.handlePreventFormAbandonmentOnInertia); + _this.removeOnBeforeUnloadEvent = function () {}; + }; + }, + mounted: function mounted() { + var _this2 = this; + window.onpopstate = function (event) { + _this2.handlePreventFormAbandonmentOnPopState(event); + }; + }, + beforeUnmount: function beforeUnmount() { + this.removeOnBeforeUnloadEvent(); + }, + unmounted: function unmounted() { + this.removeOnNavigationChangesEvent(); + this.resetPushState(); + }, + data: function data() { + return { + removeOnNavigationChangesEvent: null, + removeOnBeforeUnloadEvent: null + }; + }, + methods: _objectSpread(_objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_1__.mapMutations)(['allowLeavingForm', 'preventLeavingForm', 'triggerPushState', 'resetPushState'])), {}, { /** - * Get the localized date time for the given field. + * Prevent accidental abandonment only if form was changed. */ - localizeDateTimeField: function localizeDateTimeField(field) { - if (!field.value) { - return field.value; + updateFormStatus: function updateFormStatus() { + if (this.canLeaveForm == true) { + this.triggerPushState(); } - - var localized = moment.tz(field.value, Nova.config.timezone).clone().tz(this.userTimezone); - - if (field.format) { - return localized.format(field.format); + this.preventLeavingForm(); + }, + handlePreventFormAbandonment: function handlePreventFormAbandonment(proceed, revert) { + if (this.canLeaveForm) { + proceed(); + return; } - - return this.usesTwelveHourTime ? localized.format('YYYY-MM-DD h:mm:ss A') : localized.format('YYYY-MM-DD HH:mm:ss'); + var answer = window.confirm(this.__('Do you really want to leave? You have unsaved changes.')); + if (answer) { + proceed(); + return; + } + revert(); }, - - - /** - * Get the localized date for the given field. - */ - localizeDateField: function localizeDateField(field) { - if (!field.value) { - return field.value; + handlePreventFormAbandonmentOnInertia: function handlePreventFormAbandonmentOnInertia(event) { + var _this3 = this; + this.handlePreventFormAbandonment(function () { + _this3.handleProceedingToNextPage(); + _this3.allowLeavingForm(); + }, function () { + _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = true; + event.preventDefault(); + event.returnValue = ''; + _this3.removeOnNavigationChangesEvent = _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.on('before', function (event) { + _this3.removeOnNavigationChangesEvent(); + _this3.handlePreventFormAbandonmentOnInertia(event); + }); + }); + }, + handlePreventFormAbandonmentOnPopState: function handlePreventFormAbandonmentOnPopState(event) { + var _this4 = this; + event.stopImmediatePropagation(); + event.stopPropagation(); + this.handlePreventFormAbandonment(function () { + _this4.handleProceedingToPreviousPage(); + _this4.allowLeavingForm(); + }, function () { + _this4.triggerPushState(); + }); + }, + handleProceedingToPreviousPage: function handleProceedingToPreviousPage() { + window.onpopstate = null; + _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = false; + this.removeOnBeforeUnloadEvent(); + if (!this.canLeaveFormToPreviousPage) { + window.history.back(); } + }, + handleProceedingToNextPage: function handleProceedingToNextPage() { + window.onpopstate = null; + _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = false; + this.removeOnBeforeUnloadEvent(); + } + }), + computed: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_1__.mapGetters)(['canLeaveForm', 'canLeaveFormToPreviousPage'])) +}); - var localized = moment.tz(field.value, Nova.config.timezone).clone().tz(this.userTimezone); +/***/ }), - if (field.format) { - return localized.format(field.format); - } +/***/ "./vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js": +/*!*****************************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return localized.format('YYYY-MM-DD'); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ "./vendor/laravel/nova/node_modules/vuex/dist/vuex.esm-bundler.js"); +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + props: { + show: { + type: Boolean, + "default": false } }, - - computed: { + methods: _objectSpread(_objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapMutations)(['allowLeavingModal', 'preventLeavingModal'])), {}, { /** - * Get the user's local timezone. + * Prevent accidental abandonment only if form was changed. */ - userTimezone: function userTimezone() { - return Nova.config.userTimezone ? Nova.config.userTimezone : moment.tz.guess(); + updateModalStatus: function updateModalStatus() { + this.preventLeavingModal(); }, - - - /** - * Determine if the user is used to 12 hour time. - */ - usesTwelveHourTime: function usesTwelveHourTime() { - return _.endsWith(new Date().toLocaleString(), 'AM') || _.endsWith(new Date().toLocaleString(), 'PM'); + handlePreventModalAbandonment: function handlePreventModalAbandonment(proceed, revert) { + if (this.canLeaveModal) { + proceed(); + return; + } + var answer = window.confirm(this.__('Do you really want to leave? You have unsaved changes.')); + if (answer) { + this.allowLeavingModal(); + proceed(); + return; + } + revert(); } - } -}; + }), + computed: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapGetters)(['canLeaveModal'])) +}); /***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./vendor/laravel/nova/resources/js/mixins/packages.js": +/*!*************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/packages.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "CopiesToClipboard": () => (/* reexport safe */ _CopiesToClipboard__WEBPACK_IMPORTED_MODULE_1__["default"]), +/* harmony export */ "DependentFormField": () => (/* reexport safe */ _DependentFormField__WEBPACK_IMPORTED_MODULE_4__["default"]), +/* harmony export */ "Errors": () => (/* reexport safe */ form_backend_validation__WEBPACK_IMPORTED_MODULE_15__.Errors), +/* harmony export */ "FieldValue": () => (/* reexport safe */ _FieldValue__WEBPACK_IMPORTED_MODULE_9__["default"]), +/* harmony export */ "FormEvents": () => (/* reexport safe */ _FormEvents__WEBPACK_IMPORTED_MODULE_10__["default"]), +/* harmony export */ "FormField": () => (/* reexport safe */ _FormField__WEBPACK_IMPORTED_MODULE_11__["default"]), +/* harmony export */ "HandlesFormRequest": () => (/* reexport safe */ _HandlesFormRequest__WEBPACK_IMPORTED_MODULE_5__["default"]), +/* harmony export */ "HandlesPanelVisibility": () => (/* reexport safe */ _HandlesPanelVisibility__WEBPACK_IMPORTED_MODULE_14__["default"]), +/* harmony export */ "HandlesUploads": () => (/* reexport safe */ _HandlesUploads__WEBPACK_IMPORTED_MODULE_6__["default"]), +/* harmony export */ "HandlesValidationErrors": () => (/* reexport safe */ _HandlesValidationErrors__WEBPACK_IMPORTED_MODULE_12__["default"]), +/* harmony export */ "HasCards": () => (/* reexport safe */ _HasCards__WEBPACK_IMPORTED_MODULE_13__["default"]), +/* harmony export */ "Localization": () => (/* reexport safe */ _Localization__WEBPACK_IMPORTED_MODULE_7__["default"]), +/* harmony export */ "MetricBehavior": () => (/* reexport safe */ _MetricBehavior__WEBPACK_IMPORTED_MODULE_8__["default"]), +/* harmony export */ "PreventsFormAbandonment": () => (/* reexport safe */ _PreventsFormAbandonment__WEBPACK_IMPORTED_MODULE_2__["default"]), +/* harmony export */ "PreventsModalAbandonment": () => (/* reexport safe */ _PreventsModalAbandonment__WEBPACK_IMPORTED_MODULE_3__["default"]), +/* harmony export */ "mapProps": () => (/* reexport safe */ _propTypes__WEBPACK_IMPORTED_MODULE_0__.mapProps) +/* harmony export */ }); +/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./propTypes */ "./vendor/laravel/nova/resources/js/mixins/propTypes.js"); +/* harmony import */ var _CopiesToClipboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CopiesToClipboard */ "./vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js"); +/* harmony import */ var _PreventsFormAbandonment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PreventsFormAbandonment */ "./vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js"); +/* harmony import */ var _PreventsModalAbandonment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreventsModalAbandonment */ "./vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js"); +/* harmony import */ var _DependentFormField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DependentFormField */ "./vendor/laravel/nova/resources/js/mixins/DependentFormField.js"); +/* harmony import */ var _HandlesFormRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HandlesFormRequest */ "./vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js"); +/* harmony import */ var _HandlesUploads__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HandlesUploads */ "./vendor/laravel/nova/resources/js/mixins/HandlesUploads.js"); +/* harmony import */ var _Localization__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Localization */ "./vendor/laravel/nova/resources/js/mixins/Localization.js"); +/* harmony import */ var _MetricBehavior__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./MetricBehavior */ "./vendor/laravel/nova/resources/js/mixins/MetricBehavior.js"); +/* harmony import */ var _FieldValue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FieldValue */ "./vendor/laravel/nova/resources/js/mixins/FieldValue.js"); +/* harmony import */ var _FormEvents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FormEvents */ "./vendor/laravel/nova/resources/js/mixins/FormEvents.js"); +/* harmony import */ var _FormField__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FormField */ "./vendor/laravel/nova/resources/js/mixins/FormField.js"); +/* harmony import */ var _HandlesValidationErrors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HandlesValidationErrors */ "./vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js"); +/* harmony import */ var _HasCards__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./HasCards */ "./vendor/laravel/nova/resources/js/mixins/HasCards.js"); +/* harmony import */ var _HandlesPanelVisibility__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./HandlesPanelVisibility */ "./vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js"); +/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! form-backend-validation */ "./vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _defaults = __webpack_require__(227); -var _defaults2 = _interopRequireDefault(_defaults); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = { - methods: { - /** - * Update the given query string values. - */ - updateQueryString: function updateQueryString(value) { - this.$router.push({ query: (0, _defaults2.default)(value, this.$route.query) }); - } - } -}; -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - computed: { - /** - * Get the resource information object for the current resource. - */ - resourceInformation: function resourceInformation() { - var _this = this; - return _.find(Nova.config.resources, function (resource) { - return resource.uriKey == _this.resourceName; - }); - }, - /** - * Get the resource information object for the current resource. - */ - viaResourceInformation: function viaResourceInformation() { - var _this2 = this; - if (!this.viaResource) { - return; - } - return _.find(Nova.config.resources, function (resource) { - return resource.uriKey == _this2.viaResource; - }); - }, - /** - * Determine if the user is authorized to create the current resource. - */ - authorizedToCreate: function authorizedToCreate() { - return this.resourceInformation.authorizedToCreate; +/***/ }), + +/***/ "./vendor/laravel/nova/resources/js/mixins/propTypes.js": +/*!**************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/mixins/propTypes.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "mapProps": () => (/* binding */ mapProps) +/* harmony export */ }); +/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ "./vendor/laravel/nova/node_modules/lodash/pick.js"); +/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__); + +var propTypes = { + preventInitialLoading: { + type: Boolean, + "default": false + }, + showHelpText: { + type: Boolean, + "default": false + }, + shownViaNewRelationModal: { + type: Boolean, + "default": false + }, + resourceId: { + type: [Number, String] + }, + resourceName: { + type: String + }, + relatedResourceId: { + type: [Number, String] + }, + relatedResourceName: { + type: String + }, + field: { + type: Object, + required: true + }, + viaResource: { + type: String, + required: false + }, + viaResourceId: { + type: [String, Number], + required: false + }, + viaRelationship: { + type: String, + required: false + }, + relationshipType: { + type: String, + "default": '' + }, + shouldOverrideMeta: { + type: Boolean, + "default": false + }, + disablePagination: { + type: Boolean, + "default": false + }, + clickAction: { + type: String, + "default": 'view', + validator: function validator(val) { + return ['edit', 'select', 'ignore', 'detail'].includes(val); + } + }, + mode: { + type: String, + "default": 'form', + validator: function validator(v) { + return ['form', 'modal'].includes(v); } } }; +function mapProps(attributes) { + return lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(propTypes, attributes); +} /***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +/***/ "./vendor/laravel/nova/resources/js/util/escapeUnicode.js": +/*!****************************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/util/escapeUnicode.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "escapeUnicode": () => (/* binding */ escapeUnicode) +/* harmony export */ }); +function escapeUnicode(str) { + return str.replace(/[^\0-~]/g, function (c) { + return "\\u" + ('000' + c.charCodeAt().toString(16)).slice(-4); + }); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), -var _defineProperty2 = __webpack_require__(26); +/***/ "./vendor/laravel/nova/resources/js/util/filled.js": +/*!*********************************************************!*\ + !*** ./vendor/laravel/nova/resources/js/util/filled.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var _defineProperty3 = _interopRequireDefault(_defineProperty2); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ filled) +/* harmony export */ }); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isNil */ "./vendor/laravel/nova/node_modules/lodash/isNil.js"); +/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_0__); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function filled(value) { + return !lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(value) && value !== ''; +} -exports.default = { - methods: { - /** - * Select the previous page. - */ - selectPreviousPage: function selectPreviousPage() { - this.updateQueryString((0, _defineProperty3.default)({}, this.pageParameter, this.currentPage - 1)); - }, +/***/ }), +/***/ "./node_modules/vue-loader/dist/exportHelper.js": +/*!******************************************************!*\ + !*** ./node_modules/vue-loader/dist/exportHelper.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, exports) => { - /** - * Select the next page. - */ - selectNextPage: function selectNextPage() { - this.updateQueryString((0, _defineProperty3.default)({}, this.pageParameter, this.currentPage + 1)); - } - }, +"use strict"; - computed: { - /** - * Get the current page from the query string. - */ - currentPage: function currentPage() { - return parseInt(this.$route.query[this.pageParameter] || 1); +Object.defineProperty(exports, "__esModule", ({ value: true })); +// runtime helper for setting properties on components +// in a tree-shakable way +exports["default"] = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; } - } + return target; }; + /***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./resources/js/components/DetailField.vue": +/*!*************************************************!*\ + !*** ./resources/js/components/DetailField.vue ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _DetailField_vue_vue_type_template_id_0224618e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DetailField.vue?vue&type=template&id=0224618e */ "./resources/js/components/DetailField.vue?vue&type=template&id=0224618e"); +/* harmony import */ var _DetailField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DetailField.vue?vue&type=script&lang=js */ "./resources/js/components/DetailField.vue?vue&type=script&lang=js"); +/* harmony import */ var _Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _defineProperty2 = __webpack_require__(26); -var _defineProperty3 = _interopRequireDefault(_defineProperty2); +; +const __exports__ = /*#__PURE__*/(0,_Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_DetailField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_DetailField_vue_vue_type_template_id_0224618e__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/DetailField.vue"]]) +/* hot reload */ +if (false) {} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = { - data: function data() { - return { perPage: 25 }; - }, +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__); - methods: { - /** - * Sync the per page values from the query string. - */ - initializePerPageFromQueryString: function initializePerPageFromQueryString() { - this.perPage = this.currentPerPage; - }, +/***/ }), +/***/ "./resources/js/components/FormField.vue": +/*!***********************************************!*\ + !*** ./resources/js/components/FormField.vue ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - /** - * Update the desired amount of resources per page. - */ - perPageChanged: function perPageChanged() { - this.updateQueryString((0, _defineProperty3.default)({}, this.perPageParameter, this.perPage)); - } - }, +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _FormField_vue_vue_type_template_id_c023248a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormField.vue?vue&type=template&id=c023248a */ "./resources/js/components/FormField.vue?vue&type=template&id=c023248a"); +/* harmony import */ var _FormField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormField.vue?vue&type=script&lang=js */ "./resources/js/components/FormField.vue?vue&type=script&lang=js"); +/* harmony import */ var _Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js"); + + + + +; +const __exports__ = /*#__PURE__*/(0,_Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_FormField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_FormField_vue_vue_type_template_id_c023248a__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/FormField.vue"]]) +/* hot reload */ +if (false) {} - computed: { - /** - * Get the current per page value from the query string. - */ - currentPerPage: function currentPerPage() { - return this.$route.query[this.perPageParameter] || 25; - } - } -}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__); /***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./resources/js/components/IndexField.vue": +/*!************************************************!*\ + !*** ./resources/js/components/IndexField.vue ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _IndexField_vue_vue_type_template_id_9e63f81a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndexField.vue?vue&type=template&id=9e63f81a */ "./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a"); +/* harmony import */ var _IndexField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IndexField.vue?vue&type=script&lang=js */ "./resources/js/components/IndexField.vue?vue&type=script&lang=js"); +/* harmony import */ var _Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _debounce = __webpack_require__(226); -var _debounce2 = _interopRequireDefault(_debounce); +; +const __exports__ = /*#__PURE__*/(0,_Users_skullbock_Workspace_laravel_ecommerce_nova_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_IndexField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_IndexField_vue_vue_type_template_id_9e63f81a__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/IndexField.vue"]]) +/* hot reload */ +if (false) {} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = { - data: function data() { - return { - search: '', - selectedResource: '', - availableResources: [] - }; - }, +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__); - methods: { - /** - * Set the currently selected resource - */ - selectResource: function selectResource(resource) { - this.selectedResource = resource; - }, +/***/ }), +/***/ "./resources/js/components/DetailField.vue?vue&type=script&lang=js": +/*!*************************************************************************!*\ + !*** ./resources/js/components/DetailField.vue?vue&type=script&lang=js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - /** - * Handle the search box being cleared. - */ - handleSearchCleared: function handleSearchCleared() { - this.availableResources = []; - }, +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DetailField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DetailField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DetailField.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=script&lang=js"); + +/***/ }), - /** - * Clear the selected resource and availableResources - */ - clearSelection: function clearSelection() { - this.selectedResource = ''; - this.availableResources = []; - }, +/***/ "./resources/js/components/FormField.vue?vue&type=script&lang=js": +/*!***********************************************************************!*\ + !*** ./resources/js/components/FormField.vue?vue&type=script&lang=js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./FormField.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js"); + - /** - * Perform a search to get the relatable resources. - */ - performSearch: function performSearch(search) { - var _this = this; +/***/ }), - this.search = search; +/***/ "./resources/js/components/IndexField.vue?vue&type=script&lang=js": +/*!************************************************************************!*\ + !*** ./resources/js/components/IndexField.vue?vue&type=script&lang=js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - var trimmedSearch = search.trim(); - // If the user performs an empty search, it will load all the results - // so let's just set the availableResources to an empty array to avoid - // loading a huge result set - if (trimmedSearch == '') { - return; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IndexField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IndexField_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IndexField.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=script&lang=js"); + - this.debouncer(function () { - _this.getAvailableResources(trimmedSearch); - }, 500); - }, +/***/ }), + +/***/ "./resources/js/components/DetailField.vue?vue&type=template&id=0224618e": +/*!*******************************************************************************!*\ + !*** ./resources/js/components/DetailField.vue?vue&type=template&id=0224618e ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DetailField_vue_vue_type_template_id_0224618e__WEBPACK_IMPORTED_MODULE_0__.render) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DetailField_vue_vue_type_template_id_0224618e__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DetailField.vue?vue&type=template&id=0224618e */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/DetailField.vue?vue&type=template&id=0224618e"); - /** - * Debounce function for the search handler - */ - debouncer: (0, _debounce2.default)(function (callback) { - return callback(); - }, 500) - } -}; /***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./resources/js/components/FormField.vue?vue&type=template&id=c023248a": +/*!*****************************************************************************!*\ + !*** ./resources/js/components/FormField.vue?vue&type=template&id=c023248a ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormField_vue_vue_type_template_id_c023248a__WEBPACK_IMPORTED_MODULE_0__.render) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_FormField_vue_vue_type_template_id_c023248a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./FormField.vue?vue&type=template&id=c023248a */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=template&id=c023248a"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - data: function data() { - return { - withTrashed: false - }; - }, +/***/ }), - methods: { - /** - * Toggle the trashed state of the search - */ - toggleWithTrashed: function toggleWithTrashed() { - this.withTrashed = !this.withTrashed; - }, +/***/ "./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a": +/*!******************************************************************************!*\ + !*** ./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IndexField_vue_vue_type_template_id_9e63f81a__WEBPACK_IMPORTED_MODULE_0__.render) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_IndexField_vue_vue_type_template_id_9e63f81a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./IndexField.vue?vue&type=template&id=9e63f81a */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/IndexField.vue?vue&type=template&id=9e63f81a"); - /** - * Enable searching for trashed resources - */ - enableWithTrashed: function enableWithTrashed() { - this.withTrashed = true; - }, +/***/ }), + +/***/ "./vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js": +/*!***************************************************************************!*\ + !*** ./vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(__webpack_require__(/*! axios */ "./vendor/laravel/nova/node_modules/axios/index.js")),n=__webpack_require__(/*! qs */ "./vendor/laravel/nova/node_modules/qs/lib/index.js"),i=e(__webpack_require__(/*! deepmerge */ "./vendor/laravel/nova/node_modules/deepmerge/dist/cjs.js"));function r(){return(r=Object.assign||function(e){for(var t=1;t0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},n.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(function(){t.restoreScrollPositions(),m(e)})},n.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,p(window.location).href===p(e).href&&window.location.reload()}catch(e){return!1}},n.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},n.handleLocationVisit=function(e){var t,n,i,r,o=this,s=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(n=window.history.state)?void 0:n.rememberedState)?t:{},e.scrollRegions=null!=(i=null==(r=window.history.state)?void 0:r.scrollRegions)?i:[],this.setPage(e,{preserveScroll:s.preserveScroll,preserveState:!0}).then(function(){s.preserveScroll&&o.restoreScrollPositions(),m(e)})},n.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},n.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},n.createVisitId=function(){return this.visitId={},this.visitId},n.cancelVisit=function(e,t){var n=t.cancelled,i=void 0!==n&&n,r=t.interrupted,o=void 0!==r&&r;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=o,v(e),e.onFinish(e))},n.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,v(e),e.onFinish(e))},n.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},n.visit=function(e,n){var i=this,o=void 0===n?{}:n,a=o.method,l=void 0===a?exports.Method.GET:a,d=o.data,v=void 0===d?{}:d,m=o.replace,g=void 0!==m&&m,w=o.preserveScroll,y=void 0!==w&&w,S=o.preserveState,b=void 0!==S&&S,E=o.only,P=void 0===E?[]:E,I=o.headers,x=void 0===I?{}:I,V=o.errorBag,T=void 0===V?"":V,L=o.forceFormData,O=void 0!==L&&L,k=o.onCancelToken,C=void 0===k?function(){}:k,M=o.onBefore,A=void 0===M?function(){}:M,F=o.onStart,R=void 0===F?function(){}:F,j=o.onProgress,D=void 0===j?function(){}:j,B=o.onFinish,q=void 0===B?function(){}:B,N=o.onCancel,H=void 0===N?function(){}:N,W=o.onSuccess,G=void 0===W?function(){}:W,U=o.onError,X=void 0===U?function(){}:U,J=o.queryStringArrayFormat,K=void 0===J?"brackets":J,_="string"==typeof e?u(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(function(t){return e(t)})||"object"==typeof t&&null!==t&&Object.values(t).some(function(t){return e(t)})}(v)&&!O||v instanceof FormData||(v=c(v)),!(v instanceof FormData)){var z=h(l,_,v,K),Q=z[1];_=u(z[0]),v=Q}var Y={url:_,method:l,data:v,replace:g,preserveScroll:y,preserveState:b,only:P,headers:x,errorBag:T,forceFormData:O,queryStringArrayFormat:K,cancelled:!1,completed:!1,interrupted:!1};if(!1!==A(Y)&&function(e){return f("before",{cancelable:!0,detail:{visit:e}})}(Y)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=r({},Y,{onCancelToken:C,onBefore:A,onStart:R,onProgress:D,onFinish:q,onCancel:H,onSuccess:G,onError:X,queryStringArrayFormat:K,cancelToken:t.CancelToken.source()}),C({cancel:function(){i.activeVisit&&i.cancelVisit(i.activeVisit,{cancelled:!0})}}),function(e){f("start",{detail:{visit:e}})}(Y),R(Y),t({method:l,url:p(_).href,data:l===exports.Method.GET?{}:v,params:l===exports.Method.GET?v:{},cancelToken:this.activeVisit.cancelToken.token,headers:r({},x,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},P.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":P.join(",")}:{},T&&T.length?{"X-Inertia-Error-Bag":T}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){v instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){f("progress",{detail:{progress:e}})}(e),D(e))}}).then(function(e){var t;if(!i.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;P.length&&n.component===i.page.component&&(n.props=r({},i.page.props,n.props)),y=i.resolvePreserveOption(y,n),(b=i.resolvePreserveOption(b,n))&&null!=(t=window.history.state)&&t.rememberedState&&n.component===i.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=_,s=u(n.url);return o.hash&&!s.hash&&p(o).href===s.href&&(s.hash=o.hash,n.url=s.href),i.setPage(n,{visitId:Z,replace:g,preserveScroll:y,preserveState:b})}).then(function(){var e=i.page.props.errors||{};if(Object.keys(e).length>0){var t=T?e[T]?e[T]:{}:e;return function(e){f("error",{detail:{errors:e}})}(t),X(t)}return f("success",{detail:{page:i.page}}),G(i.page)}).catch(function(e){if(i.isInertiaResponse(e.response))return i.setPage(e.response.data,{visitId:Z});if(i.isLocationVisitResponse(e.response)){var t=u(e.response.headers["x-inertia-location"]),n=_;n.hash&&!t.hash&&p(n).href===t.href&&(t.hash=n.hash),i.locationVisit(t,!0===y)}else{if(!e.response)return Promise.reject(e);f("invalid",{cancelable:!0,detail:{response:e.response}})&&s.show(e.response.data)}}).then(function(){i.activeVisit&&i.finishVisit(i.activeVisit)}).catch(function(e){if(!t.isCancel(e)){var n=f("exception",{cancelable:!0,detail:{exception:e}});if(i.activeVisit&&i.finishVisit(i.activeVisit),n)return Promise.reject(e)}})}},n.setPage=function(e,t){var n=this,i=void 0===t?{}:t,r=i.visitId,o=void 0===r?this.createVisitId():r,s=i.replace,a=void 0!==s&&s,c=i.preserveScroll,l=void 0!==c&&c,d=i.preserveState,h=void 0!==d&&d;return Promise.resolve(this.resolveComponent(e.component)).then(function(t){o===n.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(a=a||u(e.url).href===window.location.href)?n.replaceState(e):n.pushState(e),n.swapComponent({component:t,page:e,preserveState:h}).then(function(){l||n.resetScrollPositions(),a||m(e)}))})},n.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},n.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},n.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var n=e.state,i=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then(function(e){i===t.visitId&&(t.page=n,t.swapComponent({component:e,page:n,preserveState:!1}).then(function(){t.restoreScrollPositions(),m(n)}))})}else{var o=u(this.page.url);o.hash=window.location.hash,this.replaceState(r({},this.page,{url:o.href})),this.resetScrollPositions()}},n.get=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({},n,{method:exports.Method.GET,data:t}))},n.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,r({},e,{preserveScroll:!0,preserveState:!0}))},n.replace=function(e,t){var n;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=t.method)?n:"get")+"() instead."),this.visit(e,r({preserveState:!0},t,{replace:!0}))},n.post=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.POST,data:t}))},n.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PUT,data:t}))},n.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PATCH,data:t}))},n.delete=function(e,t){return void 0===t&&(t={}),this.visit(e,r({preserveState:!0},t,{method:exports.Method.DELETE}))},n.remember=function(e,t){var n,i;void 0===t&&(t="default"),g||this.replaceState(r({},this.page,{rememberedState:r({},null==(n=this.page)?void 0:n.rememberedState,(i={},i[t]=e,i))}))},n.restore=function(e){var t,n;if(void 0===e&&(e="default"),!g)return null==(t=window.history.state)||null==(n=t.rememberedState)?void 0:n[e]},n.on=function(e,t){var n=function(e){var n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()};return document.addEventListener("inertia:"+e,n),function(){return document.removeEventListener("inertia:"+e,n)}},e}(),y={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var n=t.content.firstChild;if(!e.startsWith(" diff --git a/resources/js/tool.js b/resources/js/tool.js index 2827191..a69587b 100644 --- a/resources/js/tool.js +++ b/resources/js/tool.js @@ -1,5 +1,4 @@ -Nova.booting((Vue, router) => { - Nova.inertia("ManageOrderTool", require("./components/Tool").default); - - Vue.component('manage-order-tool', require('./components/Tool')); +import Tool from './components/Tool' +Nova.booting((app, store) => { + app.component('manage-order-tool', Tool); }) diff --git a/src/ManageOrderTool.php b/src/ManageOrderTool.php index 633d0a8..f0595ce 100644 --- a/src/ManageOrderTool.php +++ b/src/ManageOrderTool.php @@ -53,7 +53,7 @@ public function name() */ public function component() { - return 'workflow'; + return 'manage-order-tool'; } /** diff --git a/src/ToolServiceProvider.php b/src/ToolServiceProvider.php index 3c9866a..ab6c799 100644 --- a/src/ToolServiceProvider.php +++ b/src/ToolServiceProvider.php @@ -40,7 +40,7 @@ protected function routes() return; } - Route::middleware(['nova', Authorize::class]) + Route::middleware(['nova']) ->prefix('nova-vendor/weble/laravel-ecommerce-nova') ->group(__DIR__.'/../routes/api.php'); } @@ -52,6 +52,11 @@ protected function routes() */ public function register() { - // + Nova::router() + ->group(function ($router) { + $router->get('manage-order-tool', function ($request) { + return inertia('ManageOrderTool'); + }); + }); } }