UNPKG

active-page-vue

Version:

A Vue-based visual page editor component

1,478 lines (1,386 loc) 6.85 MB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("vue")); else if(typeof define === 'function' && define.amd) define("AsEditor", [], factory); else if(typeof exports === 'object') exports["AsEditor"] = factory(require("vue")); else root["AsEditor"] = factory(root["Vue"]); })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) { return /******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ 0: 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { /******/ return __webpack_require__.p + "as-editor.common." + ({}[chunkId]||chunkId) + ".js" /******/ } /******/ /******/ // 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; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ var promises = []; /******/ /******/ /******/ // JSONP chunk loading for javascript /******/ /******/ var installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ // setup Promise in chunk cache /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var script = document.createElement('script'); /******/ var onScriptComplete; /******/ /******/ script.charset = 'utf-8'; /******/ script.timeout = 120; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = jsonpScriptSrc(chunkId); /******/ /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ onScriptComplete = function (event) { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ chunk[1](error); /******/ } /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ var timeout = setTimeout(function(){ /******/ onScriptComplete({ type: 'timeout', target: script }); /******/ }, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ document.head.appendChild(script); /******/ } /******/ } /******/ return Promise.all(promises); /******/ }; /******/ /******/ // 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, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // 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 = ""; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ /******/ var jsonpArray = (typeof self !== 'undefined' ? self : this)["webpackJsonpAsEditor"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpAsEditor"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fb15"); /******/ }) /************************************************************************/ /******/ ({ /***/ "007a": /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, "#followStyle[data-v-81fdfada]{width:100%;position:absolute;left:0;top:0;padding:0 10px 20px;-webkit-box-sizing:border-box;box-sizing:border-box}h2[data-v-81fdfada]{padding:24px 16px 24px 0;margin-bottom:15px;border-bottom:1px solid #f2f4f6;font-size:18px;font-weight:600;color:#323233}.lef[data-v-81fdfada] .el-form-item__label{text-align:left}.follow-pic[data-v-81fdfada]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.follow-pic img[data-v-81fdfada]{display:block;width:50px;height:50px;border-radius:50%}.follow-pic .uploadImg[data-v-81fdfada]{width:80%;margin-top:20px}", ""]); // Exports module.exports = exports; /***/ }), /***/ "00ee": /***/ (function(module, exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "0122": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a0c9a87-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/rightslider/noticestyle/index.vue?vue&type=template&id=989ee180&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"noticestyle"},[_c('h2',[_vm._v(_vm._s(_vm.datas.text))]),_c('el-form',{staticClass:"lef",attrs:{"label-width":"90px","model":_vm.datas,"rules":_vm.rules,"size":"small"}},[_c('el-form-item',{attrs:{"label":"公告","hide-required-asterisk":true,"prop":"noticeText"}},[_c('el-input',{attrs:{"placeholder":"请输入公告"},model:{value:(_vm.datas.noticeText),callback:function ($$v) {_vm.$set(_vm.datas, "noticeText", $$v)},expression:"datas.noticeText"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"背景颜色"}},[_c('el-color-picker',{staticClass:"picke",attrs:{"show-alpha":"","predefine":_vm.predefineColors},model:{value:(_vm.datas.backColor),callback:function ($$v) {_vm.$set(_vm.datas, "backColor", $$v)},expression:"datas.backColor"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"文字颜色"}},[_c('el-color-picker',{staticClass:"picke",attrs:{"show-alpha":"","predefine":_vm.predefineColors},model:{value:(_vm.datas.textColor),callback:function ($$v) {_vm.$set(_vm.datas, "textColor", $$v)},expression:"datas.textColor"}})],1)],1)],1)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/components/rightslider/noticestyle/index.vue?vue&type=template&id=989ee180&scoped=true& // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/rightslider/noticestyle/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var noticestylevue_type_script_lang_js_ = ({ name: 'noticestyle', props: { datas: Object }, data: function data() { return { rules: { //校验表单输入 noticeText: [//页面名称 { required: true, message: '请输入公告', trigger: 'blur' }] }, predefineColors: [// 颜色选择器预设 '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', '#409EFF', '#909399', '#C0C4CC', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', 'hsla(209, 100%, 56%, 0.73)', '#c7158577'] }; } }); // CONCATENATED MODULE: ./src/components/rightslider/noticestyle/index.vue?vue&type=script&lang=js& /* harmony default export */ var rightslider_noticestylevue_type_script_lang_js_ = (noticestylevue_type_script_lang_js_); // EXTERNAL MODULE: ./src/components/rightslider/noticestyle/index.vue?vue&type=style&index=0&id=989ee180&scoped=true&lang=less& var noticestylevue_type_style_index_0_id_989ee180_scoped_true_lang_less_ = __webpack_require__("ced8"); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("2877"); // CONCATENATED MODULE: ./src/components/rightslider/noticestyle/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( rightslider_noticestylevue_type_script_lang_js_, render, staticRenderFns, false, null, "989ee180", null ) /* harmony default export */ var noticestyle = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "013c": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a0c9a87-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/componentscom/communitypowder/index.vue?vue&type=template&id=0ae2f176&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"communitypowder"},[_c('section',{staticClass:"powder",style:({ background: _vm.datas.backColor })},[_c('div',{staticClass:"container"},[_c('div',{staticClass:"lef"},[(!_vm.datas.mainImg)?_c('img',{attrs:{"draggable":"false","src":__webpack_require__("52a0"),"alt":""}}):_c('img',{attrs:{"draggable":"false","src":_vm.datas.mainImg,"alt":""}}),_c('div',{staticClass:"text"},[_c('p',{staticClass:"first"},[_vm._v(_vm._s(_vm.datas.title))]),_c('p',{staticClass:"last"},[_vm._v(_vm._s(_vm.datas.describe))])])]),_c('van-button',{staticClass:"rig",attrs:{"type":"danger","size":"small","color":"#f44"}},[_vm._v(_vm._s(_vm.datas.buttonName))])],1)]),_vm._t("deles")],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/components/componentscom/communitypowder/index.vue?vue&type=template&id=0ae2f176&scoped=true& // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/componentscom/communitypowder/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var communitypowdervue_type_script_lang_js_ = ({ name: 'communitypowder', props: { datas: Object } }); // CONCATENATED MODULE: ./src/components/componentscom/communitypowder/index.vue?vue&type=script&lang=js& /* harmony default export */ var componentscom_communitypowdervue_type_script_lang_js_ = (communitypowdervue_type_script_lang_js_); // EXTERNAL MODULE: ./src/components/componentscom/communitypowder/index.vue?vue&type=style&index=0&id=0ae2f176&scoped=true&lang=less& var communitypowdervue_type_style_index_0_id_0ae2f176_scoped_true_lang_less_ = __webpack_require__("f7a8"); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("2877"); // CONCATENATED MODULE: ./src/components/componentscom/communitypowder/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( componentscom_communitypowdervue_type_script_lang_js_, render, staticRenderFns, false, null, "0ae2f176", null ) /* harmony default export */ var communitypowder = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "0160": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_004f62ec_scoped_true_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("576e"); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_004f62ec_scoped_true_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_004f62ec_scoped_true_lang_less___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /***/ }), /***/ "02c2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a0c9a87-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/rightslider/listswitchingstyle/index.vue?vue&type=template&id=0f2d683a&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"listswitchingstyle"},[_c('h2',[_vm._v(_vm._s(_vm.datas.text))]),_c('el-form',{attrs:{"label-width":"80px","model":_vm.datas,"size":"small","rules":_vm.rules}},[_c('el-form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype !== 2),expression:"datas.commoditylisttype !== 2"}],staticClass:"lef",attrs:{"label":"选择模板"}},[_c('p',{staticStyle:{"color":"#000"}},[_vm._v(_vm._s(_vm.styleText))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype !== 2),expression:"datas.commoditylisttype !== 2"}],staticClass:"commodityType"},_vm._l((_vm.commodityTypes),function(item,index){return _c('el-tooltip',{key:index,staticClass:"item",attrs:{"effect":"dark","content":item.content,"placement":"bottom"}},[_c('span',{staticClass:"iconfont",class:[ item.type === _vm.datas.commodityType ? 'active' : '', item.icon ],staticStyle:{"font-size":"21px"},on:{"click":function($event){_vm.datas.commodityType = index}}})])}),1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype !== 2),expression:"datas.commoditylisttype !== 2"}],staticClass:"bor"}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"商品类型"}},[_c('el-radio-group',{model:{value:(_vm.datas.commoditylisttype),callback:function ($$v) {_vm.$set(_vm.datas, "commoditylisttype", $$v)},expression:"datas.commoditylisttype"}},_vm._l((3),function(index){return _c('el-radio',{key:index,attrs:{"label":index - 1}},[_vm._v("类型"+_vm._s(index))])}),1)],1),_c('el-form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype !== 0),expression:"datas.commoditylisttype !== 0"}],staticClass:"lef",attrs:{"label":"标签颜色"}},[_c('el-color-picker',{staticClass:"picke",attrs:{"show-alpha":"","predefine":_vm.predefineColors},model:{value:(_vm.datas.tabColor),callback:function ($$v) {_vm.$set(_vm.datas, "tabColor", $$v)},expression:"datas.tabColor"}})],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype === 0),expression:"datas.commoditylisttype === 0"}]},[_c('h5',{staticStyle:{"color":"#000","font-size":"14px"}},[_vm._v("添加商品")]),_c('p',{staticStyle:{"color":"#969799","font-size":"12px","margin-top":"10px"}},[_vm._v(" 鼠标拖拽调整商品顺序 ")]),(_vm.datas.imageList[0])?_c('div',[_c('vuedraggable',_vm._b({model:{value:(_vm.datas.imageList),callback:function ($$v) {_vm.$set(_vm.datas, "imageList", $$v)},expression:"datas.imageList"}},'vuedraggable',_vm.dragOptions,false),[_c('transition-group',_vm._l((_vm.datas.imageList),function(item,index){return _c('section',{key:item + index,staticClass:"imgBanner"},[_c('i',{staticClass:"el-icon-circle-close",on:{"click":function($event){return _vm.deleteimg(index)}}}),_c('div',{staticClass:"imag"},[_c('img',{attrs:{"draggable":"false","src":item.coverUrl,"alt":""}})]),_c('div',{staticClass:"imgText"},[_c('div',[_c('el-input',{staticStyle:{"width":"65%"},attrs:{"disabled":"disabled","size":"mini"},model:{value:(item.name),callback:function ($$v) {_vm.$set(item, "name", $$v)},expression:"item.name"}}),_c('el-input',{staticStyle:{"width":"35%"},attrs:{"disabled":"disabled","type":"number","size":"mini"},model:{value:(item.price),callback:function ($$v) {_vm.$set(item, "price", _vm._n($$v))},expression:"item.price"}})],1),_c('el-input',{attrs:{"disabled":"disabled","size":"mini"},model:{value:(item.introduce),callback:function ($$v) {_vm.$set(item, "introduce", $$v)},expression:"item.introduce"}})],1)])}),0)],1)],1):_vm._e(),_c('el-button',{staticClass:"uploadImg",attrs:{"type":"primary","plain":""},on:{"click":function($event){return _vm.dialogVisibleshow('imageList', null)}}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v("点击添加商品")])],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditylisttype !== 0),expression:"datas.commoditylisttype !== 0"}]},[_c('h5',{staticStyle:{"color":"#000","font-size":"14px","margin-left":"7px"}},[_vm._v(" 添加商品分组"),_c('el-button',{staticStyle:{"padding":"2px 4px","fnot-size":"12px","margin-left":"200px"},attrs:{"type":"primary","size":"mini","plain":""},on:{"click":_vm.addGrouping}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v("添加")])],1),_c('p',{staticStyle:{"color":"#969799","font-size":"12px","margin-left":"7px","margin-top":"10px"}},[_vm._v(" 鼠标拖拽调整分组顺序 ")]),_vm._l((_vm.datas.commoditylisttypetab),function(item,index){return _c('section',{key:index},[_c('div',{staticClass:"bor"}),_c('el-input',{staticClass:"tit",staticStyle:{"width":"100px"},attrs:{"placeholder":"请输入分组名称","size":"mini"},model:{value:(item.text),callback:function ($$v) {_vm.$set(item, "text", $$v)},expression:"item.text"}}),_c('i',{staticClass:"el-icon-delete",staticStyle:{"cursor":"pointer","padding":"2px 4px","fnot-size":"12px","margin-left":"200px","color":"red"},on:{"click":function($event){return _vm.delecommoditylisttypetab(index)}}}),_c('vuedraggable',_vm._b({model:{value:(item.imageList),callback:function ($$v) {_vm.$set(item, "imageList", $$v)},expression:"item.imageList"}},'vuedraggable',_vm.dragOptions,false),[_c('transition-group',_vm._l((item.imageList),function(item,ind){return _c('section',{key:item + ind,staticClass:"imgBanner"},[_c('i',{staticClass:"el-icon-circle-close",on:{"click":function($event){return _vm.delecommodityimg(index, ind)}}}),_c('div',{staticClass:"imag"},[_c('img',{attrs:{"draggable":"false","src":item.coverUrl,"alt":""}})]),_c('div',{staticClass:"imgText"},[_c('div',[_c('el-input',{staticStyle:{"width":"65%"},attrs:{"disabled":"disabled","size":"mini"},model:{value:(item.name),callback:function ($$v) {_vm.$set(item, "name", $$v)},expression:"item.name"}}),_c('el-input',{staticStyle:{"width":"35%"},attrs:{"disabled":"disabled","type":"number","size":"mini"},model:{value:(item.price),callback:function ($$v) {_vm.$set(item, "price", _vm._n($$v))},expression:"item.price"}})],1),_c('el-input',{attrs:{"disabled":"disabled","size":"mini"},model:{value:(item.introduce),callback:function ($$v) {_vm.$set(item, "introduce", $$v)},expression:"item.introduce"}})],1)])}),0)],1),_c('el-button',{staticClass:"uploadImg",attrs:{"type":"primary","plain":""},on:{"click":function($event){return _vm.dialogVisibleshow('commoditylisttypetab', index)}}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v("点击添加商品")])],1)})],2),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"商品样式"}}),_c('div',{staticClass:"moditystyle"},_vm._l((_vm.moditystyles),function(item,index){return _c('span',{key:index,class:item.type == _vm.datas.moditystyle ? 'active' : '',on:{"click":function($event){_vm.datas.moditystyle = index}}},[_vm._v(" "+_vm._s(item.text)+" ")])}),0),_c('div',{staticClass:"bor"}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"显示位置"}},[_c('div',{staticClass:"weiz"},[_c('i',{staticClass:"iconfont icon-horizontal-left",class:_vm.datas.positions === 'left' ? 'active' : '',on:{"click":function($event){_vm.datas.positions = 'left'}}}),_c('i',{staticClass:"iconfont icon-juzhong",class:_vm.datas.positions === 'center' ? 'active' : '',on:{"click":function($event){_vm.datas.positions = 'center'}}})])]),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"文本粗细","prop":"textWeight","hide-required-asterisk":true}},[_c('el-input',{attrs:{"type":"number","placeholder":"请输入文本粗细"},model:{value:(_vm.datas.textWeight),callback:function ($$v) {_vm.$set(_vm.datas, "textWeight", _vm._n($$v))},expression:"datas.textWeight"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef borrediu",attrs:{"label":"图片倒角"}},[_c('el-slider',{attrs:{"max":30,"input-size":"mini","show-input":""},model:{value:(_vm.datas.borderRadius),callback:function ($$v) {_vm.$set(_vm.datas, "borderRadius", $$v)},expression:"datas.borderRadius"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"页面边距"}},[_c('el-slider',{attrs:{"max":20,"input-size":"mini","show-input":""},model:{value:(_vm.datas.pageMargin),callback:function ($$v) {_vm.$set(_vm.datas, "pageMargin", $$v)},expression:"datas.pageMargin"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"商品间距"}},[_c('el-slider',{attrs:{"max":20,"input-size":"mini","show-input":""},model:{value:(_vm.datas.commodityMargin),callback:function ($$v) {_vm.$set(_vm.datas, "commodityMargin", $$v)},expression:"datas.commodityMargin"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"背景图片"}},[_c('div',{staticClass:"shop-head-pic",staticStyle:{"text-align":"center"}},[(_vm.datas.bgImg)?_c('img',{staticClass:"home-bg",attrs:{"src":_vm.datas.bgImg,"alt":""}}):_vm._e(),_c('div',{staticClass:"shop-head-pic-btn",staticStyle:{"text-align":"center"}},[_c('el-button',{staticClass:"uploadImg",attrs:{"type":"primary","plain":""},on:{"click":function($event){return _vm.showUpload('0')}}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v("更换图片")]),_c('el-button',{staticClass:"uploadImg",attrs:{"type":"primary"},on:{"click":function($event){return _vm.clear()}}},[_vm._v("清空图片")])],1)])]),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"商品价格"}},[_vm._v(" "+_vm._s(_vm.datas.priceofcommodity ? '显示' : '隐藏')+" "),_c('el-checkbox',{staticStyle:{"margin-left":"196px"},model:{value:(_vm.datas.priceofcommodity),callback:function ($$v) {_vm.$set(_vm.datas, "priceofcommodity", $$v)},expression:"datas.priceofcommodity"}})],1),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"购买按钮"}},[_vm._v(" "+_vm._s(_vm.datas.purchasebutton ? '显示' : '隐藏')+" "),_c('el-checkbox',{staticStyle:{"margin-left":"196px"},model:{value:(_vm.datas.purchasebutton),callback:function ($$v) {_vm.$set(_vm.datas, "purchasebutton", $$v)},expression:"datas.purchasebutton"}})],1),_c('el-radio-group',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.purchasebutton),expression:"datas.purchasebutton"}],staticClass:"radi1",model:{value:(_vm.datas.purchasebuttonType),callback:function ($$v) {_vm.$set(_vm.datas, "purchasebuttonType", $$v)},expression:"datas.purchasebuttonType"}},[_vm._l((8),function(index){return _c('el-radio',{key:index,attrs:{"label":index - 1}},[_vm._v("样式"+_vm._s(index))])}),_c('el-input',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.purchasebuttonType > 3),expression:"datas.purchasebuttonType > 3"}],staticStyle:{"width":"40%","margin-top":"10px"},attrs:{"size":"mini"},model:{value:(_vm.datas.purchase),callback:function ($$v) {_vm.$set(_vm.datas, "purchase", $$v)},expression:"datas.purchase"}})],2),_c('div',{staticStyle:{"height":"10px"}}),_c('el-form-item',{staticClass:"lef",attrs:{"label":"商品角标"}},[_vm._v(" "+_vm._s(_vm.datas.commoditycorner ? '显示' : '隐藏')+" "),_c('el-checkbox',{staticStyle:{"margin-left":"196px"},model:{value:(_vm.datas.commoditycorner),callback:function ($$v) {_vm.$set(_vm.datas, "commoditycorner", $$v)},expression:"datas.commoditycorner"}})],1),_c('el-radio-group',{directives:[{name:"show",rawName:"v-show",value:(_vm.datas.commoditycorner),expression:"datas.commoditycorner"}],staticClass:"radi1",model:{value:(_vm.datas.commoditycornertype),callback:function ($$v) {_vm.$set(_vm.datas, "commoditycornertype", $$v)},expression:"datas.commoditycornertype"}},_vm._l((_vm.marker),function(item,index){return _c('el-radio',{key:index,attrs:{"label":index}},[_vm._v(_vm._s(item))])}),1),_c('el-form-item',{staticClass:"lef",attrs:{"label":"颜色"}},[_c('el-color-picker',{staticClass:"picke",attrs:{"show-alpha":"","predefine":_vm.predefineColors},model:{value:(_vm.datas.commodityTagColor),callback:function ($$v) {_vm.$set(_vm.datas, "commodityTagColor", $$v)},expression:"datas.commodityTagColor"}})],1),_c('el-form-item',{staticClass:"lef",attrs:{"label":"位置"}},[_c('el-radio-group',{staticClass:"radi1",model:{value:(_vm.datas.tagPosition),callback:function ($$v) {_vm.$set(_vm.datas, "tagPosition", $$v)},expression:"datas.tagPosition"}},_vm._l((_vm.tagPosition),function(item,index){return _c('el-radio',{key:index,attrs:{"label":index}},[_vm._v(_vm._s(item))])}),1)],1)],1),_c('uploadCommodity',{ref:"upload",on:{"uploadListInformation":_vm.uploadListInformation}}),_c('uploadimg',{ref:"uploadImg",on:{"uploadInformation":_vm.uploadInformation}})],1)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/components/rightslider/listswitchingstyle/index.vue?vue&type=template&id=0f2d683a&scoped=true& // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js var es_array_splice = __webpack_require__("a434"); // EXTERNAL MODULE: ./src/components/uploadCommodity/index.vue + 4 modules var uploadCommodity = __webpack_require__("47db"); // EXTERNAL MODULE: ./src/components/uploadImg/index.vue + 4 modules var uploadImg = __webpack_require__("40cb"); // EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js var vuedraggable_umd = __webpack_require__("b76a"); var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/rightslider/listswitchingstyle/index.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //图片上传 //图片上传 //拖拽组件 /* harmony default export */ var listswitchingstylevue_type_script_lang_js_ = ({ name: 'listswitchingstyle', props: { datas: Object }, components: { vuedraggable: vuedraggable_umd_default.a, uploadCommodity: uploadCommodity["default"], uploadimg: uploadImg["default"] }, data: function data() { var kon = function kon(rule, value, callback) { if (value.length === 0) callback(new Error('请输入有效数字')); }; return { color1: '#07c160', moditystyles: [ /* 商品样式 */ { text: '无边白底', type: 0 }, { text: '卡片投影', type: 1 }, { text: '描边白底', type: 2 }, { text: '无边透明底', type: 3 }], commodityTypes: [{ icon: 'icon-datumoshi', type: 0, content: '大图模式' }, { icon: 'icon-commodity-yihangliangge', type: 1, content: '一行两个' }, { icon: 'icon-yihangsange', type: 2, content: '一行三个' }, { icon: 'icon-commodity-xiangxiliebiao', type: 3, content: '详细列表' }, { icon: 'icon-icon_shangpintu_yidaliangxiao', type: 4, content: '一大两小' }, { icon: 'icon-xuanzemokuai-daohanghengxianghuadong', type: 5, content: '横向滑动' }], rules: { textWeight: [{ required: true, validator: kon, trigger: 'blur' }] }, marker: ['新品', '热卖', 'NEW', 'HOT'], dragOptions: { animation: 200 }, imgText: null, //当前选中的类型 imgNumber: null, //第几个数组 predefineColors: [// 颜色选择器预设 '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', '#409EFF', '#909399', '#C0C4CC', 'rgba(255, 69, 0, 0.68)', 'rgb(255, 120, 0)', 'hsv(51, 100, 98)', 'hsva(120, 40, 94, 0.5)', 'hsl(181, 100%, 37%)', 'hsla(209, 100%, 56%, 0.73)', '#c7158577'], options: [], // 更多跳转链接 moreName: null, tagPosition: [// 标记位置 '左上', '左下', '右上', '右下'], uploadImgDataType: null }; }, created: function created() {}, methods: { /* 上传图片弹框 */ dialogVisibleshow: function dialogVisibleshow(text, number) { this.$refs.upload.showUpload(); this.imgText = text; this.number = number; }, /* 添加分组 */ addGrouping: function addGrouping() { this.datas.commoditylisttypetab.push({ text: '分组', imageList: [] }); }, // 提交 uploadListInformation: function uploadListInformation(res) { if (this.imgText === 'imageList') { this.datas.imageList.push(res); } else { this.datas.commoditylisttypetab[this.number].imageList.push(res); } this.imgText = null; this.number = null; }, showUpload: function showUpload(type) { this.uploadImgDataType = type; this.$refs.uploadImg.showUpload(); }, // 背景图 uploadInformation: function uploadInformation(res) { console.log(res, '---------uploadImg'); if (this.uploadImgDataType === '0') { this.datas.bgImg = res; console.log(this.datas.bgImg, '---------uploadImg'); } }, // 清空背景图片 clear: function clear() { this.datas.bgImg = ''; }, /* 删除图片 */ deleteimg: function deleteimg(index) { this.datas.imageList.splice(index, 1); }, /* 删除分组里的图片 */ delecommodityimg: function delecommodityimg(ind, index) { this.datas.commoditylisttypetab[ind].imageList.splice(index, 1); }, /* 删除分组 */ delecommoditylisttypetab: function delecommoditylisttypetab(index) { this.datas.commoditylisttypetab.splice(index, 1); } }, computed: { styleText: function styleText() { var modeType; if (this.datas.commodityType === 0) modeType = '大图模式'; if (this.datas.commodityType === 1) modeType = '一行两个'; if (this.datas.commodityType === 2) modeType = '一行三个'; if (this.datas.commodityType === 3) modeType = '详细列表'; if (this.datas.commodityType === 4) modeType = '一大两小'; if (this.datas.commodityType === 5) modeType = '横向滑动'; return modeType; } } }); // CONCATENATED MODULE: ./src/components/rightslider/listswitchingstyle/index.vue?vue&type=script&lang=js& /* harmony default export */ var rightslider_listswitchingstylevue_type_script_lang_js_ = (listswitchingstylevue_type_script_lang_js_); // EXTERNAL MODULE: ./src/components/rightslider/listswitchingstyle/index.vue?vue&type=style&index=0&id=0f2d683a&scoped=true&lang=less& var listswitchingstylevue_type_style_index_0_id_0f2d683a_scoped_true_lang_less_ = __webpack_require__("a140"); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("2877"); // CONCATENATED MODULE: ./src/components/rightslider/listswitchingstyle/index.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( rightslider_listswitchingstylevue_type_script_lang_js_, render, staticRenderFns, false, null, "0f2d683a", null ) /* harmony default export */ var listswitchingstyle = __webpack_exports__["default"] = (component.exports); /***/ }), /***/ "030f": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.10.0 (2021-10-11) */ (function () { 'use strict'; var typeOf = function (x) { var t = typeof x; if (x === null) { return 'null'; } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) { return 'array'; } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) { return 'string'; } else { return t; } }; var isType$1 = function (type) { return function (value) { return typeOf(value) === type; }; }; var isSimpleType = function (type) { return function (value) { return typeof value === type; }; }; var eq$1 = function (t) { return function (a) { return t === a; }; }; var isString = isType$1('string'); var isObject = isType$1('object'); var isArray = isType$1('array'); var isNull = eq$1(null); var isBoolean = isSimpleType('boolean'); var isUndefined = eq$1(undefined); var isNullable = function (a) { return a === null || a === undefined; }; var isNonNullable = function (a) { return !isNullable(a); }; var isFunction = isSimpleType('function'); var isNumber = isSimpleType('number'); var isArrayOf = function (value, pred) { if (isArray(value)) { for (var i = 0, len = value.length; i < len; ++i) { if (!pred(value[i])) { return false; } } return true; } return false; }; var noop = function () { }; var noarg = function (f) { return function () { return f(); }; }; var compose = function (fa, fb) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return fa(fb.apply(null, args)); }; }; var compose1 = function (fbc, fab) { return function (a) { return fbc(fab(a)); }; }; var constant$1 = function (value) { return function () { return value; }; }; var identity$1 = function (x) { return x; }; var tripleEquals = function (a, b) { return a === b; }; function curry(fn) { var initialArgs = []; for (var _i = 1; _i < arguments.length; _i++) { initialArgs[_i - 1] = arguments[_i]; } return function () { var restArgs = []; for (var _i = 0; _i < arguments.length; _i++) { restArgs[_i] = arguments[_i]; } var all = initialArgs.concat(restArgs); return fn.apply(null, all); }; } var not = function (f) { return function (t) { return !f(t); }; }; var die = function (msg) { return function () { throw new Error(msg); }; }; var never = constant$1(false); var always = constant$1(true); var global$h = tinymce.util.Tools.resolve('tinymce.ThemeManager'); var __assign = function () { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === 'function') for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } var none = function () { return NONE; }; var NONE = function () { var call = function (thunk) { return thunk(); }; var id = identity$1; var me = { fold: function (n, _s) { return n(); }, isSome: never, isNone: always, getOr: id, getOrThunk: call, getOrDie: function (msg) { throw new Error(msg || 'error: getOrDie called on none.'); }, getOrNull: constant$1(null), getOrUndefined: constant$1(undefined), or: id, orThunk: call, map: none, each: noop, bind: none, exists: never, forall: always, filter: function () { return none(); }, toArray: function () { return []; }, toString: constant$1('none()') }; return me; }(); var some = function (a) { var constant_a = constant$1(a); var self = function () { return me; }; var bind = function (f) { return f(a); }; var me = { fold: function (n, s) { return s(a); }, isSome: always, isNone: never, getOr: constant_a, getOrThunk: constant_a, getOrDie: constant_a, getOrNull: constant_a, getOrUndefined: constant_a, or: self, orThunk: self, map: function (f) { return some(f(a)); }, each: function (f) { f(a); }, bind: bind, exists: bind, forall: bind, filter: function (f) { return f(a) ? me : NONE; }, toArray: function () { return [a]; }, toString: function () { return 'some(' + a + ')'; } }; return me; }; var from$1 = function (value) { return value === null || value === undefined ? NONE : some(value); }; var Optional = { some: some, none: none, from: from$1 }; var nativeSlice = Array.prototype.slice; var nativeIndexOf = Array.prototype.indexOf; var nativePush = Array.prototype.push; var rawIndexOf = function (ts, t) { return nativeIndexOf.call(ts, t); }; var indexOf = function (xs, x) { var r = rawIndexOf(xs, x); return r === -1 ? Optional.none() : Optional.some(r); }; var contains$2 = function (xs, x) { return rawIndexOf(xs, x) > -1; }; var exists = function (xs, pred) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; if (pred(x, i)) { return true; } } return false; }; var range$2 = function (num, f) { var r = []; for (var i = 0; i < num; i++) { r.push(f(i)); } return r; }; var chunk$1 = function (array, size) { var r = []; for (var i = 0; i < array.length; i += size) { var s = nativeSlice.call(array, i, i + size); r.push(s); } return r; }; var map$2 = function (xs, f) { var len = xs.length; var r = new Array(len); for (var i = 0; i < len; i++) { var x = xs[i]; r[i] = f(x, i); } return r; }; var each$1 = function (xs, f) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; f(x, i); } }; var eachr = function (xs, f) { for (var i = xs.length - 1; i >= 0; i--) { var x = xs[i]; f(x, i); } }; var partition$3 = function (xs, pred) { var pass = []; var fail = []; for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; var arr = pred(x, i) ? pass : fail; arr.push(x); } return { pass: pass, fail: fail }; }; var filter$2 = function (xs, pred) { var r = []; for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; if (pred(x, i)) { r.push(x); } } return r; }; var foldr = function (xs, f, acc) { eachr(xs, function (x, i) { acc = f(acc, x, i); }); return acc; }; var foldl = function (xs, f, acc) { each$1(xs, function (x, i) { acc = f(acc, x, i); }); return acc; }; var findUntil = function (xs, pred, until) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; if (pred(x, i)) { return Optional.some(x); } else if (until(x, i)) { break; } } return Optional.none(); }; var find$5 = function (xs, pred) { return findUntil(xs, pred, never); }; var findIndex$1 = function (xs, pred) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; if (pred(x, i)) { return Optional.some(i); } } return Optional.none(); }; var flatten = function (xs) { var r = []; for (var i = 0, len = xs.length; i < len; ++i) { if (!isArray(xs[i])) { throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); } nativePush.apply(r, xs[i]); } return r; };