!function(f,g,i){var n,o,a;f.formbuilder={config:{},toolbox:{},language:{},property:{},contextmenu:{},shortcutKey:{},menu:{},menucontrol:{},debugger:!1,insideTool:["datasetindex"],log:function(e,t){if(this.debugger||t)return i.console.log(e)},PATTERN:{DESIGN:"design",APPLYING:"applying",VIEW:"view"},HORIZONTAL:"horizontal",VERTICAL:"vertical",ELEMTYPE:{CONTAINER:"container",ELEM:"elem"},DATATYPE:{ROWS:"rows",COLUMNS:"columns",CELLS:"cells",CONTROLS:"controls",TABLE:"table",COLUMN:"column",ROWSINDEX:"rowsIndex",COLUMNSINDEX:"columnsIndex",TABLEINDEX:"tableIndex"},DATASETUPDATETYPE:{RESET:"reset",REPLACE:"replace",INSERT:"insert",DELETE:"delete"},PAGING:{DISPLAY:"anchoring"},REGEX:{NUMBER:"^[0-9]*$",CHINESE:"^[\\u4e00-\\u9fa5]{0,}$",EMAIL:"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",INTERNETURL:"[a-zA-z]+://[^\\s]* 或 ^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$",PHONE:"^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\\d{8}$",DATE:"^\\d{4}-\\d{1,2}-\\d{1,2}"},"FONT-FAMILY":[{text:"微软雅黑",value:"微软雅黑"},{text:"黑体",value:"黑体"},{text:"新宋体",value:"新宋体"},{text:"仿宋",value:"仿宋"},{text:"楷体",value:"楷体"},{text:"华文楷体",value:"华文楷体"},{text:"华文宋体",value:"华文宋体"},{text:"华文宋体",value:"华文宋体"},{text:"方正舒体",value:"方正舒体"},{text:"方正姚体",value:"方正姚体"},{text:"华文隶书",value:"华文隶书"},{text:"华文行楷",value:"华文行楷"},{text:"华文新魏",value:"华文新魏"},{text:"Arial",value:"Arial"},{text:"Lucida",value:"Lucida"},{text:"Grande",value:"Grande"},{text:"Arial Black",value:"Arial Black"},{text:"Arial Narrow",value:"Arial Narrow"},{text:"Verdana",value:"Verdana"},{text:"Georgia",value:"Georgia"},{text:"Times New Roman",value:"Times New Roman"},{text:"Trebuchet MS",value:"Trebuchet MS"},{text:"Tahoma",value:"Tahoma"},{text:"Courier",value:"Courier"},{text:"Lucida Sans Unicode",value:"Lucida Sans Unicode"},{text:"Trebuchet MS",value:"Trebuchet MS"},{text:"Symbol",value:"Symbol"}],"FONT-SIZE":[{text:12,value:12},{text:14,value:14},{text:16,value:16},{text:18,value:18},{text:20,value:20},{text:22,value:22},{text:24,value:24},{text:26,value:26},{text:28,value:28},{text:36,value:36},{text:48,value:48},{text:72,value:72}],"BORDER-TABLE-STYLE":[{name:"border-table-solid",text:"border-solid",image:"border-solid.png"},{name:"border-table-none",text:"border-none",image:"border-none.png"},{name:"border-table-solid-heavy",text:"border-solid-heavy",image:"border-solid-heavy.png"}],"BORDER-STYLE":[{name:"border-solid",text:"border-solid",image:"border-solid.png"},{name:"border-none",text:"border-none",image:"border-none.png"},{name:"border-solid-heavy",text:"border-solid-heavy",image:"border-solid-heavy.png"}],"BORDER-POSITION":[{name:"all",text:"border-all",image:"border-all.png"},{name:"left",text:"border-left",image:"border-left.png"},{name:"right",text:"border-right",image:"border-right.png"},{name:"top",text:"border-top",image:"border-top.png"},{name:"bottom",text:"border-bottom",image:"border-bottom.png"}],BORDERSTYLEITEMS:{"border-table-solid":"solid","border-table-none":"none","border-table-solid-heavy":"solid","border-solid":"solid","border-none":"none","border-solid-heavy":"solid"},BORDERWIDTHITEMS:{"border-table-solid":"1px","border-table-none":"1px","border-table-solid-heavy":"2px","border-solid":"1px","border-none":"1px","border-solid-heavy":"2px"},DESIGNBORDERSTYLEITEMS:{"border-table-solid":"solid","border-table-none":"dashed","border-table-solid-heavy":"solid","border-solid":"solid","border-none":"dashed","border-solid-heavy":"solid"},DESIGNBORDERWIDTHITEMS:{"border-table-solid":"1px","border-table-none":"1px","border-table-solid-heavy":"2px","border-solid":"1px","border-none":"1px","border-solid-heavy":"2px"},"OBLIQUELINE-STYLE":[{name:"obliqueline-none",text:"",image:"obliqueline-none.png"},{name:"obliqueline-left-one",text:"",image:"obliqueline-left-one.png"}],"PRINT-SIZE":[{name:"print-none",text:"none",image:"print-none.png"},{name:"A3",text:"a3",image:"print-a3.png"},{name:"A4",text:"a4",image:"print-a4.png"}],"PRINT-DIRECTION":[{name:"vertical",text:"print-direction-v",image:"print-direction-v.png"},{name:"horizontal",text:"print-direction-h",image:"print-direction-h.png"}],SYNMOVEPROPERTYS:{cell:[],control:["cascade-control","relation-position"]},getId:function(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var t,i=(new Date).getTime()+""+a++,n=[];return n.push(i.slice(0,8)),n.push(i.slice(8,12)),n.push((i=i.slice(12,16),t=i.length,"0000".slice(1,t+1)+i)),n.push(e()),n.push(e()),n.push(e()+e()+e()),n.join("-")},getTimestamp:function(){return(new Date).getTime()},getZindex:(n=a=1,o={t:0},function(e){var t;return o.hasOwnProperty((e=e||"t")||"t")?o[e]:(t=e?n++:(e=e||"t",0),o[e]=t)}),getValue:function(e){return g.isObject(e)?e.value:e},getImage:function(e,t){e=-1===t.indexOf("/")?e+t:t;return e},getPosition:function(e){e=JSON.parse(e.attr("data-position"))||[null,null];return{x:e[0],y:e[1]}},setPosition:function(e,t,i){i&&i.attr("data-position",["[",e,",",t,"]"].join(""))},formatPositionToObject:function(e){return e&&"string"==typeof e?(e=e.split(":"),{x:Number(e[0]),y:Number(e[1])}):e},formatPositionToString:function(e){return e&&"string"!=typeof e?e.x+":"+e.y:e},formatMovePosition:function(e,t){e=this.formatPositionToObject(e);return e.x=e.x+t.x,e.y=e.y+t.y,e=this.formatPositionToString(e)},updateProperty:function(t,e,i,n,o,a){var r,l,s,c,d,u,p,h=this,m=!0;e&&(r=n[e],d=(l=o[e])[t+"Update"]||l.update,s=l["before"+g.upperFirst(t)+"Update"]||l.beforeUpdate,c=l["after"+g.upperFirst(t)+"Update"]||l.afterUpdate,p=l.afterChecking,"function"==typeof d&&(u={x:n.x,y:n.y},l.excludePattern&&-1!==l.excludePattern.indexOf(t)||("function"==typeof l.conver&&(r=l.conver.call(i,r,u,n),n[e]=r),"function"==typeof s&&s.call(i,r,u,n),d.call(i,r,u,n),"function"==typeof c&&c.call(i,r,u,n),"function"==typeof p&&(m=p.call(i,r,u,n)),!a&&l.after&&m&&(e=l.after,g.isArray(e)||(e=[e]),g.each(e,function(e){h.updateProperty(t,e,i,n,o)})))))},updateValue:function(e,t,i,n,o,a,r){var o=o[i],l=t[i],l=o.timestamp&&n?(n="function"==typeof o.timestampConver?o.timestampConver.call(e,n,{x:t.x,y:t.y},t):n)&&{value:n,timestamp:a,zIndex:r||this.getZindex(a)}:n;t[i]=l},updateProperties:function(e,t,i,n,o,a,r){for(var l,s,c=0,d=(n=n instanceof Array?n:[n]).length;c=i&&(e.x1=e.x1+o),a.updateSignObj(l,n+o,t,e),a.updateSignObj(l,n,t,null)}),g.each(s[n-1],function(e,t){var i;++t,(i=e.options||e).x=n+o,a.synMoveProperties(i,{x:o,y:0},"control"),a.updateSignObj(s,n+o,t,e),a.updateSignObj(s,n,t,{x:n,y:t})})}),o<0&&(r.splice(e-n,n),l.splice(e-n,n),s.splice(e-n,n))},insertColumnObjs:function(e,t,i,n,o,a){var r=this.DATATYPE,l=this,s=e[r.TABLE],c=e[r.COLUMNS],d=e[r.CELLS],u=e[r.CONTROLS],p=s[r.COLUMNS],h=g.range(1,s[r.ROWS]+1),p=g.rangeRight(t,p+1);this.moveColumnObjs(e,t,i,h,p),g.each(g.range(t,t+i),function(i){var e=f.extend({},a.column,{y:i});l.updateSignObj(c,-1,i,e),g.each(h,function(e){var t=f.extend({},a.cell,{x:e,y:i});l.updateSignObj(d,e,i,t),l.updateSignObj(u,e,i,{x:e,y:i})})}),s[r.COLUMNS]+=i},removeColumnObjs:function(e,t,i,n,o){var a=this.DATATYPE,r=e[a.TABLE],l=r[a.COLUMNS],s=g.range(1,r[a.ROWS]+1),l=g.range(t,l+1);this.moveColumnObjs(e,t,-i,s,l),r[a.COLUMNS]-=i},moveColumnObjs:function(e,a,r,t,i){var n=this.DATATYPE,l=this,s=e[n.COLUMNS],c=e[n.CELLS],d=e[n.CONTROLS],o=Math.abs(r),u=s.length;g.each(i,function(o){var e=l.findObj(s,-1,o);e.y=o+r,l.updateSignObj(s,-1,o,null),l.updateSignObj(s,-1,o+r,e),g.each(t,function(e){var t,i=o+r,n=l.findObj(c,e,o);n.y=i,n.y1&&n.y1>=a&&(n.y1=n.y1+r),l.updateSignObj(c,e,i,n),l.updateSignObj(c,e,o,null),(t=(n=l.findObj(d,e,o)).options||n).y=i,l.synMoveProperties(t,{x:0,y:r},"control"),l.updateSignObj(d,e,i,n),l.updateSignObj(d,e,o,{x:e,y:o})})}),r<0&&(s.splice(u-o,o),g.each(c,function(e){e.splice(u-o,o)}),g.each(d,function(e){e.splice(u-o,o)}))},makeTwoDimensionalArray:function(r,e,l,s){var c=[],d=this;return this.isTwoDimensionalArray(r)?(c=g.take(r,e),g.each(g.range(0,e),function(t){var i=g.take(c[t]||[],l);c[t]=i,g.each(g.range(0,l),function(e){i[e]=f.extend({},s,i[e],{x:t+1,y:e+1})})})):g.each(g.range(0,e),function(i){var n,o,a=[];c[i]=a,g.each(g.range(0,l),function(e){var t;n=i+1,o=e+1,t=d.removeObj(r,n,o),a[e]=f.extend({},s,t,{x:n,y:o})})}),c},makeOneDimensionalArray:function(o,a,r,l){var s=[],c=this;return g.each(g.range(0,-1===a?r:a),function(e){var t,i,n;-1===a?(t=-1,i=e+1):-1===r&&(t=e+1,i=-1),n=c.removeObj(o,t,i),s[e]=f.extend({},l,n,{x:t,y:i})}),s},getMax:function(e,t){return Math.max(e,t)},getMaxPoint:function(e){function t(e,t){return ti.x||e===this.VERTICAL&&o.x===i.x&&o.y>=i.y&&o.y<=n.y?r=t:e===this.HORIZONTAL&&o.y>=i.y&&o.x>=i.x&&o.x<=n.x&&(l=t),o.x=o.x+r,o.y=o.y+l,a&&this.synMoveProperties(o,{x:r,y:l},a)},changeDatasetTemplatePosition:function(i,n,e){var o=this;g.each(e,function(e,t){t!==n.datasetId&&g.each(e,function(e){o.changePosition(i,n.count,n.p1,n.p2,e)})})},getDatasetMoveInfo:function(e,t,i){var n=0,o=e[0].length,a=e[0][0],o=e[0][o-1],r={x:a.x,y:a.y},o={x:o.x,y:o.y};return"insert"===i?n=e.length:"remove"===i?n=-e.length:1===t&&(n=e.length-1),{p1:r,p2:o,count:n,datasetId:a["dataset-block"]}},getDatasetInfoById:function(e,t){var t=t[e],i=t[0],n=i.x,o=i.y;return{id:e,type:i["extension-direction"],x:n,y:o,length:t.length}},getDatasetRows:function(r,l,s,c,d,e){var t,u,p=this,h=this.insideTool||[],m=[];return l?(d=d||1,l instanceof Array&&0===l.length&&(l=1),t=(u=g.isNumber(l))?l:l.length,e=e[r],g.each(g.range(0,t),function(o){m[o]=[];let a=0;g.each(e,function(e,t){var i=e.type,i=-1d;)n=n.splice(d),t[++i]=n}}),t):e,r=this.getDatasetTemplate(e,!0),i=f.extend(!0,{},f.formbuilder.toolbox._table.propertyField.cell),l=this.getDatasetCellTemplate(r,e,i),t=e.datasets.data,c=[],u=this.initDatasets(t),e=g.range(1,u.count+1),g.each(e,function(e){o.formatDatasetsPage(u,e,r)}),g.each(e,function(e){var e=u.datasets[e-1],t=f.extend(!0,{},a),i=f.extend(!0,{},r),n=f.extend(!0,{},l);s=o.updateDatasets(e,t,i,n),o.updateTableRows(r,s,t),delete t.datasets,g.each(t.cells,function(e){f.formbuilder.deleteEmptyProperty(e),f.formbuilder.repairCellBorderStyle(e)}),o.sortCellsByPosition(t),o.fillEmptyCells(t),c.push(t)}),c):null},getGuid:function(){return f.formbuilder.getId()},createStyle:function(e,t,i,n){var o=[],a=e.find("#"+t);0===a.length&&(a=f(document.createElement("style")),e.append(a)),o=o.join(""),a[0].id=t,o=[i,"{",function(e){var t,i,n=[];if(!e)return"";for(i in e)e.hasOwnProperty(i)&&(t=e[i],n.push(i+":"+t));return n.join(";")}(n),"}"].join(""),a[0].type="text/css",a.html(o)}},f.formbuilder.util={},f.formbuilder.util.updatePropertyByElem=function(e){var t,e=e.closest(".formbuilder-workspace-control-container"),i=e.closest(".formbuilder").data("formbuilder");i&&(i=i.workspace,(e=f.formbuilder.getPosition(e))&&(t=e.x,e=e.y,i.findControlObj(t,e).updateProperties()))}}(jQuery,_,window),function(C,h,i,u){"use strict";var p=C.formbuilder;function n(){this.className,this.builder,this.toolbox,this.control,this.menu,this.data,this.$elements={},this.grid,this.elem,this.$wrap,this.datasetTemplate,this.datasetRows,this.page={datasets:[],current:1,last:1,count:1},this.cacheData={}}function o(){this.className={layout:"formbuilder-design-workspace",itemswrap:"formbuilder-design-workspace-grid",item:"formbuilder-design-workspace-item",itemContainer:"formbuilder-design-workspace-item-container",relateProperty:"formbuilder-design-workspace-relate-property",enableDrop:"formbuilder-design-workspace-enable-drop",controlContainer:"formbuilder-workspace-control-container"},this.recordNumber=20,this.cache={recovery:[],retroversion:[]}}function a(){n.call(this),this.className={layout:"formbuilder-workspace formbuilder-applying-workspace",itemswrap:"formbuilder-applying-workspace-grid",item:"formbuilder-applying-workspace-item",editableCell:"formbuilder-applying-editable-cell",controlContainer:"formbuilder-workspace-control-container",checkFailed:"error"},this._datasetTemplate,this._data,this.datasetCtrls={}}function t(){n.call(this),this.className={layout:"formbuilder-workspace formbuilder-view-workspace",itemswrap:"formbuilder-view-workspace-grid",item:"formbuilder-view-workspace-item",controlContainer:"formbuilder-workspace-control-container"}}function r(){this.className={layout:"formbuilder-property",itemswrap:"formbuilder-property-items-wrap",hidden:"formbuilder-property-hidden",title:"formbuilder-property-title",items:"formbuilder-property-items",item:"formbuilder-property-item",blockItem:"formbuilder-property-item-block",itemTitle:"formbuilder-property-item-label",itemControl:"formbuilder-property-item-control",field:"formbuilder-property-title-field"},this.template={wrap:function(e){return["
"].join("")},field:function(e){return["",e.title,""].join("")},title:function(e){var{className:e,path:t,title:i,x:n,y:o,icon:a=""}=e;return`
${a?``:""} ${t} ${i} [${n},${o}]
`}},this.builder=null,this.language=null,this.elementTypes=null,this.items=null,this.owner=null,this.$wrap=null,this.elem=null}function l(){this.className={layout:"formbuilder-toolbox",hidden:"formbuilder-toolbox-hidden",itemswrap:"formbuilder-toolbox-items-wrap",items:"formbuilder-toolbox-items",item:"formbuilder-toolbox-item",group:"formbuilder-toolbox-group",groupTitle:"formbuilder-toolbox-group-title",groupIcon:"formbuilder-toolbox-group-icon",groupText:"formbuilder-toolbox-group-text",itemContent:"formbuilder-toolbox-content",itemIcon:"formbuilder-toolbox-item-icon",itemTitle:"formbuilder-toolbox-item-title",field:"formbuilder-toolbox-title-field"},this.template={container:function(e){return["
",e.items,"
","",e.title,""].join("")},group:function(e){return["
","
"," "," ",e.text,"","
"," ",e.items,"
"].join("")},item:function(e){return["
","
"," "," ",e.text,"","
","
"].join("")}},this.builder=null,this.items=null,this.language=null,this.order=null,this.showLabel=null,this.localLanguage=null,this.elem=null,this.expandImage="expand.svg",this.collapseImage="collapse.svg"}function s(){this.className={container:"formbuilder-contextmenu",items:"formbuilder-contextmenu-items",item:"formbuilder-contextmenu-item",text:"formbuilder-contextmenu-item-text",image:"formbuilder-contextmenu-item-image"},this.template={container:function(e){return["
    "].join("")},item:function(e){return["
  • "," "," ",e.text," ","
  • "].join("")}},this.elem,this.wrapElem,this.builder,this.design,this.container,this.grid,this.contextmenus=p.contextmenu}function e(){this.className={container:"formbuilder-paging",wrap:"formbuilder-paging-wrap",button:"formbuilder-paging-button","btn-first":"formbuilder-paging-button-first","btn-last":"formbuilder-paging-button-last","btn-prev":"formbuilder-paging-button-prev","btn-next":"formbuilder-paging-button-next","btn-add":"formbuilder-paging-button-add","btn-index":"formbuilder-paging-index","btn-index-container":"formbuilder-paging-index-container","btn-selected":"formbuilder-paging-button-selected"},this.IMAGES={DEFAULT:{ADD:"paging-btn-add.png",FIRST:"paging-btn-first.png",LAST:"paging-btn-last.png",PREV:"paging-btn-prev.png",NEXT:"paging-btn-next.png"}},this.template={container:function(e){var t=e.className,e=e.images;return["
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    "].join("")},index:function(e){return["
    ",e.index,"
    "].join("")}},this.elem,this.$pageCount,this.builder,this.pagesize,this.current=1,this.count=1}function c(e){this.items=p.shortcutKey,this.order=e.options.shortcutKey.order,this.builder=e,this.design=e.workspace,this.grid=this.design.grid,this.keydownEvent,this.bindEvent()}function d(){this.className={container:"formbuilder-menu",content:"formbuilder-menu-content",items:"formbuilder-menu-items",item:"formbuilder-menu-item",split:"formbuilder-menu-split",arrow:"formbuilder-menu-arrow",arrowsdown:"formbuilder-menu-arrows-down",submenu:"formbuilder-menu-submenu",prev:"formbuilder-menu-btn-prev",next:"formbuilder-menu-btn-next",hidden:"formbuilder-menu-hidden"},this.image={arrowsdown:"arrows-down.png",arrowLeft:"arrow-left.svg",arrowRight:"arrow-right.svg"},this.menu=p.menu,this.menucontrol=p.menucontrol,this.order=[],this.items=[],this.builder,this.workspace,this.proerty,this.grid,this.$elem,this.$wrap,this.$container,this.$prev,this.$next}function m(e,t){this.className={builder:"formbuilder",design:"formbuilder-design",applying:"formbuilder-applying",view:"formbuilder-view",autoHeight:"formbuilder-height-auto",hasPaging:"formbuilder-has-paging",dragging:"formbuilder-item-dragging"},this.elem=e,this.toolbox,this.workspace,this.contextmenu,this.loading,this.paging,this.drake,this.options,this.autoResize=!0,this.init(t),this.create()}n.prototype.create=function(e,t){this.init(e,t),this.elem.addClass(this.className.layout),this.createGrid()},n.prototype.init=function(e,t){this.className,this.builder=t,this.toolbox=t.options.toolbox,this.control=t.options.control,this.events=t.options.events,this.elem=e,this.$wrap,this.grid,this.pattern=this.builder.options.pattern,this.data=C.extend(!0,{table:C.extend(!0,{},p.toolbox._table.propertyField.table),rows:[],columns:[],cells:[],controls:[]},t.options.data)},n.prototype.formatData=function(){this.transformRows(),this.transformColumns(),this.formatRows(),this.formatColumns(),this.formatCells(),this.formatControls(),this.grid.options=this.data},n.prototype.transformRows=function(){h.forEach(this.data.rows,function(e){var t=e.height;e.height=isNaN(t)?t:+t})},n.prototype.transformColumns=function(){h.forEach(this.data.columns,function(e){var t=e.height;e.height=isNaN(t)?t:+t})},n.prototype.formatTable=function(){p.formatTable(this.data)},n.prototype.formatRows=function(){this.data.rows=p.makeOneDimensionalArray(this.data.rows,this.data.table.rows,-1,this.grid.propertyField.row)},n.prototype.formatColumns=function(){this.data.columns=p.makeOneDimensionalArray(this.data.columns,-1,this.data.table.columns,this.grid.propertyField.column)},n.prototype.formatCells=function(){this.data.cells=p.makeTwoDimensionalArray(this.data.cells,this.data.table.rows,this.data.table.columns,this.grid.propertyField.cell)},n.prototype.formatControls=function(){this.data.controls=p.makeTwoDimensionalArray(this.data.controls,this.data.table.rows,this.data.table.columns,null)},n.prototype.initGrid=function(){var e=C("
    ");(this.$wrap=e).appendTo(this.elem),this.grid=C.extend(!0,{},this.toolbox._table,{container:this.elem,content:e,workspace:this,pattern:this.builder.options.pattern,events:{activeCellChange:this.activeCellChange,onScroll:this.onScroll}}),this.initTimestamp()},n.prototype.activeCellChange=function(e,t){},n.prototype.clearActiveCell=function(e,t){},n.prototype.setCheckedTip=function(e,t){},n.prototype.getSubRowByCell=function(e){},n.prototype.updateCellsData=function(e){},n.prototype.processControl=function(){},n.prototype.onScroll=function(e,t){},n.prototype.getEffectCell=function(e){},n.prototype.proxyControlValue=function(e){},n.prototype.processData=function(e){let i=this.builder.options,n=this.toolbox,t=e.controls||[],o=e.datasets?.data||[];t.forEach(e=>{var t=e.type;n[t]?.beforeGetData(e,i)}),o.forEach(e=>{e.rows.forEach(e=>{h.isNumber(e)||e.forEach(e=>{e.forEach(e=>{var t=e.type;n[t]?.beforeGetData(e,i)})})})})},n.prototype.cacheElements=function(){this.$elements=p.makeElementTwoDimensionalArray(this.elem,this.grid.filters)},n.prototype.createGrid=function(){this.initGrid(),this.renderGrid()},n.prototype.delay=function(i){function n(){var t=setTimeout(function(){var e=i.shift();"function"==typeof e&&e.call(o),clearTimeout(t),0"),0").addClass(this.className.controlContainer).addClass(this.className.relateProperty).attr("data-position",JSON.stringify([i.x,i.y])).attr("data-type",l.type).attr("data-contextmenu",t.contextmenu),e.attr("class","").empty().addClass(this.className.item).append(a),t.container=a,l.label&&(n=C.extend(!0,{},this.toolbox._title,{options:{label:l.label}})[s]()),a.append(n),(o=t[s](this))?a.append(o):o=t.container.children(),t.elem=o,this.addControlObj(i.x,i.y,t),this.updatePropertyItems(t,t.options,t.property,i)},n.prototype.getProperySortMap=function(){return p.getSortMapByOrder(this.grid.propertyMap)},n.prototype.initTimestamp=function(){var t,e=this.getProperySortMap(),i=this.data,n=[];h.each(e,function(e){t=[i[e.map]],t=h.flattenDeep(t),h.each(t,function(e){h.each(e,function(e,t){h.isObject(e)&&e.hasOwnProperty("timestamp")&&n.push(e)})})}),n=h.sortBy(n,["timestamp"]),h.each(n,function(e){e.zIndex=p.getZindex(e.timestamp)})},n.prototype.updatePropertyMapItems=function(){var i=this.grid,e=this.getProperySortMap(),n=i.property,o=i.options,a=this;h.forEach(e,function(e){var t=e.key,e=o[e.map],t=n[t];a.updatePropertyItem(i,e,t,!0)})},n.prototype.updatePropertyForArrayType=function(t,e,i){var n=this;h.each(e,function(e){n.updatePropertyItem(t,e,i)})},n.prototype.updatePropertyItems=function(t,i,n){var o=this.builder.options.pattern,a=this,e=this.sortProperties(n);h.forEach(e,function(e){a.updatePropertyInLoad(o,e,t,i,n)})},n.prototype.sortProperties=function(e){return h(e).chain().map(function(e,t){return{name:t,order:e.order||0}}).orderBy(function(e){return e.order||0}).map("name").value()},n.prototype.updatePropertyItem=function(e,t,i){t instanceof Array?this.updatePropertyForArrayType(e,t,i):this.updatePropertyItems(e,t,i)},n.prototype.updatePropertyInLoad=function(e,t,i,n,o){var a=o[t];a&&!1!==a.updateInLoad&&p.updateProperty(e,t,i,n,o,!0)},n.prototype.getData=function(){return h(this.data.controls).flatten().map(function(e){return e&&(e=e.options?C.extend(!0,{},e.options):C.extend(!0,{},e)).type?e:null}).compact().value()},n.prototype.getDataByCell=function(e){e=p.getPosition(C(e));return e?this.getDataByPosition(e.x,e.y):null},n.prototype.getDataByActiveCell=function(){var e=this.grid.cache.$activeCell;return e&&0."+this.className.item).remove(),p.updateSignObj(this.data[p.DATATYPE.CONTROLS],e,t,{x:e,y:t}),n.options||n},n.prototype.insertRows=function(e,t,i,n,o){var a=C.extend(!0,{},this.grid.propertyField);o&&o.height&&(a.row.height=o.height),p.insertRowElements(this.$elements,this.grid.filters,e,t,i,n),p.insertRowObjs(this.data,t,e.length,i,n,a)},n.prototype.removeRows=function(e,t,i,n){p.removeRowElements(this.$elements,e,t,i,n),p.removeRowObjs(this.data,t,e,i,n)},n.prototype.insertColumns=function(e,t,i,n){p.insertColumnElements(this.$elements,this.grid.filters,e,t,i,n),p.insertColumnObjs(this.data,t,e.length,i,n,this.grid.propertyField)},n.prototype.removeColumns=function(e,t,i,n){p.removeColumnElements(this.$elements,e,t,i,n),p.removeColumnObjs(this.data,t,e,i,n)},n.prototype.addCell=function(e,t,i){var n=C.extend({},this.grid.propertyField.cell,{x:e,y:t});this.addCellObj(e,t,n),p.addCellElement(e,t,this.$elements,i)},n.prototype.updateCellObjAttribute=function(e,t,i){p.updateObjAttribute(this.data[p.DATATYPE.CELLS],e,t,i)},n.prototype.findRowObj=function(e){return p.findObj(this.data[p.DATATYPE.ROWS],e,-1)},n.prototype.findRowCellsObj=function(e){return p.findObj(this.data[p.DATATYPE.CELLS],e,null)},n.prototype.findColumnCellsObj=function(t){var i=[],e=p.DATATYPE,n=this;return h.each(h.range(1,this.data[e.TABLE][e.ROWS]+1),function(e){i.push(p.findObj(n.data[p.DATATYPE.CELLS],e,t))}),i},n.prototype.findCellObj=function(e,t){return p.findObj(this.data[p.DATATYPE.CELLS],e,t)},n.prototype.addCellObj=function(e,t,i){p.updateSignObj(this.data[p.DATATYPE.CELLS],e,t,i)},n.prototype.findControlObj=function(e,t){return p.findObj(this.data[p.DATATYPE.CONTROLS],e,t)},n.prototype.findControlById=function(t){let i=this.data[p.DATATYPE.CONTROLS],n;for(let e=0;e{var{x:t,y:i}=e;e._designX=t,e._designY=i})},a.prototype.addControl=function(e,t,i,n,o=!0){var a=t||{},r=a.type||e.attr("data-type"),l=this.builder,s=l.options,c=s.pattern,t=this.findControlObj(t.x,t.y),r=C.extend(!0,{},this.toolbox[r]||this.toolbox.textbox,{options:a,builder:l,workspace:this,$content:e}),a=r.options,l=r.keepPattern,s=(null!=a.readonly?a:s).readonly,n=s?"view":l?c:n?"applying":"view";r.pattern=n,l&&t.elem||(e.attr("class","").empty().addClass(this.className.item),t=C("
    ").addClass(this.className.controlContainer).addClass(this.className.relateProperty).attr("data-position",JSON.stringify([i.x,i.y])).attr("data-type",a.type).attr("data-contextmenu",r.contextmenu),r.container=t,"view"!=n&&!l||s||"applying"!=c||(l=C('
    '),e[0].classList.add("formbuilder-table-cell-editable"),r.tip=l),a.label&&(s=C.extend(!0,{},this.toolbox._title,{options:{label:a.label}})[n](),t.append(s)),o&&r.beforeInit(),(e=r[n]())?t.append(e):e=r.container.children(),r.elem=e,this.addControlObj(i.x,i.y,r),i.delayLoad?r.loaded=!1:(this.addControlElem(r),r.loaded=!0),"applying"==c&&this.proxyControlValue(r))},a.prototype.addControlElem=function(e){var{$content:t,container:i,options:n={},tip:o=""}=e,n={x:n.x,y:n.y},o=[o,i];t?.empty().append?.(o),this.updatePropertyItems(e,e.options,e.property,n)},a.prototype.proxyControlValue=function(e){let t=e.options,i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e.valueChange?.(),i=null},10)},o=e=>{let t;return null!==e&&"object"==typeof e?u.Proxy&&(t=new Proxy(e,{set(e,t,i){return e[t]=i,n(),!0}})):t=e,t},a=o(t.value);Object.defineProperty(t,"value",{enumerable:!0,configurable:!0,get(){return a},set(e){a=o(e),n()}})},a.prototype.activeCellChange=function(e,t){var o=this;function i(e,t){var i,n;e&&0!=e.length&&(e={x:(e=JSON.parse(e.attr("data-position")))[0],y:e[1]},i=(n=o.findControlObj(e.x,e.y)||{}).options,t||n.updateValue&&n.updateValue(),i&&o.addControl(n.container.parent(),i,e,t,!1))}e&&i(e),t&&i(t,!0),(this.$activeCell=t)||this.clearActiveCell()},a.prototype.clearActiveCell=function(){this.$activeCell=null,this.grid.clearActiveCell()},a.prototype.addNewItems=function(){var a=this,e=this.grid.options.controls,r=this.data.controls,l=this.cacheData.delayLoadControls=[],t=this.elem,s=this.data.rows,c=3*t.height()/2,d=0;h.each(e,function(e,i){let t=s[i]["height"],n,o=[];t-=0,isNaN(t)&&(t=32),d+=t,n=c{setTimeout(e({timeRemaining(){return 1/0}}))});e(function(e){let t=e.timeRemaining();if(0{a.addControlElem(e)}),setTimeout(()=>{n()},500))}},{timeout:1e4})}()},a.prototype.onScroll=function(){this.onControlScroll(),this.onLoadScroll()},a.prototype.onControlScroll=function(){let e=this.cacheData,t=e.controlScrollTimer;var i;t||(i=(i=this.$activeCell)&&JSON.parse(i.attr("data-position")),e.controlScrollTimer=setTimeout(()=>{e.controlScrollTimer=null},500),i&&(i={x:i[0],y:i[1]},this.findControlObj(i.x,i.y)?.scroll?.()))},a.prototype.onLoadScroll=function(){let u=this,n=this.$wrap,p=this.cacheData,o=this.builder.options.pattern,e=p.loadScrollTimer;p.allLoaded||(e?clearTimeout(e):this.showLoading(),p.loadScrollTimer=setTimeout(()=>{p.loadScrollTimer=null;var e=n.height(),t=e/2,i=n.scrollTop(),{controls:i=[],allLoaded:e}=function(n,o){let e=u.grid.options,a=e.rows,r=p.delayLoadControls,t=a.length,l=0,s=[];for(let i=0;in&&lo)break}return{controls:s,allLoaded:function(){let t=!0;for(let e=0;e{let[i,n]=e.split(":"),o,a,r,l,s,c,d,u,p;i-=0,n-=0,s=(u=(o=b?f[b]:g).find?.(e=>e.x==i&&e.y==n))?.id,u?.type&&(l=(b?(e="horizontal"!=o[0]["extension-direction"],r=(e?h:u).x,e?u:h):(r=u.x,u)).y,r==h.x&&l==h.y||s==h.id?C.extend(v,t):(p=m.findControlObj(r,l),{options:c}=p,(b||c?.id==s||(p=m.findControlById(s),{options:c}=p,c?.type))&&(d=C.extend(!0,{},c,t),(a=c.type)==h.type&&(y.options=d),w[a]=c,x.push(d),y.controls.push(p))))}),y},a.prototype.updateCellsData=function(e){for(var t,i,n,o=0,a=e.length;o'),C(document).find("head").append(e)),this.$meta=e)},a.prototype.autoFitFullScreen=function(){var e,t,i,n;this.builder.options.autoFitFullScreen&&(e=this.$meta,t=u.screen.width,i=this.grid.getWidth(),n=Number((t/i).toFixed(2))-.02,t{e instanceof Array!=0&&e.forEach(t=>{for(let e=t.length-1;0<=e;e--){var i=t[e]?.type;i&&-1");for(t in i)!(e=i[t])||e.hidden||n.append(this.addItem(t,e));this.$wrap.append(n)},r.prototype.addItem=function(e,t){this.grid;var i,n,o=this.createElement(this.elementTypes.label,e,t),e=this.createElement(this.elementTypes[t.type]||this.elementTypes.textbox,e,t),t=this.className.item;return"block"===e.display&&(t+=" "+this.className.blockItem),t=C("
    "),i=C("
    "),n=C("
    "),i.append(o.create()),e.beforeInit(),e.elem=e.create(),e.bindEvent&&e.bindEvent(),this.bindElementUpdateEvent(e),n.append(e.elem),t.append(i).append(n),t},r.prototype.createElement=function(e,t,i){e=C.extend(!0,{},e,{builder:this.builder});return e.options.value=this.owner.data[t],e.options.source=i.source,e.options.name=t,e.options.text=i.text,e.options.prop=i,e.options["extend-params"]=i["extend-params"],e},r.prototype.bindElementUpdateEvent=function(e){var t,i=e.elem,n=e.updateEvent&&e.updateEvent(),o=this,a=this.owner,r=this.items;if(n)for(var l=0,s=n.length;l");for(var r=0,l=e.length;r"),a.join("")},l.prototype.createItem=function(e,t,i){var n,o,a=i.slice();if("string"==typeof e){if(!(n=this.items[e]))return p.log("toolbox not find "+e,!0),"";n=this.template.item({className:{content:this.className.itemContent,item:this.className.item,icon:this.className.itemIcon,title:this.className.itemTitle},type:n.type,path:a.join(" "),icon:this.builder.getImage(n.icon),text:n.getLocalText()})}else"object"==typeof e&&(i.push(e.text),e.path=i,a=this.builder.getImage(e.expand?this.expandImage:this.collapseImage),o=e.expand?"":" data-collapse='true' ",n=this.template.group({className:{group:this.className.group,title:this.className.groupTitle,icon:this.className.groupIcon,text:this.className.groupText},expand:o,icon:a,text:e.text,items:this.createItems(e.children,++t,i,!e.expand)}));return n},l.prototype.getItem=function(e){return this.items[e]||{}},l.prototype.bindExpandEvent=function(){var n=this;this.elem.find("."+this.className.groupIcon).click(function(){var e=C(this),t=!e.attr("data-collapse"),i=e.parent().next();t?(e.attr("src",n.builder.getImage(n.collapseImage)),e.attr("data-collapse",!0),i.hide()):(e.attr("src",n.builder.getImage(n.expandImage)),e.removeAttr("data-collapse"),i.show())})},l.prototype.destroy=function(){this.className=null,this.builder=null,this.items=null,this.language=null,this.order=null,this.showLabel=null,this.localLanguage=null,this.elem.remove(),this.elem=null},s.prototype.create=function(e){var t=this.className;this.builder=e,this.design=e.workspace,this.container=this.design.elem,this.grid=this.design.grid,e=this.template.container({className:{container:t.container,items:t.items}}),this.elem=C(e),this.wrapElem=this.elem.find(">."+t.items),this.elem.appendTo("body"),this.bindEvent()},s.prototype.createItems=function(e){for(var t,i,n=this.grid,o=this.className,a=0,r=this.builder.options.contextmenu.order,l=this.contextmenus,s=0,c=r.length;s=n.count?n.count:t,n.goPaging(t)):i.hasClass(n.className["btn-index"])&&(t=i.attr("data-index"),t=Number(t),isNaN(t)||n.goPaging(t))})},e.prototype.addNewPaging=function(){++this.count,this.renderPageCount(),this.goPaging(this.count)},e.prototype.goPaging=function(e){var t;this.builder.workspace.verify&&!1===this.builder.workspace.verify()||(t=this.elem,e!==this.current&&(this.current=e,t.find("."+this.className["btn-index"]).removeClass(this.className["btn-selected"]),t.find("[data-index='"+e+"']").addClass(this.className["btn-selected"]),this.workspace.renderByPageIndex(e)))},c.prototype.bindEvent=function(){var o,a=this.items||[],r=this.order,l=C.extend({},this.design.className,this.grid.className),s=this.grid,e=s.container,c=this.builder.options.pattern;e.on("keyup",this.keydownEvent=function(e){let t,i,n;for(t=0,i=r.length;t
    `),this.$content=this.$wrap.find("."+n.content),this.$elem=this.$wrap.find("."+n.items),this.$container.append(this.$wrap),this.createItems(this.order,"top",this.$elem),this.updateArrowVisible(),this.bindBaseEvents()},d.prototype.createItems=function(e,t,i,n){let o=this.menu,a=this.menucontrol,r=this.controls,l,s;for(var c,d,u=0,p=e.length;u
    "].join(""))},d.prototype.createItem=function(e,t,i,n,o){var a=this.menu,r=e.options,l=e.type,a=C.extend(!0,{},a[l],e,{options:r,builder:this.builder,config:e,container:n,level:i,order:t});return a.parent=o||null,a.elem=a.create(),a.elem.addClass(this.className.item),a.bindEvent&&a.bindEvent(),this.bindElementUpdateEvent(a),n.append(a.elem),this.createSubmenu(e,t,a),this.items.push(a),a},d.prototype.createSubmenu=function(e,i,n){var o,a,t=n.elem,r=this.className,l=t.children(),s=this.builder.elem,e=e["options"],{}=e,c=this;i.children&&0
    `)).mousedown(function(e){"INPUT"===e.target.nodeName.toUpperCase()?l.attr("data-stop-blur-event",!0):e.preventDefault()}),a.on("blur","input",function(){c.hideSubmenu(a,o)}),o=C(` `).mousedown(function(e){var t=C(this);a.attr("created")||(c.createSubmenuItems(n,i.children,a),a.attr("created",!0)),t.attr("data-open")?(c.hideSubmenu(a,t),l.removeAttr("data-stop-blur-event")):(l[0].focus(),l.attr("data-stop-blur-event",!0),c.showSubmenu(a,t),(t=l.attr("data-setTimeoutId"))&&clearTimeout(t),t=setTimeout(function(){o.attr("data-open")&&l.removeAttr("data-stop-blur-event")},200),l.attr("data-setTimeoutId",t)),e.preventDefault()}),l.on("blur",function(){setTimeout(function(){l.attr("data-stop-blur-event")?l.removeAttr("data-stop-blur-event"):c.hideSubmenu(a,o)},0)}),t.append(o),n.arrows=o,s.append(a))},d.prototype.createSubmenuItems=function(e,t,i){this.createItems(t,"sub",i,e)},d.prototype.showSubmenu=function(e,t){let i=t.parent(),n=this.builder.elem,o=this.builder.workspace.elem,a=i.height(),{left:r,top:l}=n.offset(),{left:s,top:c}=i.offset(),d=o.offset()["left"],u=e.outerWidth(),p=o.outerWidth(),h;(h=s-r)+u>d+p&&(h=d+p-u-5),e.css({left:h+"px",top:c-l+a+"px"}).show(),t.attr("data-open","true")},d.prototype.hideSubmenu=function(e,t){t.removeAttr("data-open"),e.hide()},d.prototype.hideAllSubmenu=function(){this.$elem.find(">div>a,>div>input").each(function(){this.blur()})},d.prototype.bindBaseEvents=function(){let{$wrap:o,$content:a}=this,r=!1,l=this,s=this.className;o.on("click","."+s.arrow,function(e){let t=C(this),i=a.width(),n=a.scrollLeft();o.children("."+s.prev),o.children("."+s.next);t.hasClass(s.prev)?n=Math.max(n-i,0):n+=i,r=!0,a.scrollLeft(n),l.updateArrowVisible()}),a.on("scroll",function(){r?r=!1:l.updateArrowVisible()})},d.prototype.bindElementUpdateEvent=function(t){var e,i=t.elem,n=t.updateEvent&&t.updateEvent(),o=this;if(n)for(var a=0,r=n.length;a","
    ","
    ",""].join("")),this.elem.append(this.loading)},m.prototype.createMenu=function(){this.menu=new d,this.menu.create(this.elem,this)},m.prototype.createDesignWorkspace=function(){var e=this.elem,t=C("
    "),i=C("
    "),n=C("
    ");this.toolbox=new l,this.toolbox.create(i,this),this.proerty=new r,this.proerty.create(n,this),this.elem.append(i),this.elem.append(t),this.elem.append(n),this.workspace=new o,this.workspace.create(t,this),this.proerty.grid=this.workspace.grid,this.bindDrag(),this.contextmenu=new s,this.contextmenu.create(this),this.shortcutKey=new c(this),this.showProperty("_table","table",{x:-1,y:-1}),e.on("contextmenu",function(){return!1})},m.prototype.createApplyingWorkspace=function(){var e=C("
    ");this.elem.append(e),this.workspace=new a,this.workspace.create(e,this),this.createPaging(),this.shortcutKey=new c(this)},m.prototype.createViewWorkspace=function(){var e=C("
    ");this.elem.append(e),this.workspace=new t,this.workspace.create(e,this),this.createPaging()},m.prototype.createPaging=function(){this.options&&this.options.data.table.paging&&(this.elem.addClass(this.className.hasPaging),this.paging=new e,this.paging.create(this.elem,this))},m.prototype.showProperty=function(e,t,i){var n=this.workspace.grid,o=n.getPropertyControl(e,i),a=n.getPropertyData(e,t,i),n=n.getPropertyItems(e,t,i);this.proerty.show(n,a,i,o)},m.prototype.getDrakeContainers=function(){var e=this.workspace,t=this.toolbox,t=t.elem.find("."+t.className.itemContent).toArray();return e.elem.find("."+e.className.enableDrop).toArray().concat(t)},m.prototype.bindDrag=function(){var t=this,a=this.workspace,r=a.grid,o=this.toolbox,e=this.getDrakeContainers(),l=i(e,{moves:function(e,t,i){var n="."+o.className.itemContent;return p.log("into moves"),0div."+this.className.dragging).length},m.prototype.loadData=function(e){var t=this.workspace,i=t.grid;this.options.data=e,this.workspace.data=e,i.options=e,i.update(),t.renderGrid(),this.showProperty("_table","table",{x:-1,y:-1})},m.prototype.getData=function(){var e=this.workspace,t=e.getData();return e.processData(t),t},m.prototype.export=function(){return this.workspace.exportData()},m.prototype.check=function(){return this.workspace.checkValue()},m.prototype.resize=function(e,t){var i=this.elem.parent(),n=this.menu,o=this.options.pattern,a=t||i.height();!t&&(a<=0||"BODY"===i[0].nodeName.toUpperCase())?(a="auto",this.elem.addClass(this.className.autoHeight)):this.elem.removeClass(this.className.autoHeight),this.elem.width(e=e||"100%"),"design"===o&&"auto"===a&&(a=C(u).height()-12),this.elem.height(a),n?.resize()},m.prototype.resizeControls=function(){var e,t,i,n,o,a,r,l,s,c=this.options.pattern;if(this.workspace)for(n=0,t=(e=this.workspace.grid.options.controls).length;n${"+e+"}")},applying:function(){},view:function(){var e=this.options.value;return p("")},getValue:function(){return this.options.value},setValue:function(){},updateValue:function(e){null!=e?(this.options.value=e,this._updateContent()):(e=this.getValue(),this.options.value!=e&&(this.options.value=e))},applyingRemove(){},checkValue:function(){var e=this.options,t=e.value,i=(e.check,e.readonly),n=e.required;e["check-tooltip"]||this.getLocalText("unchecked");return!(n&&!(t&&0!=t?.length||i))},updateProperties:function(){var e=this.builder.workspace,t=this.property,i=this.options;e.updatePropertyItems.call(e,this,i,t)},getGrid:function(){return this.builder.workspace.grid},beforeInit(){this._beforeInit()},beforeGetData(){},scroll(){},valueChange(){this._valueChange()},_beforeInit(){this._setCascadeMap(),this._setDefaultValue()},_setCascadeMap(){let{options:e,builder:t}=this,i=t.workspace["cacheData"],n=i["cascadeMap"],{_designX:o,_designY:a,cascade:r={}}=e,{variable:l=[],script:s=[]}=r;n=n||(i.cascadeMap=new Map),1==s.length&&l.length&&l.forEach(e=>{let t=e["position"],i=n.get(t);i||(i=new Set,n.set(t,i)),i.add(o+":"+a)})},_setDefaultValue(){let e=this.options,t=this.builder.options,{defaultValue:i,value:n}=e,o,a;if(null!=i&&(null==n||""==n)){if(1==(i=i.split(".")).length)a=e[i[0]];else for(o=t;0{s.push({position:e})}),{controls:c,row}=d.getEffectCell(e,s),c.forEach((t,n)=>{let o=t.options,a=row[n+1],{variable:e=[],script:i=[]}=o.cascade||{},r=e.filter(e=>!(!e.position||!e["variable-name"])),l=i[0]?.cascadeFn,s=o.value,c;if(r?.length&&l){let e=d.getEffectCell(o,r)["row"],i={};e.forEach(e=>{var{"variable-name":e,value:t}=e;e&&(i[e]=t||"")});try{l="return "+l,c=new Function("params",l)(p.extend(!0,{},i))}catch(e){n=e["message"],n={message:n,error:e,errorType:"exeError",target:"control",options:a};u?.error?.(n)}null!=c&&c!==s&&t?.updateValue(c)}}))},_valueChange2(){var i=this.options,a=this.builder.workspace,{variable:r=[],script:l=[]}=i.cascade||{},r=r.filter(e=>!(!e.position||!e["variable-name"])),l=l.filter(e=>!(!e.position||!e.cascadeFn));if(r?.length&&l?.length){let e=a.getEffectCell(i,r)["row"],{row:n,controls:t}=a.getEffectCell(i,l),o={};e.forEach(e=>{var{"variable-name":e,text:t,value:i}=e;o[e]=t||i||""}),t.forEach((e,t)=>{var{cascadeFn:t="",value:i}=n[t+1]||{},t="return "+t,t=new Function("params",t)(p.extend(!0,{},o));null!=t&&t!==i&&e?.updateValue(t)})}},_updateContent(){var{options:e,builder:t,pattern:i,property:n}=this,t=t["workspace"],o=this.elem,i=this[i](),a={x:e.x,y:e.y};(this.elem=i).insertAfter(o),o.remove(),t.updatePropertyItems(this,e,n,a)},_updateOptions:function(e){this.options=p.extend(this.options,e)},property:{value:{hidden:!0,type:"textbox"},check:{type:"textbox",hidden:!0},className:{type:"textbox",hidden:!0,update:function(e){this.elem.addClass(e)}},"font-family":{text:"font-family",type:"combox",conver:function(e){return e=e||""},source:p.formbuilder["FONT-FAMILY"],update:function(e){this.container.css("font-family",e),this.container.find("*").css("font-family",e)}},"font-size":{text:"font-size",type:"combox",after:"vertical-align",source:p.formbuilder["FONT-SIZE"],conver:function(e){return e=e||""},update:function(e){this.container.css("font-size",e+"px"),this.container.find("*").css("font-size",e+"px")}},"font-weight":{text:"font-weight",type:"bool",source:{text:"font-weight",image:"font-weight.png"},update:function(e){e=e?"bolder":"normal";this.container.css("font-weight",e),this.container.find("*").css("font-weight",e)}},"font-style-italic":{text:"font-style-italic",type:"bool",source:{text:"font-style-italic",image:"font-style-italic.png"},update:function(e){e=!0===e?"italic":"normal";this.container.css("font-style",e),this.container.find("*").css("font-style",e)}},"text-decoration-underline":{text:"text-decoration-underline",type:"bool",source:{text:"text-decoration-underline",image:"text-decoration-underline.png"},update:function(e){!0===e?this.elem.css("text-decoration","underline"):this.elem.css("text-decoration","none")}},color:{text:"color",type:"colorpicker",update:function(e){this.container.css("color",e),this.container.find("*").css("color",e)}},overflow:{text:"overflow",hidden:!0,type:"bool",source:{text:"overflow",image:"overflow.png"},update:function(e){this.container.parent().css({overflow:e?"auto":"hidden"})}},id:{text:"id",type:"textbox",source:{readonly:!0}},"extension-direction":{text:"extension-direction",type:"combox",source:[{text:" ",value:""},{text:"direction-vertical",value:"vertical"}]},"relation-position":{text:"relation-position",type:"textbox",source:{placeholder:"row-and-col"}},"auto-merger-cell":{text:"auto-merger-cell",hidden:!0,type:"bool",source:{text:"auto-merger-cell",image:"auto-merger-cell.png"},update:function(e){}},"fill-dynamic-data":{hidden:!0,text:"fill-dynamic-data",type:"textbox"},anchoring:{hidden:!0,text:"anchoring",type:"bool",source:{text:"anchoring",image:"anchoring.png"},update:function(e){}},"height-container":{hidden:!0,order:1001,after:"vertical-align",update:function(e,t){var i=this.container.parent(),n=i.parent(),n=this.getGrid().getCellHeight(n,t);i.height(n)}},width:{text:"width",type:"textbox",after:"align",order:1002,conver:function(e){return!isNaN(e)&&e?Number(e):e||""},update:function(e){this.container.outerWidth(e),this.container.attr("data-width",e)}},height:{text:"height",hidden:!0,type:"textbox",after:"vertical-align",order:1003,conver:function(e){return!isNaN(e)&&e?Number(e):e||""},update:function(e){this.container.height(e),this.container.attr("data-height",e)}},align:{text:"align",type:"buttons",order:1004,source:[{name:"left",text:"align-left",image:"align-left.png",selected:!1},{name:"center",text:"align-center",image:"align-center.png",selected:!0},{name:"right",text:"align-right",image:"align-right.png",selected:!1}],update(e){var t=this.$content,i="start";switch(e){case"center":i="center";break;case"left":i="start";break;case"right":i="end"}t.css({"justify-content":i})}},"vertical-align":{text:"vertical-align",type:"buttons",order:1005,source:[{name:"top",text:"vertical-align-top",image:"vertical-align-top.png",selected:!0},{name:"middle",text:"vertical-align-middle",image:"vertical-align-middle.png",selected:!1},{name:"bottom",text:"vertical-align-bottom",image:"vertical-align-bottom.png",selected:!1}],update:function(e,t){var i=this.$content,t="center";switch(e){case"top":t="flex-start";break;case"middle":t="center";break;case"bottom":t="flex-end"}i.css({"align-items":t})}},"text-align":{text:"text-align",type:"buttons",order:1005,source:[{name:"left",text:"align-left",image:"text-align-left.png",selected:!0},{name:"center",text:"align-center",image:"text-align-center.png",selected:!1},{name:"right",text:"align-right",image:"text-align-right.png",selected:!1}],update:function(e){this.container.css("text-align",e)}},readonly:{text:"readonly",type:"bool",source:{text:"readonly",image:"anchoring.png"},update:function(e){}},defaultValue:{text:"defaultValue",hidden:!0,type:"combox",source:[{text:" ",value:""},{text:"applicant-department",value:"systemInfo.applicantDepartment"},{text:"applicant-name",value:"systemInfo.applicantName"},{text:"applicant-phone-number",value:"systemInfo.applicantPhoneNumber"},{text:"application-date",value:"systemInfo.applicationDate"},{text:"process-id",value:"systemInfo.processId"},{text:"process-steps",value:"systemInfo.processSteps"},{text:"form-number",value:"systemInfo.formNumber"}]},required:{text:"required",type:"bool",source:{text:"required",image:"anchoring.png"},update:function(e){}},cascade:{text:"cascade",type:"groupOptions",hideSelect:!0,hidden:!0,groups:[{name:"variable",text:"define-variables",elems:[{name:"position",placeholder:"positionTip"},{name:"variable-name",placeholder:"variable-name"}]},{name:"script",text:"define-script",hideAdd:!0,hideRemove:!0,elems:[{name:"cascadeFn",type:"textarea",placeholder:"cascadeFn"}]}],excludePattern:["applying","view"],updateInLoad:!1,update:function(e){this._updateOptions({cascade:e})}}}},p.formbuilder.toolbox.add=function(e,t){this[e]=p.formbuilder.toolbox._add(e,t)},p.formbuilder.toolbox._add=function(e,t){return p.extend(!0,{},this._base,t,{type:e,options:{type:e}})}}(jQuery,_),function(e){"use strict";e.formbuilder.toolbox.add("_title",{title:"title",icon:"icon-title",design:function(){return e("
    ").addClass(this.className)},applying:function(){return this.design()},className:"formbuilder-control-title",options:{label:"",value:"label",className:""}})}(jQuery),function(c,d){"use strict";c.formbuilder.toolbox.add("label",{title:"label",icon:"label.svg",cache:{indent:[]},design:function(){return c("")},applying:function(){return this.design()},view:function(){return this.design()},getMultiLanguage:function(e){var t="",i=this;return"i18n"===e?d(this.property["multi-language"].source).chain().map(function(e){return e.name}).each(function(e){e=i.options.i18n[e];e&&(t=t?t+"\n"+e:e)}).value():t=this.options.i18n[e],t=t||""},getValue:function(){return this.options.value},setValue:function(e){this.options.value=e},className:{container:"formbuilder-control-label",vertical:"formbuilder-control-label-vertical",space:"formbuilder-control-label-space"},options:{label:"",value:"label",className:"",readonly:!0,"multi-language":"zh-CN",i18n:{"zh-CN":"",en:""}},property:{height:{hidden:!1},value:{text:"value",hidden:!1,type:"textarea",after:["font-size"],designUpdate:function(e,t,i){var n=this.property.value.update;e=this.property.value.getRealValue.call(this,e),d.trim(e)?this.elem.css({opacity:1,filter:"Alpha(opacity=100)"}):(e=this.title,this.elem.css({opacity:.3,filter:"Alpha(opacity=30)"})),n.call(this,e,t,i)},update:function(e,t,i){var e=this.property.value.getRealValue.call(this,e).split("\n"),r=[],l=i["word-vertical"],s=this;this.cache.indent=[],d.each(e,function(e){var t,i,n,o,a="[--]";l&&(e=(e=d.map(e.split(""),function(e){return e+"
    "})).join("")),t=c.trim(e),n=(o=(i=e.replace(t,a)).split(a))[0]?o[0].length:0,o=o[1]?o[1].length:0,s.cache.indent.push({left:n,right:o}),e=i.replace(/ /g,"").replace(a,t),r.push("

    "+e+"

    ")}),this.elem.html(r.join("")),l?this.elem.addClass(this.className.vertical):this.elem.removeClass(this.className.vertical)},getRealValue:function(e){return e||(e=this.getMultiLanguage(this.options["multi-language"]),this.options.value=e),e}},"text-vertical-align":{text:"text-vertical-align",type:"buttons",updateInLoad:!0,source:[{name:"top",text:"vertical-align-top",image:"text-align-top.png",selected:!0},{name:"middle",text:"vertical-align-middle",image:"text-align-middle.png",selected:!1},{name:"bottom",text:"vertical-align-bottom",image:"text-align-bottom.png",selected:!1}],update:function(e){this.container.find("p").css("vertical-align",e)}},"word-vertical":{text:"word-vertical",type:"bool",after:["value"],updateInLoad:!0,source:{text:"word-vertical",image:"word-vertical.png"},update:function(e,t,i){}},"font-size":{text:"font-size",type:"combox",after:["vertical-align","text-align","text-vertical-align","width","height","line-height","indent"],updateInLoad:!0,source:c.formbuilder["FONT-SIZE"],conver:function(e){return e=e||""},update:function(e){this.elem.find("p").css("font-size",e+"px")}},"font-family":{update:function(e){this.elem.find("p").css("font-family",e)}},"line-height":{text:"line-height",type:"text",updateInLoad:!0,order:2001,update:function(e,t,i){e&&this.elem.find("p").css("line-height",e+"px")}},indent:{text:"indent",type:"text",updateInLoad:!0,order:2002,conver:function(e){return!1===isNaN(e)?Number(e):e},update:function(e,t,i){var n,o,a;e&&(o=(n=this).elem.find("."+this.className.space),(a=this.elem.find("p")).css({"text-align":"left","padding-left":"0"}),o.css({"margin-left":0,"text-align":"left"}),d.isNumber(e)?o.css("margin-left",e+"px"):"auto"===e&&(this.container.outerWidth("100%"),this.elem.width("100%"),this.options.width="100%",a.each(function(e){e=n.cache.indent[e];e&&(0',"","","","","",""].join("");return t(e).attr({name:this.options.name,type:this.options.type}).addClass(this.className)},className:"formbuilder-control-button",options:{label:"",name:"",icon:"button.svg",value:"button",className:""},property:{value:{text:"value",type:"textbox",update:function(e){e&&this.elem.find(">a>span").text(e).show()}},icon:{text:"value",type:"textbox",update:function(e){e&&this.elem.find(">a>img").attr("src",this.getImage(e)).show()}},"text-align":{hidden:!0},color:{text:"color",type:"colorpicker",update:function(e){this.container.css("color",e)}}},getImage:function(e){return e&&-1!==e.indexOf("/")?e:this.builder.getImage(e)}})}(jQuery),function(i){"use strict";var e,t,n={title:"datactrls",icon:"datactrls.svg",design:function(){var e=this.getImage(this.options.value[0]),t=this.getImage(this.options.value[1]),e=["
    ",""," ","",""," ","","
    "].join("");return i(e).attr({name:this.options.name,type:this.options.type}).addClass(this.className)},applying:function(){var e=this.design();return this.bindEvent(e),e},view:function(){},bindEvent:function(e){var t=e.find("."+this.className+"-insert"),e=e.find("."+this.className+"-remove"),i=this.builder.workspace.grid,n=this.options.datasetId;n&&(t.on("click",function(e){i.insertDatasetRowBySelected(n)}),e.on("click",function(e){i.removeDataRowBySelected(n)}))},className:"formbuilder-control-datactrls",keepPattern:!0,options:{label:"",name:"",icon:"",value:["data-insert.png","data-remove.png"],className:"",datasetId:null},property:{"relation-dataset":{text:"relation-position",type:"textbox"}},getImage:function(e){return e&&-1!==e.indexOf("/")?e:this.builder.getImage(e)}};for(t in i.formbuilder.toolbox.add("datactrls",n),e=i.formbuilder.toolbox.datactrls.property)e[t].hidden=!0;e.align.hidden=!1,e["relation-dataset"].hidden=!1,e.anchoring.hidden=!1,e.cascade.hidden=!1}(jQuery),function(r){"use strict";r.formbuilder.toolbox.add("checkboxgroup",{title:"checkboxgroup",icon:"checkbox.svg",applying:function(){return this.create(!0)},view:function(){var e,t=this.options.items,i=this.options.value||[],n="";"string"==typeof i&&(i=[i]);for(var o=0,a=t.length;o"+n+"")},create:function(e){return this.enableEdit=e,r("
    ").attr({type:this.options.type,name:this.options.name}).addClass(this.className)},createItems:function(e,t){for(var i,n=[],o=t?"":"disabled='disabled' readonly='readonly' ",a=this.options.value||[],r=0,l=e.length;r","","
    "].join(""));return n.join("")},className:"formbuilder-control-checkboxgroup",options:{required:!1,name:"",value:[],className:"",items:[{text:"option",value:"option"}]},getValue:function(){var t=[],i=this;return 00===e?"Etc/GMT":0e?dayjs(e).utc().format(t):"";const r=(e,t,i)=>e?dayjs.tz(e,"Etc/GMT").utc().tz(o(t)).format(i):"";function e(o){var t={date:{format:"Y-m-d",timepicker:!1},time:{format:"H:i:s",datepicker:!1},datetime:{format:"Y-m-d H:i:s"}}[o];return{applying:function(){var e=this.builder.options.language,i=this,e=(n.datetimepicker.setLocale(e="zhs"!=e&&"zh-CN"!=e?e:"zh"),n("").datetimepicker({...t,onChangeDateTime:function(e,t){i.options.value=t.val()}}).attr({readonly:"readonly",name:this.options.name,placeholder:this.options.placeholder}).addClass(this.className).val(this.options.value));return e.removeAttr("readonly"),e},className:"formbuilder-control-"+o,options:{required:!1,name:"",value:"",className:""},getValue:function(){var e=this.elem;return"INPUT"==e.prop("nodeName")?e.val()||"":this.options.value},property:{value:{text:"value",type:"textbox",source:{},excludePattern:["view"],update:function(e){this.elem.val(e)}},defaultValue:{hidden:!1}},beforeInit:function(){this._beforeInit();var e=this.builder.options,t=e.formatter,e=e.timezone,i=this.options.value;"datetime"==o?this.options.value=r(i,e,t):"date"==o?(this.options.realValue=this.options.value,this.options.value=r(i,e,t).slice(0,10)):"time"==o&&19==i.length&&(this.options.value=i.slice(10,19))},scroll(){this.elem?.datetimepicker?.("hide")},beforeGetData:function(e,t){let i=e.value,n=t.specificDate||"2000-01-01";e.value&&("date"==o?(i+=" 00:00:00",e.value=a(i,t.formatter)):"time"==o?(i=n+" "+i,e.value=i):e.value=a(i,t.formatter))}}}n.formbuilder.toolbox.add("date",{title:"date",icon:"date.svg",...e("date")}),n.formbuilder.toolbox.add("datetime",{title:"datetime",icon:"datetime.svg",...e("datetime")}),n.formbuilder.toolbox.add("time",{title:"time",icon:"time.svg",...e("time")})}(jQuery),function(e){"use strict";e.formbuilder.toolbox.add("hidden",{title:"hidden",icon:"hidden.svg",applying:function(){return e("").attr({type:this.options.type,name:this.options.name}).addClass(this.className).val(this.options.value)},getValue:function(){return"INPUT"==this.elem.prop("nodeName")?this.elem.attr("data-value"):this.options.value},className:"formbuilder-control-hidden",options:{name:"",value:"",className:""},property:{value:{text:"value",type:"textbox",update:function(e){this.elem.attr("data-value",e)}},"text-align":{hidden:!0}}})}(jQuery),function(a){"use strict";a.formbuilder.toolbox.add("radiogroup",{title:"radiogroup",icon:"radio-group.svg",create:function(e){var t=a("
    ").attr({type:this.options.type,name:this.options.name}).addClass(this.className),i=this.options.items;return t.append(this.createItems(i,e)),t},applying:function(){return this.create(!0)},view:function(){for(var e,t=this.options.items,i=this.options.value||"",n=0,o=t.length;n"+i+"")},getValue:function(){var t,i=this,e=this.elem;return e.find("input:radio").length?(e.find("input:radio").each(function(e){if(this.checked)return t=i.options.items[e].value,!1}),t):this.options.value},createItems:function(e,t){for(var i,n=[],o=t?"":'disabled="disabled" readonly="readonly" ',a=0,r=e.length;a','",'
    "].join(""));return n.join("")},className:"formbuilder-control-radiogroup",options:{required:!1,name:"",value:"",className:"",items:[{text:"option",value:"option"}]},property:{value:{hidden:!0},name:{text:"name",type:"textbox",update:function(e){this.elem.find("input:radio").attr("name",e)}},"font-family":{update:function(e){this.elem.find("label").css("font-family",e)}},"font-size":{update:function(e){this.elem.find("label").css("font-size",e+"px")}},"font-weight":{text:"font-weight",type:"bool",source:{text:"font-weight",image:"font-weight.png"},update:function(e){e=e?"bolder":"normal";this.elem.find("label").css("font-weight",e)}},items:{type:"options",multi:!1,excludePattern:["applying","view"],updateInLoad:!1,update:function(e){this.elem.html(this.createItems(e)),this.updateProperties()}},"text-align":{}}})}(jQuery),function(y){"use strict";y.formbuilder.toolbox.add("select",{title:"select",icon:"select.svg",className:"formbuilder-control-select",getOptionsItems:function(e,t,i,n){let o=[],a=i;return y.ajax({url:e,type:t,data:JSON.stringify(n),dataType:"json",async:!1,contentType:"application/json",beforeSend:function(e){e.setRequestHeader("Authorization",a)},success:function(e){200==e.code&&(o=e.data)},error:function(e){console.log(e)}}),o},applying:function(){var e=this.options,t=e.id,i=e.items,n=e.value,o=e.filterable?"":"readonly",a=new Array,r=this,l=this.$content,s=this.source.url,c=this.source.method,d=this.source.token,u=this.builder.options.language,p=("zhs"!==u&&"zh-CN"!==u||(u="zhs"),this.sourceParams()),u=Object.assign({lang:u},p);if(0===i.length&&(i=this.getOptionsItems(s,c,d,u),e.items=i),i&&0'),b=y('"),s=(y(''),y('
    ')),c=(y('
    '),p.append(b),p.append(s),{data:a,opt:e,$content:l});return c.events={change:function({text:e,value:t}){r.options.value=t,r.options.text=e}},b.selectpicker(c),s.on("click",function(){b.selectpicker("clear")}),b.on("keyup",function(e){var t=y(this),i=(o=t.val()).split(";"),n=0,o=i[i.length-1],i=y("#"+t.attr("bomenuid"));i.find(".dropdown-select-li").each(function(e){var t=y(this),i=t.find("a").attr("title");o&&-1===i.indexOf(o)?t.hide():(t.show(),n++)}),0===n?i.hide():i.show(),t.selectpicker("show")}),p},source:{url:"/api/system/modelForm/getModelEnumList",method:"POST"},sourceParams:function(){return{}},updateValue:function(){var e=this.elem.find("input");0!=e.length&&(this.options.value==e.attr("val")&&this.options.text==e.val()||(this.options.value=e.attr("val"),this.options.text=e.val()),e.selectpicker("destroy"))},valueChange(){var e,r=this.options.value;!r||(e=this.options["effect-position"])&&0{var t=this.builder.options.language,i=("zhs"!==t&&"zh-CN"!==t||(t="zhs"),e.sourceParams()),t=Object.assign({lang:t},i,{filterValue:r}),i=this.source.token,n=this.source.url,o=this.source.method,a=(e.options.items=e?.getOptionsItems(n,o,i,t),e.options.value),n=(e.options.text,e.options.items.find(e=>e.value==a));""==n||null==n&&0"+e+"")}}),y.fn.selectpicker=function(e){return"string"==typeof e&&t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void 0:t.init.apply(this,arguments)};var t={opts:{onchange:null},init:function(e){var t=this;y(this).attr("bomenuid")&&y(this).selectpicker("destroy");var i=function(e){for(var t="",i=1;i<=32;i++){var n=Math.floor(16*Math.random()).toString(16).toUpperCase();t+=n,e||8!=i&&12!=i&&16!=i&&20!=i||(t+="-")}return t}()+"bottom";y(this).attr("bomenuid",i).data("o",e);var n,o=e.data,a=t,r=e,e='',l=r||{},s=l.opt.multiple,c=r.$content.width();if(n=y(e).attr("id",i).css({width:c,"z-index":"999999",display:"none",padding:"0","max-height":"300px","overflow-y":"auto"}),y("body").append(n),l.showSelectAll){for(var d=!0,u=0,p=o.length;u':"",g='",g=y(g);(f.Selected||f.selected)&&g.addClass("selected"),s?(m=null==f.Selected?f.selected?"block":"none":f.Selected?"block":"none",(f.Selected||f.selected)&&g.addClass("selected"),"selectAll"==f.type&&(l.$selectAll=g),g.find(".basesprite").css({position:"absolute",right:"10px",top:"4px",display:m}),g.on("mousedown",{me:a,opt:l},function(e){var t,i,n=e.data.me,e=e.data.opt,o=e.$selectAll,a=y(this);n.allowHide=!1,o&&(i=(t=a.parent()).children()),a.hasClass("selectAll")?a.hasClass("selected")?(i.find(".basesprite").css("display","none"),i.removeClass("selected")):(i.find(".basesprite").css("display","block"),i.addClass("selected")):a.hasClass("selected")?(a.find(".basesprite").css("display","none"),a.removeClass("selected"),o&&(o.removeClass("selected"),o.find(".basesprite").css("display","none"))):(a.find(".basesprite").css("display","block"),a.addClass("selected"),o&&i.length-t.children(".selected").length==1&&(o.addClass("selected"),o.find(".basesprite").css("display","block"))),b(n,e),r.onchange&&r.onchange.call(n,{text:n.val(),value:n.attr("val")})})):g.on("mousedown",{me:a,opt:l},function(e){var t=y(this);n.children().removeClass("selected"),t.hasClass("selected")||t.addClass("selected"),v(a),y(a).selectpicker("hide")}),n.append(g)}function b(e,t){for(var i,n=y(e).attr("bomenuid"),o=y("#"+n).children(),a="",r="",l=t.showSelectAll?1:0;l').attr({name:this.options.name,placeholder:this.options.placeholder}).addClass(this.className).val(this.options.value),i=null,n=this;return t.on("input",function(e){i&&clearTimeout(i),i=setTimeout(()=>{var e=t.val();n.options.value=e,i=null},500)}).on("mousedown",function(e){e.stopPropagation()}),t},view:function(){var e=(e=null==(e=this.options.value)?"":e).replace(/\n/g,"
    ");return o(``)},className:"formbuilder-control-textarea",options:{name:"",label:"",value:"",rows:1,className:""},getValue:function(){var e=this.elem;return"TEXTAREA"==e.prop("nodeName")?e.val()||"":this.options.value},property:{value:{type:"textarea",hidden:!0,excludePattern:["view"],update:function(e){this.elem.val(e)}},text:{excludePattern:["design","view"],updateInLoad:!1,update:function(e){this.elem.val(e)}},rows:{type:"textbox",update:function(e){this.elem.attr("rows",e)}},"text-align":{update:function(e){({view:function(e){this.container.css("text-align",e)},applying:function(e){this.container.css("text-align",e)},design:function(e){this.elem.css("text-align",e)}})[this.builder.options.pattern].call(this,e)}},cascade:{hidden:!1}}})}(jQuery),function(e){"use strict";e.formbuilder.toolbox.add("textbox",{title:"textbox",icon:"text.svg",applying:function(){let t=e('').attr({name:this.options.name,placeholder:this.options.placeholder}).addClass(this.className).val(this.options.value),i=null,n=this;return t.on("input",function(e){i&&clearTimeout(i),i=setTimeout(()=>{var e=t.val();n.options.value=e,i=null},500)}).on("mousedown",function(e){e.stopPropagation()}),t},getValue:function(){var e=this.elem;return"INPUT"==e.prop("nodeName")?e.val()||"":this.options.value},className:"formbuilder-control-textbox",options:{label:"",required:!1,placeholder:"",name:"",value:"",className:"","text-align":"left"},property:{name:{text:"name",hidden:!0,type:"textbox",update:function(e){this.elem.attr("name",e)}},defaultValue:{hidden:!1},placeholder:{text:"placeholder",type:"textbox",update:function(e){this.elem.attr("placeholder",e)}},value:{hidden:!0},text:{excludePattern:["design","view"],updateInLoad:!1,update:function(e){e=(e||"").replace(/\n/g," "),this.elem.val(e)}},"text-align":{applyingUpdate:function(e){this.container.css("text-align",e)},viewUpdate:function(e){this.container.css("text-align",e)}},cascade:{hidden:!1}}})}(jQuery),function(t){"use strict";t.formbuilder.toolbox.add("contenteditable",{title:"contenteditable",icon:"contenteditable.svg",applying:function(){var e="ActiveXObject"in window||window.ActiveXObject?"true":"plaintext-only",e=t("
    ").attr({name:this.options.name,placeholder:this.options.placeholder,contenteditable:e}).addClass(this.className);return!!("ActiveXObject"in window||window.ActiveXObject)&&e.on("beforepaste",function(e){var t=window.clipboardData.getData("text");window.clipboardData.setData("Text",t)}),e},view:function(){var e=(e=null==(e=this.options.value)?"":e).replace(/\n/g,"

    ");return t("")},className:"formbuilder-control-contenteditable",options:{name:"",label:"",value:"",className:""},htmlEncode:function(e){return"number"==typeof e?e:(e=e||"",0==(e+="").length?"":(e=(e=(e=(e=(e=e.replace(/&/g,"&")).replace(//g,">")).replace(/ /g," ")).replace(/'/g,"'")).replace(/"/g,"""))},htmlDecode:function(e){var t=e||"";return 0==(t+="").length?"":(t=(t=(t=(t=(t=e.replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/ /g," ")).replace(/'/g,"'")).replace(/"/g,'"')},textTohtml:function(e){var t,i="";if(e)for(var n=0,o=(e=e.split(/\n/g)).length;n"+((t=e[n])?this.htmlEncode(t):" ")+"";return i},htmlToText:function(e){var t,e=e||"";return(window.ActiveXObject||"ActiveXObject"in window)&&e.replace(/

    ((
    )|())<\/div>/gi,"
    ").replace(/

    ((
    )|())<\/p>/gi,"

    "),"\n"===(e=(e=(t=e.match(/(

    [\s\S]*?<\/p>)|(

    [\s\S]*?<\/div>)/gi))?t.join("\n"):e).replace(/(
    )|()/gi,"\n").replace(/ /gi," ").replace(/(

    )|(<\/p>)|(

    )|(<\/div>)/gi,""))[e.length-1]&&(e=e.slice(0,-1)),e=this.htmlDecode(e)},getValue:function(){var e=this.elem.html()||"";return this.htmlToText(e)},property:{value:{type:"textarea",excludePattern:["view"]},text:{excludePattern:["design","view"],updateInLoad:!1,update:function(e){e=this.textTohtml(e);this.elem.html(e)}},"text-align":{update:function(e){({view:function(e){this.container.css("text-align",e)},applying:function(e){this.container.css("text-align",e)},design:function(e){this.elem.css("text-align",e)}})[this.builder.options.pattern].call(this,e)}},color:{text:"color",type:"colorpicker",update:function(e){this.container.css("color",e)}},width:{hidden:!0,order:1002,update:function(e){this.container.outerWidth("100%")}}}})}(jQuery),function(m){"use strict";m.formbuilder.toolbox.add("editbutton",{title:"editbutton",icon:"enable-click-text.svg",applying:function(){var u=this.builder.workspace,p=this.options,e=m('
    '),t=m('
    '),i=m(''),n=m('
    '),h=m("").attr({type:this.options.type,name:this.options.name,readonly:!0,value:p.value}).addClass(this.className).val(this.options.text);return t.append(h),t.append(i),t.append(n),e.append(t),i.on("click",function(e){e.stopPropagation(),h.val("").attr({value:""}),p.text="",p.value=""}),n.find(".editbutton-b-gray-more").css({background:"url(../build/images/"+this.icon+")","background-size":"100% 100%"}),e.on("click",function(e){var t=p["effect-position"],c=u.getEffectCell(p,t),i=(c.isSubCell,c.row),d=0"+(e=null!=e&&""!==e?e:" ")+"")},getValue:function(){var e=this.elem.find("input");return 0==e.length?this.options.value:e.val()},className:"formbuilder-control-editbutton-input",options:{name:"",label:"",value:"",items:function(){},className:""},property:{"font-size":{text:"font-size",type:"combox",after:"vertical-align",source:m.formbuilder["FONT-SIZE"],conver:function(e){return e=e||""},applyingUpdate:function(e){this.elem.css("font-size",e+"px"),this.elem.find("input").css("font-size",e+"px")}},"effect-position":{text:"effect-position",type:"options",hideSelect:!0,elems:[{name:"position",placeholder:"positionTip"},{name:"db-table-field",placeholder:"dbTableName"}],excludePattern:["applying","view"],updateInLoad:!1,update:function(e){this._updateOptions({"effect-position":e})}},url:{hidden:!0},defaultValue:{hidden:!1}},"text-align":{hidden:!0}})}(jQuery),function(b){"use strict";b.formbuilder.toolbox._table={type:"_table",title:"table",icon:"icon-table.svg",filters:{tableIndex:"td.formbuilder-table-cells-all-index",rowIndex:"td.formbuilder-table-row-index",columnIndex:"td.formbuilder-table-column-index,col.formbuilder-table-column-index",row:"tr.formbuilder-table-row",column:"td.formbuilder-table-cell",indexText:"formbuilder-table-index-text"},id:"layout",elem:null,guid:null,contextmenu:"cells",defaultOptions:{rows:[],cells:[],columns:[],controls:[],table:{}},options:{type:"_table"},propertyField:{table:{width:"100%",height:"100%",rows:16,columns:10,className:"","border-style":"border-solid","border-color":"#E1E1E1",paging:!1,center:!0,"print-size":""},row:{height:32,x:null,y:-1},column:{width:120,x:-1,y:null},cells:{},cell:{rowspan:1,colspan:1,"background-color":"","border-style":"","border-color":"",x:null,y:null,x1:null,y1:null}},propertyMap:{table:{map:"table",order:1},row:{map:"rows",position:{x:null,y:-1},order:2},column:{map:"columns",position:{x:-1,y:null},order:3},cell:{map:"cells",position:{x:null,y:null},order:4}},property:{table:{width:{hidden:!0,text:"table-width",type:"textbox",group:"table",excludePattern:null,updateInLoad:!0,update:function(e){this.elem.find("."+this.className.tbodyContent).css("width",e)},conver:function(e){return!isNaN(e)&&e?Number(e):e}},height:{text:"table-height",type:"textbox",group:"table",hidden:!0,updateInLoad:!0,conver:function(e){return!isNaN(e)&&e?Number(e):e},update:function(e){this.elem.css("height",e)}},rows:{text:"table-rows",type:"textbox",group:"table",updateInLoad:!1,checking:function(e){return!isNaN(e)},conver:function(e){return parseInt(e)},update:function(e){this.workspace.renderGrid()}},columns:{text:"table-columns",type:"textbox",group:"table",updateInLoad:!1,after:["center"],checking:function(e){return!isNaN(e)},conver:function(e){return parseInt(e)},update:function(e){this.workspace.renderGrid()}},"border-style":{text:"table-border",type:"buttons",group:"table",updateInLoad:!0,source:b.formbuilder["BORDER-STYLE"].slice(0,2),"extend-params":{rows:2,multiple:!0},update:function(e){e=this.className.table+" border-style--"+e;this.elem.attr("class",e)}},"border-color":{text:"border-color",type:"colorpicker",updateInLoad:!0,source:{defaultValue:"#ccc"},group:"table-cell",update:function(e){var t="#"+this.guid+" td."+this.className.cell;b.formbuilder.createStyle(this.elem,this.guid+"-border-color",t,{"border-color":e})}},paging:{text:"paging",type:"bool",hidden:!0,updateInLoad:!1,source:{text:"paging",image:"paging.png"},update:function(e){}},center:{hidden:!0,text:"table-center",type:"bool",source:{text:"center",image:"center.png"},order:2001,after:["print-size"],update:function(e){e=!1===e?0:"auto";this.elem.find("."+this.className.tbodyContent).css("margin",e)}},"print-size":{text:"print-size",type:"buttons",group:"table",order:2002,updateInLoad:!0,source:b.formbuilder["PRINT-SIZE"],designUpdate:function(e,t,i){var n,o,a=i["print-direction"]||"vertical",r={A3:{width:4*297,height:4*420},A4:{width:4*210,height:4*297},A5:{width:4*210,height:4*148},custom1:{width:4*210,height:4*100}},l=32,s=32,c=0,d=this.elem.find(".formbuilder-print-size");e&&"print-none"!==e?(d.show(),n=this.elem.find("."+this.className.tbodyContainer),o=this.elem.find("."+this.className.tbodyContent),0===d.length&&(d=b("
    "),n.append(d)),r=r[e],"horizontal"===a&&(r={width:(e=r).height,height:e.width}),i.center&&(c=(c=(n.width()-o.width())/2)<0?0:Math.ceil(c)),d.find(".formbuilder-print-size-top").css({width:r.width,top:l,left:s+c}),d.find(".formbuilder-print-size-bottom").css({width:r.width,top:r.height+l,left:s+c}),d.find(".formbuilder-print-size-left").css({height:r.height,top:l,left:s+c}),d.find(".formbuilder-print-size-right").css({height:r.height,top:l,left:r.width+s+c})):d.hide()}},"print-direction":{text:"print-direction",type:"buttons",group:"table",updateInLoad:!1,after:["print-size"],source:b.formbuilder["PRINT-DIRECTION"],designUpdate:function(e,t,i){}}},row:{height:{text:"table-row-height",type:"textbox",group:"table-row",updateInLoad:!1,checking:function(e){return"auto"===e||!isNaN(e)&&("number"==typeof(e=Number(e))&&1<=e)},conver:function(e){return e=isNaN(e)?e:e&&Number(e)},update:function(n,e,t,i){var o=b.formbuilder.getTimestamp(),a=this,e=(i=i||this.getRowSelectedCells(e.x)).$index,r=i.cells;i.$row.css("height",n),e&&(e.css("height",n),e.find(">div:first").css({height:n,"line-height":"auto"===n?"normal":n+"px",overflow:"hidden"})),_.each(r,function(e){var t,e=b(e),i=a.getPosition(e),i=a.findObj(a.options.cells,i.x,i.y,b.formbuilder.DATATYPE.CELLS);e.attr("data-height",n).css("height",n),t=e.find("."+a.workspace.className.relateProperty),a.updateProperties(t,"height-container",void 0,o),b.formbuilder.updatePropertiesByOptions(a.pattern,a,["border-style"],i,[e])})},afterDesignUpdate:function(e,t,i,n){this.resizeRangeHighlight(this.workspace.findRowIndex(t.x),t.x,"row")}}},column:{width:{text:"table-column-width",type:"textbox",group:"table-column",updateInLoad:!1,checking:function(e){return"string"==typeof e&&(e=e.replace(/%/,"")),"number"==typeof(e=isNaN(e)?e:Number(e))&&1<=e},conver:function(e){return!isNaN(e)&&e?Number(e):e},update:function(e,t={},i,n){let o="number"==typeof e?e:e.replace("%",""),a=this,r;(n=n||this.workspace.findColumnIndex(t.y))&&n.css("width",o),r=this.getColumnSelectedCells(t.y).cells,_.each(r,function(e){var e=b(e),t=a.getPosition(e),t=a.findObj(a.options.cells,t.x,t.y);b.formbuilder.updatePropertiesByOptions(a.pattern,a,["border-style"],t,[e])})},afterDesignUpdate:function(e,t,i,n){this.resizeRangeHighlight(this.workspace.findColumnIndex(t.y),t.y,"column")}}},cell:{rowspan:{text:"table-cell-rowspan",type:"textbox",group:"table-cell",after:["border-style"],order:2001,checking:function(e,t){var i=this.options.table.rows;return!isNaN(e)&&!!("number"==typeof(e=Number(e))&&/^[1-9]([0-9]*)?$/.test(e)&&t.x+e<=i)},conver:function(e){return!isNaN(e)&&e?Math.floor(Number(e)):1},update:function(e,t,i){var{x:n,y:o}=t,a=this.options.table["rows"],o=this.findCell(n,o);o&&(a"border-none")),i["border-color"]&&!o&&(i["border-style"]={value:["border-solid","border-solid","border-solid","border-solid"]}),this.renderBorder(n,t,i)},activeValueConver(i,e){var e=e.options.table["border-style"]||e.propertyField.table["border-style"],n=this.source||[];if(null==i||""==i)return e;"object"==typeof i&&(i=i["value"]);for(let e=0,t=n.length;ee!=t))return t}else if(i==t)return t}return i}},"border-color":{text:"border-color",type:"colorpicker",updateInLoad:!1,timestamp:!0,source:{defaultValue:"#ccc"},group:"table-cell",after:["border-style"],update:function(e,t,i){},timestampConver:function(e,t,i){var i=i["border-color"]?.value,n=e;return(n=e instanceof Object?e.value:n)||i?n:null}},"border-position":{text:"cell-border-position",type:"buttons",updateInLoad:!1,group:"table-cell",hidden:!0,source:b.formbuilder["BORDER-POSITION"],update:function(e,t,i){}},"background-color":{text:"background-color",type:"colorpicker",source:{defaultValue:"#fff"},group:"table-cell",after:["border-style"],update:function(e,t){!e||(t=this.findCell(t.x,t.y))&&t.css("background-color",e)}},"oblique-line":{text:"obliqueline",type:"buttons",group:"table-cell",updateInLoad:!0,order:2003,defaultValue:"#ccc",source:b.formbuilder["OBLIQUELINE-STYLE"],update:function(u,p,h){if(u){let e,t,i,n,o,a,r=h["border-color"]?.value||h["border-color"],l,s="obliqueline-none",c="obliqueline-left-one",d=!0;(e=this.findCell(p.x,p.y))&&(t=e.find("."+this.className.obliquelineContainer),u=u||s,0
    ")),u===c&&(i=b("
    "),n=e.width()+2,o=e.height()+2,a=Math.sqrt(Math.pow(n,2)+Math.pow(o,2)),l=Math.atan(o/n)/(Math.PI/180),i.css({width:a+"px",top:0,left:0,"background-color":r??"",transform:"rotate("+l+"deg)","transform-origin":"top left"})),i.appendTo(t),d||t.appendTo(e)))}}}}},workspace:null,getLocalText:function(){return(b.formbuilder.language[this.language]||b.formbuilder.language["zh-CN"]).toolbox[this.title]||this.title||""},getLocalLanguage:function(e){return(b.formbuilder.language[this.language]||b.formbuilder.language["zh-CN"]).table[e]||""},update:function(){var e=this.container.find(">div");e.html(""),this.elem=this.render(),e.append(this.elem),this.cacheRangeElements()},bindEvent:function(){this["bind"+_.upperFirst(this.pattern)+"Event"]()},bindDesignEvent:function(){this.bindSelectCells(),this.updateDrakeContainers(),this.bindResizeIndexCell()},bindApplyingEvent:function(){this.bindDatasetRowEvent(),this.bindActiveCell(),this.getBuilderOptions().enable.applying["event-select-cells"]&&this.bindApplyingSelectCells(),this.bindScroll()},bindViewEvent:function(){this.bindScroll()},className:{table:"formbuilder-table",row:"formbuilder-table-row",cell:"formbuilder-table-cell",cellActive:"formbuilder-table-cell-active",cellActiveTarget:"formbuilder-table-cell-active-target",cellHover:"formbuilder-table-cell-hover",indexAllCell:"formbuilder-table-cells-all-index",indexRow:"formbuilder-table-row-index",indexColumn:"formbuilder-table-column-index",indexCell:"formbuilder-table-cell-index",indexText:"formbuilder-table-index-text",indexCellActive:"formbuilder-table-cell-index-active",extendCell:"formbuilder-table-cell-extend",cellSelect:"formbuilder-table-cell-selected",cellSelectStart:"formbuilder-table-cell-selected-start",cellSelectEnd:"formbuilder-table-cell-selected-end",colResize:"formbuilder-table-cell-index-col-resize",rowResize:"formbuilder-table-cell-index-row-resize",resizing:"formbuilder-table-cell-index-resizing",colIndexResizing:"formbuilder-table-cell-index-col-resizing",rowIndexResizing:"formbuilder-table-cell-index-row-resizing",borderSolid:"formbuilder-table-border-solid",borderSolidHeavy:"formbuilder-table-border-solid-heavy",borderDashed:"formbuilder-table-border-dashed",borderNone:"formbuilder-table-border-none",controlCut:"formbuilder-table-cell-cut",obliquelineContainer:"formbuilder-table-cell-obliqueline-conatiner",obliqueline:"formbuilder-table-cell-obliqueline",buttons:"formbuilder-dataset-buttons",button:"formbuilder-table-button",datasetRemoveButton:"formbuilder-dataset-button-remove",datasetInsertButton:"formbuilder-dataset-button-insert",selectedRange:"frombuilder-table-select-range",selectedRangeBorderH:"frombuilder-table-select-range-border-h",selectedRangeBorderV:"frombuilder-table-select-range-border-v",selectedRangeBorderLeft:"frombuilder-table-select-range-border-left",selectedRangeBorderRight:"frombuilder-table-select-range-border-right",selectedRangeBorderTop:"frombuilder-table-select-range-border-top",selectedRangeBorderBottom:"frombuilder-table-select-range-border-bottom",selectedRangeRow:"frombuilder-table-select-range-row",selectedRangeCell:"frombuilder-table-select-range-cell",tbodyContainer:"frombuilder-table-tbody-container",tbodyContent:"frombuilder-table-tbody-content",cellBorderContainer:"frombuilder-table-cell-border-container",cellBorder:"frombuilder-table-cell-border",cellBorderLeft:"frombuilder-table-cell-border-left",cellBorderRight:"frombuilder-table-cell-border-right",cellBorderTop:"frombuilder-table-cell-border-top",cellBorderBottom:"frombuilder-table-cell-border-bottom"},coverElem:null,rangeElem:{top:null,bottom:null,left:null,right:null},cache:{"cut-control":null,"copy-control":null,which:null,selected:{},startSelect:null,range:{left:0,top:0,width:0,height:0,firstWidth:0,firstHeight:0,endWidth:0,endHeight:0,row:{start:null,end:null},col:{start:null,end:null},position:null,$cell:null},max:{x:0,y:0},dataset:{selected:null,items:null},$activeCell:null},currentRender:{head:{row:null,column:null},body:{rows:function(t,e,i){var n=[],o=this,a=t.length,r=e.length;return i=i||1,_.each(_.range(i,(a||0)+i),function(e){n.push(o.currentRender.body.row.call(o,e,t[e-1],r))}),n.join("")},row:function(e,t,i,n){return this.template.row({className:{row:this.className.row},height:t.height,index:e,columns:this.currentRender.body.columns.call(this,i,e,t,n)})},columns:null,column:null}},template:{container:function(e){return['
    ',"
    "," "," ",e.headHtml," ",e.bodyHtml," ","
    ","
    ","
    ","
    ","
    ","
    ","
    ","
    "].join("")},row:function(e){return["",e.columns,""].join("")},design:{head:{row:function(e){return["",e.columns,"",""].join("")},column:function(e){return["","
    ",e.index,"
    ","
    "," "].join("")}},body:{index:function(e){return["","
    ",e.index,"
    ","
    "," "].join("")},column:function(e){return["",""].join("")}}},applying:{head:{column:function(e){return[""].join("")}},body:{column:function(e){return["",""].join("")}}}},renderTemplate:{design:{head:{row:function(e){return this.template.design.head.row({className:this.className.indexCell+" "+this.className.indexRow,columns:this.currentRender.head.columns.call(this,e)})},columns:function(t){var i=[],n=this,o=t.length;return i.push(n.currentRender.head.column.call(n,-1,-1,o,{})),_.each(_.range(1,(o||0)+1),function(e){i.push(n.currentRender.head.column.call(n,-1,e,o,t[e-1]))}),i.join("")},column:function(e,t,i,n){var o,a=t,r=this.className.indexCell+" "+this.className.indexColumn,l=this.workspace.className,s="";return-1===e&&-1===t?(a="",r=this.className.indexCell+" "+this.className.indexAllCell,o="table"):(o="column",s=this.className.colResize),r+=" "+l.relateProperty,this.template.design.head.column({className:{td:r,resize:i!==t?s:"",text:this.className.indexText},x:e,y:t,type:this.type,field:o,index:a,width:n.width||""})}},body:{columns:function(e,t,i,n){var o=[];if(e){o.push(this.currentRender.body.index.call(this,t,-1,i));for(var a=1;a"),_.each(_.range(1,(n||0)+1),function(e){i.push(o.currentRender.head.column.call(o,-1,e,n,t[e-1]))}),i.push(""),i.push("")),i.join("")},column:function(e,t,i,n){return-1===t?"":this.template.applying.head.column({className:this.className.indexCell+" "+this.className.indexColumn,x:e,y:t,width:n.width||""})}},body:{columns:function(e,t,i){var n=[];if(e)for(var o=1;othis.options.table.rows||o>this.options.table.columns)(l=this.findCellObj(i.x,i.y)).rowspan>c&&--l.rowspan,l.colspan>s&&--l.colspan;else if(l=b(this.findCell(n,o)||this.currentRender.body.column.call(this,n,o,this.workspace.findRowObj(n))),(r=this.findCell(i.x+c-1,i.y+s))&&1===r.length)1===c&&1===s||(r.before(l),this.workspace.addCell(n,o,l),b.formbuilder.refreshPropertiesBySelecteds(this.pattern,this,["border-style"],l));else{if(1===c){if(1===e)continue;a=this.findCell(i.x,i.y)}else a=this.findCell(i.x+c-1,i.y-1);a?a.after(l):this.workspace.findRow(i.x+c-1).append(l),this.workspace.addCell(n,o,l),b.formbuilder.refreshPropertiesBySelecteds(this.pattern,this,["border-style"],l)}this.updateControlProperty(i.x,i.x,i.y,i.y,["height-container"])}},mergeCell:function(e,t,i){var n,o,a,r={start:null,"top-left":null,middle:null};if(0=a.x&&(a.x=e),t>=a.y&&(a.y=t)}var n,o,a,r,l,s,c,d,u,p=e,h=[];if(1u||o>p)){i=c.findCell(n,o);for(var[l,s]of Object.entries(t)){let e=s,t=s?.timestamp;-1===d.indexOf(l)&&("colspan"==l?e=o+s-1>p?p-o+1:s:"rowspan"==l&&(e=n+s-1>u?u-n+1:s),t?h.push({name:l,value:e,timestamp:t,$cell:i}):(a.push(l),r.push(e)))}c.updateProperties(i,a,r)}}).map(function(e){return e.position.x}).uniq().each(function(e){var t=e,e=e+m,t=c.workspace.findRowObj(t),e=c.workspace.findRowIndex(e);c.updateProperties(e,"height",t.height)}).value(),h.sort((e,t)=>e.timestamp-t.timestamp).forEach(e=>{var{$cell:e,name:t,value:i,timestamp:n}=e;c.updateProperties(e,[t],[i],n)}),this.clearSelectedState();for(var s=0,g=t.length;su||x>p||(r.x=y,r.y=x,l.call(this,v,r,b.options),r.x>a.x&&this.options.table.rows-1>=r.x&&(a[0]=r[0]),r.y>a.y&&p-1>=r.y&&(a.y=r.y))}n=this.findCell(r.x,r.y),this.setSelectedRange(i,n)}},pasteCutControl:function(e,t,i){var n,o,a,r,l;i&&({x:o,y:a}=e,{x:r,y:l}=t,(n=this.cache["cut-paste-control"]).has(o+"-"+a)||this.removeControl(e),this.removeControl(t),this.renderControl(i,t),n.add(r+"-"+l))},pasteCopyControl:function(e,t,i){i&&(i.id=null,i["extension-direction"]=null,i["relation-position"]=null,this.removeControl(t),this.renderControl(i,t))},clearAllState:function(){this.elem.find("td").removeClass([this.className.cellSelect,this.className.cellSelectStart,this.className.cellSelectEnd,this.className.indexCellActive].join(" "))},clearSelectedState:function(){this.elem.find("."+this.className.cellSelect).removeClass([this.className.cellSelect].join(" ")),this.elem.find("."+this.className.indexCellActive).removeClass(this.className.indexCellActive)},getStartSelected:function(){return this.elem.find("td."+this.className.cellSelectStart)},getEndSelected:function(){return this.elem.find("td."+this.className.cellSelectEnd)},getSelected:function(){return this.elem.find("td."+this.className.cellSelect)},getSelectedControl:function(){return this.elem.find("td."+this.className.cellSelect+" ."+this.workspace.className.item)},setIndexCellActive:function(e){e&&e.addClass(this.className.indexCellActive)},setColumnActive:function(e){var t=this,e=this.workspace.findColumnCells(e);return e&&0!==e.length?(_.each(e,function(e){e.addClass(t.className.cellSelect)}),e=this.workspace.findAllRowIndex(),_.each(e,function(e){e&&0c.x1&&(o=c.x1),a>c.y1&&(a=c.y1)),d=c.rowspan,1<(u=c.colspan)&&l","
    ",e.removeIcon?["
    "].join(""):"","
    "].join("")},getDatasetRowInfo:function(e){var t,i,n,o=this.workspace.datasetRows;return o?(t=o.vertical,o=o.horizontal,(o=t[i=(e=b.formbuilder.getPosition(e)).x]||o[i])&&"horizontal"===o.type?o=(n=o)[e.y]:n=t,{items:n,item:o}):null},getActiveDatasetRow:function(n,o,e){var a=[],r=this,t=this.workspace.datasetTemplate;return _.each(e,function(i){i.x===n&&i.y===o&&_.each(t[i.id],function(e){var t,e="vertical"===i.type?(t=n,e.y):(t=e.x,o);a.push(r.findCell(t,e))})}),a},setHoverDatasetRow:function(e,t){var i=this;e&&e.length&&_.each(e,function(e){t?e.addClass(i.className.cellHover):e.removeClass(i.className.cellHover)})},setActiveDatasetRow:function(e,t){var i=this;e&&e.length&&_.each(e,function(e){t?e.addClass(i.className.cellActive):e.removeClass(i.className.cellActive)})},bindDatasetRowEvent:function(){var s,e,c,d,u,p;this.pattern===b.formbuilder.PATTERN.APPLYING&&((e=b((s=this).elem)).on("mouseenter","td."+this.className.cell,function(e){var t,i,n,o,a,r=b(this),l={insert_horizontal:"insert-column.png",insert_vertical:"insert-row.png",remove_horizontal:"remove-column.png",remove_vertical:"remove-row.png"},r=(p=s.getDatasetRowInfo(r)||{}).items;(t=p.item)&&(r=_.filter(r||[],function(e){return t.id===e.id}),a=(s.cache.dataset.items=r).length,n=t.x,o=t.y,i=s.findCell(n,o),u=s.getActiveDatasetRow(n,o,r),s.cache.dataset.$row=u,s.setHoverDatasetRow(u,!0),n=s.workspace.builder.getImage(l["insert_"+t.type]),o=s.workspace.builder.getImage(l["remove_"+t.type]),p=t,c&&c.remove(),s.hasDatasetCtrls(t.id)||(d=s.renderDatasetButtons({className:{buttons:s.className.buttons,button:s.className.button+" "+s.className.button+"-"+t.type,insertButton:s.className.datasetInsertButton,removeButton:s.className.datasetRemoveButton},insertIcon:n,removeIcon:1{t.events.onScroll.call(t.workspace)})},unbindScroll(){this.content.unbind("scroll")},getRowSelectedCells:function(e){return{$index:this.workspace.findRowIndex(e),cells:this.workspace.findRowCells(e),$row:this.workspace.findRow(e)}},getColumnSelectedCells:function(e){return{$index:this.workspace.findColumnIndex(e),cells:this.workspace.findColumnCells(e)}},updateMoveRows:function(e,o){var a=this,t=this.options.table.rows;e<=t&&_.each(_.range(e,t+1),function(e){var i,n=e+o,t=a.workspace.findRowIndex(e);t&&(b.formbuilder.setPosition(n,-1,t),t.find("."+a.className.indexText).text(n)),a.workspace.findRow(e).attr("data-rowIndex",n),t=a.workspace.findRowCells(e,!1),_.each(t,function(e,t){i=t+1,e&&b.formbuilder.setPosition(n,i,e)}),t=a.workspace.findRowControls(e,!1),_.each(t,function(e,t){i=t+1,e&&b.formbuilder.setPosition(n,i,e)})})},updateMergeBeforeRemove:function(e,t,i){var n,o,a,r,l=this,s={},e=_.range(e,e+t),c="rowspan"===i?l.workspace.findRowCellsObj:l.workspace.findColumnCellsObj;return _.each(e,function(e){var e=c.call(l.workspace,e),t={};_.each(e,function(e){(1<(a=e[i])||e.x1&&e.y1)&&(o=1{this.bindRowResize(e)}),this.updateInsertRows(e,r,a),this.updateInsertRowsMerge(e,t),this.updateBorderStyle(e-1,this.options.table.rows,1,this.options.table.columns),this.updateDrakeContainers()))},updateInsertRows:function(e,t,i){var n=t.length;this.updateMoveRows(e,n),this.workspace.insertRows(t,e,null,null,i)},updateInsertRowsMerge:function(i,r){var l=this,e=this.workspace.findRowCellsObj(i+r),n=[];_.each(e,function(e){var t=e.x1,e=e.y1;t&&e&&tl.bindColResize(e))):(a=l.workspace.findCell(e,n))?i<=c?a.before(u[e]):a.after(u[e]):(l.workspace.findCellObj(e,n),1<(n=n-1)&&(a=l.workspace.findCell(e,n))?a.after(u[e]):(n=l.workspace.findRowCellsObj(e),(n=_.find(n,function(e){return!e.x1&&!e.y1}))?(a=l.workspace.findCell(n.x,n.y)).after(u[e]):l.workspace.findRow(e).append(u[e])))}),this.updateInsertColumns(i,c,d),this.updateInsertColumnsMerge(i,t),this.updateBorderStyle(1,this.options.table.rows,i-1,this.options.table.columns),this.updateDrakeContainers()},updateMoveColumns:function(e,t,o){var a=this,i=this.options.table.rows;_.each(_.range(1,i+1),function(n){_.each(_.range(e,t+1),function(e){var t=e+o,i=a.workspace.findColumnIndex(e);i&&(b.formbuilder.setPosition(-1,t,i),i.find("."+a.className.indexText).text(t)),(i=a.workspace.findCell(n,e))&&b.formbuilder.setPosition(n,t,i),(i=a.workspace.findControl(n,e))&&b.formbuilder.setPosition(n,t,i)})})},updateInsertColumns:function(e,t,i){var n=i.length;this.updateMoveColumns(e,t,n),this.workspace.insertColumns(i,e,null,null)},updateInsertColumnsMerge:function(i,o){var a=this,e=this.workspace.findColumnCellsObj(i+o),n=[];_.each(e,function(e){var t;e&&(t=e.x1,e=e.y1,t&&e&&ediv."+this.workspace.className.dragging).length},showGridProperty:function(e,t){t=t||e,this.workspace.builder.updateProperty(e),this.workspace.builder.menu.updateItems(t)},updateDrakeContainers:function(){var e=this.workspace.builder;this.pattern===b.formbuilder.PATTERN.DESIGN&&e.drake&&(e.drake.containers=e.getDrakeContainers())},renderControl:function(e,t){e.x=t.x,e.y=t.y,this.workspace.addNewItem(e,t)},findCell:function(e,t){return this.workspace.findCell(e,t)},filterCells:function(e,t,i,n){return(n||this.elem).filter((i||"")+"[data-position='["+e+","+t+"]']")},findObj:function(e,t,i,n){return b.formbuilder.findObj(e,t,i)},findControl:function(e,t){return this.workspace.findControl(e,t)},findControlObj:function(e,t){return this.workspace.findControlObj(e,t)},findControlData:function(e,t){e=this.workspace.findControlObj(e,t);return(e=e.elem?e.options:e).type?e:null},findCellObj:function(e,t){return this.workspace.findCellObj(e,t)},getPosition:function(e){return e.length?b.formbuilder.getPosition(e):{x:null,y:null}},pullObj:function(e,t,i){b.formbuilder.updateSignObj(e,t,i,void 0)},getRealCell:function(e,t){var e=this.findCellObj(e,t)||{},t=e.x1,i=e.y1;return e=t&&i?this.findCellObj(t,i):e},isDefaultBorderStyle:function(e,t){var i=this.options.table["border-style"]||this.propertyField.table["border-style"],n=this.options.table["border-color"]||this.propertyField.table["border-color"];if(e=e||i,!(t=(t["border-color"]||{}).value||n)&&!e)return!0;if(e instanceof Array){if(e.some(e=>e!=i))return!1;e=i}return i===(e||"border-solid")&&n===t||void 0},renderBorderByPosition:function(e,t,i,n,o,a){var r,l=o["border-color"]||{},s=o["background-color"]||"#fff",c={top:"
    ",right:"
    ",bottom:"
    ",left:"
    "},d=(b.formbuilder[this.pattern.toUpperCase()+"BORDERWIDTHITEMS"]||b.formbuilder.BORDERWIDTHITEMS)[t];return t=t||this.options.table["border-style"],this.isDefaultBorderStyle(t,o)?"":(o="border-none"===t?s:l.value||this.options.table["border-color"],c=c[e],r=l=s=d,"border-none"!==t||"top"!==e&&"bottom"!==e||(l=0,r="border-solid-heavy"===a[1]?"right:1px":"right:0px",c=c.replace("right:-1px",r)),c.replace(/\{bgColor\}/,o).replace(/\{borderWidth\}/g,d).replace(/\{zIndex\}/,n).replace(/\{height\}/,i).replace(/\{top\}/,s).replace(/\{left\}/,l).replace(/\{right\}/,r))},renderChangeBorder:function(e,t,i){var n,o=i.x,a=i.y,i=i["border-style"]?.timestamp;"border-none"!==e&&("top"===t?(o-=1,n=2):"right"===t?(a+=1,n=3):"bottom"===t?(o+=1,n=0):"left"===t&&(a-=1,n=1),(e=this.findCellObj(o,a))&&(t=e["border-style"]?.value,e=e["border-style"]?.timestamp,t&&t[n]&&e.formbuilder-border-container").remove(),n=r.value||this.options.table["border-style"],o=a.value||this.options.table["border-color"],r=Math.max(r.zIndex||1,a.zIndex||1),(o||n)&&(this.isDefaultBorderStyle(n,i)?(this.renderChangeBorder(n,"top",i),this.renderChangeBorder(n,"right",i),this.renderChangeBorder(n,"bottom",i),this.renderChangeBorder(n,"left",i)):(a=this.getCellHeight(e,t),(o=[this.renderBorderByPosition("top",n[0],a,r,i,n),this.renderBorderByPosition("right",n[1],a,r,i,n),this.renderBorderByPosition("bottom",n[2],a,r,i,n),this.renderBorderByPosition("left",n[3],a,r,i,n)].join(""))&&(t=["
    ",o,"
    "].join(""),e.append(t)))))},getCellHeight:function(e,t){var i,n=t.x,t=t.y,o=0,a=!1,r=this,t=this.workspace.findCellObj(n,t),l=t.rowspan||1;return _.each(_.range(n,n+(l||1)),function(e,t){if(i=r.workspace.findRowObj(e)){if("auto"===i.height)return!(a=!0);o+=i.height,0=t){for(var a=t-1,r=o.length;a');e.append(i),setTimeout(function(){i.remove(),i=null},5e3)},hasDatasetCtrls:function(e){return this.workspace.datasetCtrls[e]||null},getBuilderOptions:function(){return this.workspace.builder.options},destroy:function(){this.options=null,this.container=null,this.elem.off(),this.elem.empty(),this.elem.remove(),this.elem=null}}}(jQuery,_),function(t){"use strict";t.formbuilder.toolbox.add("image",{title:"image",icon:"image.svg",design:function(){let e=this.options.value;return e&&-1!==e?.indexOf("base64")||(e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJRJREFUeNpi/P//PwMlgImBQsACItLT08lyxsyZMxlZkPiMJOr/T6oXWoH4KxB3khsGRUDMBcR55BrQA3VBP0YgEglqoZhgNIYAcT256UAEiKcCcQOSIfZAPB/qf+zpAAlMB2IxKLsBSjtAsQkQRwDxVXwuCEHjN0A1g4AOEJ8C4gR8LmAkKykjpyxSAeOA50aAAAMATvIa90OAUacAAAAASUVORK5CYII="),t(["
    ","',"
    "].join(""))},view:function(){return this.design()},getValue:function(){return this.options.value},className:{container:"formbuilder-control-image",img:"formbuilder-control-image-img","default-img":"formbuilder-control-image-img-default"},options:{label:"",value:"image.svg",readonly:!0,width:16,height:16},property:{value:{text:"image-upload",hidden:!1,type:"selectImage",source:{text:"image-upload",image:"imageupload.png",url:""},update:function(e){e&&-1!==e.indexOf("base64")||(e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJRJREFUeNpi/P//PwMlgImBQsACItLT08lyxsyZMxlZkPiMJOr/T6oXWoH4KxB3khsGRUDMBcR55BrQA3VBP0YgEglqoZhgNIYAcT256UAEiKcCcQOSIfZAPB/qf+zpAAlMB2IxKLsBSjtAsQkQRwDxVXwuCEHjN0A1g4AOEJ8C4gR8LmAkKykjpyxSAeOA50aAAAMATvIa90OAUacAAAAASUVORK5CYII="),this.elem.find(">img").attr("src",e)}},"font-family":{hidden:!0},"font-size":{hidden:!0},"font-weight":{hidden:!0},"font-style-italic":{hidden:!0},"text-decoration-underline":{hidden:!0},"relation-position":{hidden:!0},"extension-direction":{hidden:!0},readonly:{hidden:!0},required:{hidden:!0},color:{hidden:!0},width:{hidden:!1,after:["height"],afterChecking:function(e){return!e},update:function(e){this.container.width(e),this.elem.outerWidth(e),this.elem.find(">img").outerWidth(e)}},height:{hidden:!1,after:["vertical-align","align"],update:function(e){var t,i,n;this.container.height(e),this.elem.height(e),(n=this.elem.find(">img")).height(e),this.options.width||(e=n.height(),t=(i=n[0]).naturalHeight,i=i.naturalWidth,n.width(n=e*(i/t)),this.container.width(n),this.elem.width(n))}},"text-align":{hidden:!0},cascade:{hidden:!0}}})}(jQuery),function(r){"use strict";r.formbuilder.toolbox.add("file",{title:"fileupload",icon:"file-upload.svg",keepPattern:!0,source:{icon:"file.png",uploadUrl:"",deleteUrl:"",deleteParams:{},onUpload:function(){},onDelete:function(){}},applying:function(){var e=this.getLocalText(),e=r(["
    "," '," ",this["_html-img"]()," ",''," ","",e,""," "," ",this["_html-list"](this.options.value),"
    "].join(""));return this["_bind-applying-event"](e),e},view:function(){return r(["
    ",this["_html-list"](this.options.value,!0),"
    "].join(""))},"_html-img":function(){var e=this.builder.getImage("file-upload.svg");return[""].join("")},"_html-list":function(e,t){return["
    ",this["_html-list-items"](e,t),"
    "].join("")},"_html-list-items":function(e,t){var i=[],n=this;return e&&0"," ","",""," "," ",e.name,""," "," ",e.size,"",t?"":[" ",n.getLocalText("delete"),""].join(""),"
    "].join(""))}),i.join("")},getImage:function(e){return e&&-1!==e.indexOf("/")?e:this.builder.getImage(e)},"_bind-applying-event":function(o){var a=this;o.find('input[type="file"]').fileupload({url:this.source.uploadUrl||this.builder.options.url.fileupload,done:function(e,t){var i,t=t.result||[],n=a.options.value||[];if(_.isArray(t)&&(i=a["_html-list-items"](t,!0),o.find("."+a.className.list).append(i)),n=_.flatten(n.push(t)),a.options.value=n,"function"==typeof a.source.onUpload)try{a.source.onUpload.call(a,t)}catch(e){console.error("formbuilder file onUpload function error!")}},error:function(e,t){},complete:function(e,t){}}),o.on("click","."+a.className["list-item-button-delete"],function(){var t=r(this).closest("."+a.className["list-item"]),i=t.index("."+a.className["list-item"]),n=a.options.value,o=n[i],e=r.extend(!0,{},a.source.deleteParams||{},{id:o.id});r.post(a.source.deleteUrl,e,function(e){if(console.warn("formbuilder file delete success"),t.remove(),_.remove(n,function(e,t){return!t===i}),"function"==typeof a.source.onDelete)try{a.source.onDelete.call(a,o)}catch(e){console.error("formbuilder file onDelete function error!")}}).success(function(e){console.log("second success")}).error(function(e){console.log("error")}).complete(function(e){console.log("complete")})})},getValue:function(){return this.options.value},className:{container:"formbuilder-control-file",view:"formbuilder-control-file-view","file-button-upload":"formbuilder-control-file-button-upload",img:"formbuilder-control-file-img",list:"formbuilder-control-file-list","list-item":"formbuilder-control-file-list-item","list-item-name":"formbuilder-control-file-list-item-name","list-item-button-delete":"formbuilder-control-file-list-item-delete"},options:{label:"",value:[]},property:{value:{hidden:!0},"font-family":{hidden:!0},"font-size":{hidden:!0},"font-weight":{hidden:!0,update:function(e){}},"font-style-italic":{hidden:!0,update:function(e){}},"text-decoration-underline":{hidden:!0,update:function(e){}},color:{hidden:!0,update:function(e){}},height:{hidden:!0},width:{hidden:!0,update:function(){this.container.css({width:"100%"})}},"text-align":{hidden:!0},align:{hidden:!0,update:function(){}},"vertical-align":{hidden:!0},url:{hidden:!0},cascade:{hidden:!0}}})}(jQuery,_),function(s){s.formbuilder.toolbox.add("fileupload",{title:"fileupload",icon:"file-upload.svg",source:{icon:{pdf:"",doc:"",docx:"",xls:"",xlsx:"",ppt:"",pptx:"",txt:"",png:"image.svg",jpg:"image.svg",jpeg:"image.svg",bmp:"image.svg",other:"file.png"},renderType:"",files:{},xhries:{},onUpload:function(){}},keepPattern:!0,applying:function(){this.source.renderType="applying";var e=this.renderButton(),e=`
    ${e} ${this.renderFileList()}
    `,e=s(e);return this.setEvents(e),e},view:function(){this.source.renderType="view";var e=`
    ${this.renderFileList()}
    `,e=s(e);return this.setEvents(e),e},renderButton:function(){return`
    `},renderFileList:function(){return`
    ${this.options.value.map(e=>this.renderFileItem(e)).join("")}
    `},renderFileItem:function(e){var{icon:t,renderType:i}=this.source,{state:n,progress:o,fileType:a,fileShowName:r,fileSize:l,fileId:s}=e,c="file-upload-item"+(n&&" file-upload-item-"+n||""),o="view"!==i&&(void 0!==o||n)?"":"hidden",i="applying"!==i?"hidden":"",n="error"===n?"":"hidden",d=this.getStateImage(e),a=this.getImage(t[a]||t.other),t=this.getImage("recovery.png"),u=this.getImage("remove.png"),p=r+"_"+l,h=this.getFileSrc(e);return`
    ${r}
    ${this.zSize(l)}
    重传 删除
    ${this.renderFileProgress(e)}
    `},renderFileProgress:function(e){e=e.progress;return`
    ${e}%
    `},setEvents:function(e){const o=this;e.find('input[type="file"]').change(function(e){let t=o.accept?.split(",")||[],i=e.target.files;0{let i=!1,[n,o]=e.split("/");return t.forEach(e=>{var[e,t]=e.trim().split("/");i=i||n===e&&(t===o||"*"===t)}),i}));for(let e=0;ee.fileShowName===t.name&&e.fileSize===t.size)},addFileItem:function(e){var{name:t,size:i,type:n}=e,o=t.split("."),o=(e.fileType=o.length&&o.slice(-1)[0]||n||"",{fileShowName:t,fileSize:i,fileType:e.fileType,progress:0,state:"progress"});return this.source.files[e.name+"_"+e.size]=e,this.options.value.push(o),this.getFileListJqDom().append(this.renderFileItem(o)),o},deleteFileItem:function(t){var e=this.options.value.findIndex(function(e){return e.fileShowName===t.fileShowName&&e.fileSize===t.fileSize}),i=t.fileShowName+"_"+t.fileSize,e=(-1!==e&&this.options.value.splice(e,1),this.source.xhries[i]);e&&1===e.readyState&&e.abort(),this.elem.find(`.file-upload-item[data-identification="${i}"]`).remove()},updateFileItem:function(e,t){let i=this.getValueItem(e);i=i||this.addFileItem(e),Object.assign(i,t),this.getFileItemDom(e).outerHTML=this.renderFileItem(i)},updateFileProgress:function(e,t){let i=this.getValueItem(e);i=i||this.addFileItem(e),Object.assign(i,{progress:t}),s(this.getFileItemDom(e)).find(".file-progress-content")[0].outerHTML=this.renderFileProgress(i)},queryItemByClickDom:function(e){e=s(e).parents(".file-upload-item")[0];if(e){const t=e.dataset.identification;return this.options.value.find(function(e){return e.fileShowName+"_"+e.fileSize===t})}},getFileListJqDom:function(){return this.elem.find(".file-upload-filelist")},getFileItemDom:function(e){e=this.container.find(`.file-upload-item[data-identification="${e.name}_${e.size}"]`);if(e.length)return e[0]},zSize:function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toPrecision(3)+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},getImage:function(e){return e&&-1!==e.indexOf("/")?e:this.builder.getImage(e)},getStateImage:function(e){let t="";switch(e.state){case"success":t="check.png";break;case"error":case"loading":t="remove.png";break;default:t="loading-.gif"}return this.getImage(t)},getFileSrc:function(e){return`${this.source.downloadUrl}eid=${e.fileId}&t=`+Date.now()},options:{label:"",value:[],"vertical-align":"top"},className:{container:"formbuilder-control-fileupload"},getValue:function(){return this.options.value},setValue:function(e){this.options.value=e},check:function(){return!this.options.value.some(e=>e.progress<100||"loading"===e.state||"error"===e.state)},property:{value:{hidden:!0},"font-family":{hidden:!0},"font-size":{hidden:!0},"font-weight":{hidden:!0,update:function(e){}},"font-style-italic":{hidden:!0,update:function(e){}},"text-decoration-underline":{hidden:!0,update:function(e){}},color:{hidden:!0,update:function(e){}},height:{hidden:!0,update:function(){this.container.css({height:"100%"})}},width:{hidden:!0,update:function(){this.container.css({width:"100%"})}},"text-align":{hidden:!0},align:{hidden:!0,update:function(){}},"vertical-align":{hidden:!0},cascade:{hidden:!0}}})}(jQuery),function(s){"use strict";s.formbuilder.toolbox.add("link",{title:"link",icon:"link.svg",cache:{indent:[]},keepPattern:!0,applying:function(){return s(this.getListItems(this.options.value))},view:function(){return s(this.getListItems(this.options.value))},renderImg:function(){var e=this.builder.getImage("link.png");return[""].join("")},renderList:function(e){return["
    ",e,"
    "].join("")},getListItems:function(e){var t=[];return t.push(["
    ","',e,"","
    "].join("")),t.join("")},bindViewEvent:function(e){var t=this;e.on("click","."+t.className["list-item"],function(){var e=s(this),e=Number(e.attr("data-index")),e=t.options.value[e];t.linkEvent(e)})},linkEvent:function(e){var t=this.options.onclick;"function"==typeof(t="string"==typeof t?window[t]:t)&&t.call(this.builder.elem,e)},getImage:function(e){return e&&-1!==e.indexOf("/")?e:this.builder.getImage(e)},getValue:function(){return this.options.value},className:{container:"formbuilder-control-link",list:"formbuilder-control-link-list","list-item":"formbuilder-control-link-item"},options:{label:"",value:[],width:"100%","vertical-align":"top",color:"#3555BC","text-decoration-underline":!0},property:{value:{text:"value",hidden:!1,type:"textarea",after:["font-size"],designUpdate:function(e,t,i){var a,r,l;this.property.value.update;_.trim(e)?this.elem.css({opacity:1,filter:"Alpha(opacity=100)"}):(e=this.title,this.elem.css({opacity:.3,filter:"Alpha(opacity=30)"})),e=e.split("\n"),a=[],r=i["word-vertical"],(l=this).cache.indent=[],_.each(e,function(e){var t,i,n,o;r&&(e=(e=_.map(e.split(""),function(e){return e+"
    "})).join("")),t=s.trim(e),n=(o=(i=e.replace(t,"[--]")).split("[--]"))[0]?o[0].length:0,o=o[1]?o[1].length:0,l.cache.indent.push({left:n,right:o}),e=i.replace(/ /g,"").replace("[--]",t),a.push('

    '+e+"

    ")}),this.elem.html(a.join("")),r?this.elem.addClass(this.className.vertical):this.elem.removeClass(this.className.vertical)}},url:{type:"textbox"},"font-family":{hidden:!0},"font-size":{hidden:!0},"font-weight":{hidden:!0},"font-style-italic":{hidden:!0},"text-decoration-underline":{hidden:!0},height:{hidden:!0},width:{hidden:!0},"text-align":{hidden:!0},align:{hidden:!0},"vertical-align":{hidden:!0},overflow:{hidden:!0},"relation-position":{hidden:!0},"extension-direction":{hidden:!0},readonly:{hidden:!0},required:{hidden:!0},cascade:{hidden:!0}}})}(jQuery,_),function(a){"use strict";a.formbuilder.toolbox.add("multipleselectlabel",{title:"multipleSelect",icon:"muli-select-label.svg",applying:function(){var e=a(["
    ",this.renderRemoveAll(),"
    "].join(""));return this.bindViewEvent(e),e},view:function(){for(var e,t=this.options.value||[],i=[],n=0,o=t.length;n"+i.join("; ")+"")},renderRemoveAll:function(){return this.renderItem({text:"",value:"remove-all"},null,"remove-all")},renderImg:function(){var e=this.builder.getImage(this.icon);return[""].join("")},renderList:function(){return["
    ","
    "].join("")},renderItem:function(e,t,i){return["
    "," ",e.text,""," x","
    "].join("")},renderListItems:function(){var i=[],e=this.options.value,n=this;this.elem.find("."+this.className["list-item"]).remove(),e&&0 ')},view(){return this.applying()},updateIndex(e){this.elem?.html(e)},applyingRemove(){this._updateIndex()},_updateIndex(){let e=this.options,o=e.type,a=this.builder.workspace,i=e["dataset-block"],r=e.x,l=e.y;if(i){let e=a.getDatasetInfoById(i,a.datasetTemplate),n="vertical"==e.type,t=`${i}-${n?l:r}-datasetindex`;a[t]&&clearTimeout(a[t]),a[t]=setTimeout(()=>{var{datasets:e=[]}=a.getCurrentPageData(),{rows:e=[]}=e.find(e=>e?.id==i);e.forEach((e,t)=>{var e=e.find(e=>e?.type==o&&(n?e.y==l:e.x==r)),i=e?.x,e=e?.y;i&&e&&a.findControlObj(i,e)?.updateIndex?.(t+1)}),delete a[t]})}},options:{value:"",readonly:!0},property:{cascade:{hidden:!0}}})}(jQuery),function(i){"use strict";i.formbuilder.property._base={create:function(){},elem:null,language:"zh-CN",container:null,getLocalText:function(e){return(i.formbuilder.language[this.language]||i.formbuilder.language["zh-CN"]).property[e]||e||""},options:{name:"",value:""},display:"inline-block",bindEvent:function(){},updateEvent:function(){},getValue:function(){},setValue:function(e){},beforeInit(){}},i.formbuilder.property.add=function(e,t){t=i.extend(!0,{},this._base,t);this[e]=t}}(jQuery),function(s){"use strict";s.formbuilder.property.add("buttons",{create:function(){var e=this.options,t=this.builder.workspace.grid,i=e.prop,n=e.source,i=i.activeValueConver?.(e.value,t)||e.value;return s(["
    ",this.createItems(n,i),"
    "].join(""))},createItems:function(e,t){var i,n,o=[];if(e){for(var a=0,r=e.length;a",' ',' '," ",""].join("")},className:{item:"formbuilder-property-button",active:"formbuilder-property-button-active"},options:{},bindEvent:function(){var l=this;this.elem.on("click","."+l.className.item,function(){var e,t=s(this),i=t.index(),n=l.options,o=n.source;t.parent().find("."+l.className.item).removeClass(l.className.active),t.addClass(l.className.active);for(var a=0,r=o.length;a",this.getLocalText(this.options.text||this.options.name),""].join(""))},options:{className:"formbuilder-property-label"}})}(jQuery),function(i){"use strict";i.formbuilder.property.add("textbox",{elem:null,options:{value:""},className:{textbox:"formbuilder-property-textbox"},template:function(e){return[""].join("")},create:function(){var e=i(this.template({className:this.className.textbox,value:this.options.value})),t=this.options.source;return t&&(t.readonly&&e.attr("readonly","readonly"),t.placeholder&&e.attr("placeholder",this.getLocalText(t.placeholder))),e.on("keydown",function(e){e.stopPropagation()}),e},updateEvent:function(){return[{name:"change",filter:""}]},getValue:function(){return this.elem.val()},setValue:function(e){this.elem.val(e)}})}(jQuery,_),function(t){"use strict";t.formbuilder.property.add("textarea",{options:{className:"formbuilder-property-textarea",rows:4},create:function(){var e=t([""].join(""));return e.on("keydown",function(e){e.stopPropagation()}),e},getValue:function(){return this.elem.val()},updateEvent:function(){return[{name:"change",filter:""}]}})}(jQuery),function(s){"use strict";s.formbuilder.property.add("options",{display:"block",image:{delete:"delete.svg",add:"add.svg"},create:function(){var e=this.className,t=this.options,i=this.builder.getImage(this.image.add),n=s(`
    `),t=this.createItems(t.value),e=`
    `;return n.append([t,e]),n},createItems:function(e){var t=this.className,i=s(`
      `),n=this;return(e=e&&0!==e.length?e:[{}]).forEach(e=>{e=n.createItem(e);i.append(e)}),i},createItem:function(o){var a=this.className,e={elems:[{name:"text",placeholder:"text"},{name:"value",placeholder:"value"}],...this.options.prop},t=e.elems,i=o.selected,e=e.hideSelect,n=this.builder.getImage(this.image.delete),r=s(`
    • `),e=e?"":``,l=s(`
      `),i=``;return t.forEach(e=>{var{name:e,placeholder:t,type:i="input"}=e,n=o[e]||"",i=s(`<${i} type="text" class="${a.input}" name="${e}" placeholder="${this.getLocalText(t)}">`);i.val(n),l.append(i)}),r.append([e,l,i])},bindEvent:function(){var e=this,t=this.elem;t.find("."+e.className.addOpt).on("click",function(){t.find("."+e.className.options).append(e.createItem({}))}),!1===this.multi&&t.on("click","."+e.className.check,function(){s(this).closest("."+e.className.option).siblings().find("."+e.className.check).each(function(){this.checked=!1})}),t.on("click","."+e.className.remove,function(){s(this).closest("."+e.className.option).remove()})},className:{wrap:"formbuilder-property-sortable-options-wrap",options:"formbuilder-property-sortable-options",option:"formbuilder-property-option",check:"formbuilder-property-check",remove:"formbuilder-property-option-remove",selected:"formbuilder-property-option-selected",content:"formbuilder-property-option-content",input:"formbuilder-property-option-input",actions:"formbuilder-property-option-actions",addOpt:"formbuilder-property-add-opt"},options:{value:[]},updateEvent:function(){return[{name:"change",filter:["input","textarea"]},{name:"click",filter:"."+this.className.remove}]},getValue:function(){var n=[],o=this.className,a="."+o.input,r=this.options.prop.hideSelect;return this.elem.find("."+this.className.option).each(function(){var e=s(this),i={},t=e.find(a);r||(i.selected=e.find("."+o.check)[0].checked),t.each(function(){var e=this.getAttribute("name"),t=this.value;i[e]=t}),n.push(i)}),n}})}(jQuery),function(h){"use strict";h.formbuilder.property.add("groupOptions",{display:"block",image:{delete:"delete.svg",add:"add.svg"},create:function(){var e=this.className,e=h(`
      `),t=this.createGroup();return e.append(t),e},createGroup(){let s=this.className,e=this.options,{value:c={},prop:t={}}=e,i=t.groups||[],d=this.builder.getImage(this.image.add),u=this,p=[];return i.forEach((t,e)=>{let{name:i="",text:n="",hideAdd:o=!1}=t,a=h(`
        ${o?"":`
        `}
        `),r=a.children("ul"),l=c[i]||[{}];l.forEach(e=>{e=u.createItem(e,t);r.append(e)}),p.push(a)}),p},createItem:function(o,e){var a=this.className,e={elems:[{name:"text",placeholder:"text"},{name:"value",placeholder:"value"}],...e},t=e.hideRemove,e=e.elems,i=this.builder.getImage(this.image.delete),n=h(`
      • `),r=h(`
        `),t=t?"":``;return e.forEach(e=>{var{name:e,placeholder:t,type:i="input"}=e,n=o[e]||"",i=h(`<${i} type="text" class="${a.input}" name="${e}" placeholder="${this.getLocalText(t)}">`);i.val(n),r.append(i)}),n.append([r,t])},bindEvent:function(){var i=this,e=this.elem;e.find("."+i.className.addOpt).on("click",function(){var e=i.className,e=h(this).closest("."+e.group),t=+e.attr("data-index"),t=i.options.prop?.groups?.[t];e.find("."+i.className.options).append(i.createItem({},t))}),e.on("click","."+i.className.remove,function(){h(this).closest("."+i.className.option).remove()})},className:{wrap:"formbuilder-property-sortable-options-wrap",options:"formbuilder-property-sortable-options",option:"formbuilder-property-option",check:"formbuilder-property-check",remove:"formbuilder-property-option-remove",selected:"formbuilder-property-option-selected",content:"formbuilder-property-option-content",input:"formbuilder-property-option-input",actions:"formbuilder-property-option-actions",addOpt:"formbuilder-property-add-opt",group:"formbuilder-property-option-group"},options:{value:[]},updateEvent:function(){return[{name:"change",filter:["input","textarea"]},{name:"click",filter:"."+this.className.remove}]},getValue:function(){let i={},e=this.className,t=this.elem.find("."+e.group),o="."+e.option,a="."+e.input;return t.each(function(){let e=h(this),t=e.attr("name"),n=i[t];i[t]||(n=i[t]=[]),e.find(o).each(function(){let e=h(this),i={},t=e.find(a);t.each(function(){var e=this.getAttribute("name"),t=this.value;i[e]=t}),n.push(i)})}),i}})}(jQuery),function(n){"use strict";n.formbuilder.property.add("selectImage",{create:function(){var e=this.options,t=e.source.text,i=e.source.image,e=e.value;return n(this.createItem(t,i,e))},createItem:function(e,t,i){let n=this.className.item;return!0===i&&(n+=" "+this.className.active),['"].join("")},className:{item:"formbuilder-property-fileupload",active:"formbuilder-property-fileupload-active",error:"formbuilder-property-fileupload-error"},options:{},bindEvent:function(){var n=this,o=this.elem;o.find('input[type="file"]').on("change",function(e){var i=this.files[0],{type:t=""}=i;if(this.value="",-1==t.indexOf("image/"))o.find("a").addClass(n.className.error);else{let t=new FileReader;t.addEventListener("load",function(){var e=t.result;n.options.value=e,o.find("a").removeClass(n.className.error),o.trigger("finishUpload")},!1),i&&t.readAsDataURL(i)}})},updateEvent:function(){return[{name:"finishUpload",filter:""}]},getValue:function(){return this.options.value}})}(jQuery),function(n){"use strict";n.formbuilder.property.add("bool",{create:function(){var e,t,i;if(this.options.source)return e=(i=this.options).source.text,t=i.source.image,i=i.value,n(this.createItem(e,t,i));console.warn("please config the source")},createItem:function(e,t,i){var n=this.className.item;return!0===i&&(n+=" "+this.className.active),this.template({className:{item:n},text:this.getLocalText(e),image:this.builder.getImage(t)})},template:function(e){return["
        "," "," "," ","
        "].join("")},className:{item:"formbuilder-property-bool",active:"formbuilder-property-bool-active"},options:{},bindEvent:function(){var i=this;this.elem.on("click",function(){var e=n(this),t=i.options;!0===t.value?(t.value=!1,e.removeClass(i.className.active)):(t.value=!0,e.addClass(i.className.active))})},updateEvent:function(){return[{name:"click",filter:""}]},getValue:function(){return this.options.value}})}(jQuery,_),function(n){"use strict";n.formbuilder.property.add("fileupload",{create:function(){var e=this.options,t=e.source.text,i=e.source.image,e=e.value;return n(this.createItem(t,i,e))},createItem:function(e,t,i){var n=this.className.item;return!0===i&&(n+=" "+this.className.active),['"].join("")},className:{item:"formbuilder-property-fileupload",active:"formbuilder-property-fileupload-active",error:"formbuilder-property-fileupload-error"},options:{},bindEvent:function(){var i=this,n=this.elem;n.find('input[type="file"]').fileupload({url:this.options.source.url||this.builder.options.url.imageupload,done:function(e,t){i.options.value=t.result,n.trigger("finishUpload"),n.find("a").removeClass(i.className.error)},error:function(e,t){n.find("a").addClass(i.className.error)},complete:function(e,t){}})},updateEvent:function(){return[{name:"finishUpload",filter:""}]},getValue:function(){return this.options.value}})}(jQuery),function(c){"use strict";c.formbuilder.property.add("colorpicker",{create:function(){var e=this.template({className:{container:this.className.container,color:this.className.color,picker:this.className.picker}});return c(e)},template:function(e){return["
        ","
        ","
        ","
        "].join("")},className:{container:"formbuilder-property-colorpicker",color:"formbuilder-property-colorpicker-color",picker:"formbuilder-property-colorpicker-picker"},options:{},bindEvent:function(){var a=this.elem,r=a.find("."+this.className.picker),l=a.find("."+this.className.color),e=c.formbuilder.getValue(this.options.value),s=this,t=!1,e=e||this.options.source.defaultValue||"#333333";l.css("background",e),l.click(function(){t||(t=!0,r.colpick({flat:!0,layout:"hex",color:e.value||e,submitText:s.getLocalText("ok"),onSubmit:function(e,t,i,n){var o="#"+t;c(n).css("background-color",o),l.css("background","#"+t),r.hide(),l.removeAttr("data-show"),s.options.value=o,a.trigger("colorchange")}})),l.attr("data-show")?(r.hide(),l.removeAttr("data-show")):(r.show(),l.attr("data-show",!0))}),r.on("keydown","input",function(e){e.stopPropagation()})},updateEvent:function(){return[{name:"colorchange",filter:""}]},getValue:function(){return this.options.value}})}(jQuery,_),function(a,o){"use strict";a.formbuilder.property.add("combox",{elem:null,options:{value:""},image:{arrowsdown:"arrows-down.svg"},className:{combox:"formbuilder-property-combox",textbox:"formbuilder-property-combox-textbox",arrowsdown:"formbuilder-property-combox-arrowsdown",items:"formbuilder-property-combox-items",item:"formbuilder-property-combox-item"},template:{item:function(e){return[""].join("")},main:function(e){return["
        "," "," "," "," "," ",e.items,"
        "].join("")}},create:function(){var e=this.options,t=e.readonly,i=e.source,n=e.value||"",e=this.image.arrowsdown;return"object"!=typeof n&&(n={text:n||"",value:n||""},o.each(i,function(e){e.value===n.value&&(n.text=e.text)})),t=this.template.main({className:{combox:this.className.combox,textbox:this.className.textbox,arrowsdown:this.className.arrowsdown},value:this.getLocalText(n.text),readonly:t?"readonly='readonly'":"",icon:this.builder.getImage(e),items:this.createItems(i)}),(e=a(t)).on("keydown",function(e){e.stopPropagation()}),e},createItems:function(e){var t=[];if(t.push(["
        "].join("")),e instanceof Array&&0"),t.join("")},createItem:function(e,t){return this.template.item({className:this.className.item,text:this.getLocalText(e.text)||e.text,index:t})},bindEvent:function(){var i=this,e=this.elem,n=e.find("."+this.className.items),o=e.find("."+this.className.textbox);e.on("mousedown","."+this.className.arrowsdown,function(e){var t;n.attr("data-open")?(i.hideSubContent(),n.removeAttr("data-stop-blur-event")):(o[0].focus(),n.attr("data-stop-blur-event",!0),i.showSubContent(),(t=n.attr("data-setTimeoutId"))&&clearTimeout(t),t=setTimeout(function(){n.attr("data-open")&&n.removeAttr("data-stop-blur-event")},200),n.attr("data-setTimeoutId",t)),e.preventDefault()}),n.on("click","."+this.className.item+">a",function(){var e=a(this).attr("data-index"),e=i.options.source[e];" "==(i.options.value=e).text&&(e.text=""),i.hideSubContent(),o.val(i.getLocalText(e.text)),i.update()}),o.on("change",function(){var e=a(this).val();i.options.value=e,i.hideSubContent(),i.update()}),o.on("blur",function(e){setTimeout(function(){n.attr("data-stop-blur-event")?n.removeAttr("data-stop-blur-event"):i.hideSubContent()},250)}),(window.ActiveXObject||"ActiveXObject"in window)&&n.on("mousedown click",function(e){n.attr("data-stop-blur-event",!0),setTimeout(function(){o[0].focus()},1)})},showSubContent:function(){var e=this.elem.find("."+this.className.items);e.show(),e.attr("data-open",!0)},hideSubContent:function(){var e=this.elem.find("."+this.className.items);e.hide(),e.removeAttr("data-open")},update:function(){this.elem.trigger("comboxUpdate")},updateEvent:function(){return[{name:"comboxUpdate"}]},getValue:function(){var e=this.options.value;return e=o.isObject(e)?e.value:e}})}(jQuery,_),function(i){"use strict";i.formbuilder.contextmenu._base={language:"zh-CN",getLocalText:function(e){return(i.formbuilder.language[this.language]||i.formbuilder.language["zh-CN"]).contextmenu[e]||e||""},targetType:null,text:null,image:null,checking:function(e,t){},fn:function(e,t){}},i.formbuilder.contextmenu.add=function(e,t){this[e]=i.extend(!0,{type:e},this._base,t)}}(jQuery),function(l,s){"use strict";l.formbuilder.contextmenu.add("merge",{text:"merge",targetType:"cells",image:"merge-cells.png",checking:function(e,t){var i,n,o=t.getSelected();if(1",' ',' '," ","
        "].join("")},className:{item:"formbuilder-menu-button",image:"formbuilder-menu-button-image",active:"formbuilder-menu-button-active"},options:{},bindEvent:function(){var n=this;this.elem.find(">a").on("click",function(){var e=n.options,t=e.value,i=null;!0===t?i=e.value=!1:!1===t&&(i=e.value=!0),n.setActive(i),n.update()})},updateEvent:function(){return[{name:"buttonUpdate"}]},update:function(){this.elem.trigger("buttonUpdate")},updateImage:function(e){this.elem.find(">a").attr("title",this.getLocalText(this.options.text)),this.elem.find(">a img."+this.className.image).attr("src",this.builder.getImage(e))},setActive:function(e){var t=this.elem;!0===e?t.addClass(this.className.active):!1===e&&t.removeClass(this.className.active)}})}(jQuery),function(n){"use strict";n.formbuilder.menu.add("image",{create:function(){var e=this.options,t=e.text,i=e.image,e=e.value;return n(this.createItem(t,i,e))},createItem:function(e,t,i){var n=this.className.item;return!0===i&&(n+=" "+this.className.active),['"].join("")},className:{item:"formbuilder-menu-image",active:"formbuilder-menu-image-active",error:"formbuilder-menu-image-error"},options:{},bindEvent:function(){var i=this,n=this.elem;n.find('input[type="file"]').fileupload({url:this.options.url||this.builder.options.url.imageupload,done:function(e,t){i.options.value=t.result,i.update(),n.find("a").removeClass(i.className.error)},error:function(e,t){n.find("a").addClass(i.className.error)},complete:function(e,t){}})},update:function(){this.elem.trigger("imageUpdate")},updateEvent:function(){return[{name:"imageUpdate",filter:""}]}})}(jQuery),function(d,t){"use strict";d.formbuilder.menu.add("combox",{create:function(){let e=this.options,t=this.getLocalText(e.name),i=this.builder.elem,n=e.readonly,o=e.value?.text||"",a=e.image.arrowsdown,r=e.items,l,s=e.width||"",c;return s=s&&"style='width:"+s+"px'",c=["
        "," "," "," "," "," ","
        "].join(""),l=d(this.createItems(r)),i.append(l),this.$items=l,d(c)},createItems:function(e){var t=[];if(t.push(["
        "].join("")),e instanceof Array&&0"),t.join("")},createItem:function(e,t){return[""].join("")},className:{combox:"formbuilder-menu-combox",textbox:"formbuilder-menu-combox-textbox",arrowsdown:"formbuilder-menu-combox-arrowsdown",items:"formbuilder-menu-combox-items",item:"formbuilder-menu-combox-item"},options:{image:{arrowsdown:"arrows-down.png"}},bindEvent:function(){var i=this,e=this.elem,n=this.$items,o=e.find("."+this.className.textbox);e.on("mousedown","."+this.className.arrowsdown,function(e){var t;n.attr("data-open")?(i.hideSubContent(),n.removeAttr("data-stop-blur-event")):(o[0].focus(),n.attr("data-stop-blur-event",!0),i.showSubContent(),(t=n.attr("data-setTimeoutId"))&&clearTimeout(t),t=setTimeout(function(){n.attr("data-open")&&n.removeAttr("data-stop-blur-event")},200),n.attr("data-setTimeoutId",t)),e.preventDefault()}),n.on("mousedown","."+this.className.item+">a",function(){var e=d(this).attr("data-index"),e=i.options.items[e];i.options.value=e.value,i.hideSubContent(),o.val(e.text),i.update()}),o.on("change",function(){var e=d(this).val();i.options.value=e,i.hideSubContent(),i.update()}),o.on("blur",function(){setTimeout(function(){n.attr("data-stop-blur-event")?n.removeAttr("data-stop-blur-event"):i.hideSubContent()},0)}),(window.ActiveXObject||"ActiveXObject"in window)&&n.on("mousedown click",function(e){n.attr("data-stop-blur-event",!0),setTimeout(function(){o[0].focus()},1)})},showSubContent:function(){let e=this.$items,t=this.elem,i=this.builder.elem,n=this.builder.workspace.elem,o=t.height(),{left:a,top:r}=i.offset(),{left:l,top:s}=t.offset(),c=n.offset()["left"],d=e.outerWidth(),u=n.outerWidth(),p;(p=l-a+2)+d>c+u&&(p=c+u-d-5),e.css({left:p+"px",top:s-r+o+2+"px"}).show().attr("data-open",!0)},hideSubContent:function(){var e=this.$items;e.hide(),e.removeAttr("data-open")},update:function(){this.elem.trigger("comboxUpdate")},setActive:function(e){var t=this.elem.find("."+this.className.textbox);e&&(e="object"==typeof e?e.text:e,t.val(e))},updateEvent:function(){return[{name:"comboxUpdate"}]},getValue:function(){var e=this.options.value;return e=t.isObject(e)?e.value:e}})}(jQuery,_),function(e){"use strict";e.formbuilder.menu.add("colorpicker",{create:function(){return e(["
        ","
        ","
        "].join(""))},className:{container:"formbuilder-menu-colorpicker",picker:"formbuilder-menu-colorpicker-picker"},options:{},bindEvent:function(){var e=this.elem.find("."+this.className.picker),t=this.options.value||"#333333",o=this;e.colpick({flat:!0,layout:"hex",color:t,submitText:this.getLocalText("ok"),onSubmit:function(e,t,i,n){o.options.value="#"+t,o.update()}}),e.on("keydown","input",function(e){e.stopPropagation()})},update:function(){this.elem.trigger("colorpickerUpdate")},updateEvent:function(){return[{name:"colorpickerUpdate",filter:""}]}})}(jQuery),function(i){"use strict";i.formbuilder.shortcutKey._base={shiftKey:!1,altKey:!1,ctrlKey:!0,keyCode:null,targetType:"control",checking:function(e,t){return!0},fn:function(e,t){}},i.formbuilder.shortcutKey.add=function(e,t){this[e]=i.extend(!0,{},this._base,t)}}(jQuery),function(){"use strict";jQuery.formbuilder.shortcutKey.add("copy",{keyCode:67,targetType:"control",pattern:"design",checking:function(e,t){return e&&0e!=t))return t}else if(i==t)return t}return i}};e.formbuilder.menucontrol["cell-border-style"]={options:{name:"border-style",value:"border-solid",text:"border-solid",image:"border-solid.png"},keepSubmenu:!0,...t},e.formbuilder.menucontrol["cell-border-solid"]={options:{name:"border-style",value:"border-solid",text:"border-solid",image:"border-solid.png"},...t},e.formbuilder.menucontrol["cell-border-none"]={options:{name:"border-style",value:"border-none",text:"border-none",image:"border-none.png"},...t},e.formbuilder.menucontrol["cell-border-solid-heavy"]={options:{name:"border-style",value:"border-solid-heavy",text:"border-solid-heavy",image:"border-solid-heavy.png"},...t},e.formbuilder.menucontrol["cell-border-dashed"]={options:{name:"border-style",value:"border-dashed",text:"border-dashed",image:"border-dashed.png"},...t}}(jQuery),function(){"use strict";jQuery.formbuilder.menucontrol["copy-control"]={options:{name:null,value:!1,text:"copy",image:"copy.png"},type:"button",target:"control",property:!1,fn:function(e,t){t.copyControls()}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["cut-control"]={options:{name:null,value:!1,text:"cut",image:"cut.png"},type:"button",target:"control",property:!1,fn:function(e,t){t.cutControls()}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["font-color-display"]={options:{name:["color"],value:["red"],image:"color.png",text:"color"},type:"button",target:"control",property:!0,fn:function(e){}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["font-color-picker"]={options:{name:["color"],value:"#333333"},type:"colorpicker",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["font-color"]={options:{name:["color"],value:["#333333"],image:"color.png",text:"color"},type:"button",target:"control",property:!0,fn:function(e){e()}}}(),function(e){"use strict";e.formbuilder.menucontrol["font-family"]={options:{name:"font-family",value:{text:"微软雅黑",value:"微软雅黑"},items:e.formbuilder["FONT-FAMILY"],readonly:!1,width:70},type:"combox",target:"control",property:!0}}(jQuery),function(e){"use strict";e.formbuilder.menucontrol["font-size"]={options:{name:"font-size",value:{text:12,value:12},items:e.formbuilder["FONT-SIZE"],readonly:!1,width:22},type:"combox",target:"control",property:!0}}(jQuery),function(){"use strict";jQuery.formbuilder.menucontrol["font-style-italic"]={options:{name:"font-style-italic",value:!1,text:"font-style-italic",image:"font-style-italic.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["font-weight"]={options:{name:"font-weight",value:!1,text:"font-weight",image:"font-weight.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["merge-cells"]={options:{name:null,value:!1,text:"merge",image:"merge-cells.png"},type:"button",target:"cell",property:!1,fn:function(e,t){t.mergeCells(e)}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["paste-control"]={options:{name:null,value:!1,text:"paste",image:"paste.png"},type:"button",target:"cell",property:!1,fn:function(e,t){t.pasteControls()}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["remove-controls"]={options:{name:null,value:!1,text:"remove",image:"remove.png"},type:"button",target:"control",property:!1,fn:function(e,t){t.removeControls()}}}(),function(){"use strict";jQuery.formbuilder.menucontrol["save-image"]={options:{name:"designSave",value:"save.svg",text:"save",image:"save.svg",url:""},type:"button",property:!1,fn:function(e,t){t.workspace.events?.designSave?.()},controlType:"image"}}(),function(){"use strict";jQuery.formbuilder.menucontrol["text-align-center"]={options:{name:"text-align",value:"center",text:"align-center",image:"text-align-center.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["text-align-left"]={options:{name:"text-align",value:"left",text:"align-left",image:"text-align-left.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["text-align-right"]={options:{name:"text-align",value:"right",text:"align-right",image:"text-align-right.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["text-align"]={options:{name:"text-align",value:"left",text:"align-left",image:"text-align-left.png"},type:"button",target:"control",property:!0,keepSubmenu:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["text-decoration-underline"]={options:{name:"text-decoration-underline",value:!1,text:"text-decoration-underline",image:"text-decoration-underline.png"},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol.version={options:{name:"version",value:null,items:[],readonly:!1,width:50},type:"combox",property:!1}}(),function(){"use strict";jQuery.formbuilder.menucontrol["vertical-align-bottom"]={options:{name:"vertical-align",value:"bottom",text:"vertical-align-bottom",image:"vertical-align-bottom.png",selectValue:!1,cancelValue:!1},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["vertical-align-middle"]={options:{name:"vertical-align",value:"middle",text:"vertical-align-middle",image:"vertical-align-middle.png",selectValue:!1,cancelValue:!1},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["vertical-align-top"]={options:{name:"vertical-align",value:"top",text:"vertical-align-top",image:"vertical-align-top.png",selectValue:!1,cancelValue:!1},type:"button",target:"control",property:!0}}(),function(){"use strict";jQuery.formbuilder.menucontrol["vertical-align"]={options:{name:"vertical-align",value:"top",text:"vertical-align-top",image:"vertical-align-top.png"},type:"button",target:"control",property:!0,keepSubmenu:!0}}(),function(e){"use strict";e.formbuilder=e.formbuilder||{},e.formbuilder.config={_height:450,data:{},pattern:"design",language:"zh-CN",timezone:8,formatter:"YYYY-MM-DD HH:mm:ss",specificDate:"2000-01-01",systemInfo:{applicantDepartment:null,applicantName:null,applicantPhoneNumber:null,applicationDate:null,processId:null,processSteps:null,formNumber:null},toolbox:{},control:{showLabel:!1,expandImage:"expand.svg",collapseImage:"collapse.svg",order:["label","textbox","hidden","textarea","contenteditable","date","time","datetime","button","data-insert","data-remove","select","textvalue","radiogroup","checkboxgroup","image","file","link","multipleselectlabel"]},menu:{order:[["save-image","version"],["merge-cells","cancel-merge-cells"],["cut-control","copy-control","paste-control","remove-controls"],["font-family","font-size"],["font-weight","font-style-italic","text-decoration-underline",{name:"font-color-display",children:["font-color-picker"]},{name:"cell-background-color-display",children:["cell-background-color-picker"]},{name:"cell-border-color-display",children:["cell-border-color-picker"]}],[{name:"align",children:["align-left","align-center","align-right"]},{name:"vertical-align",children:["vertical-align-top","vertical-align-middle","vertical-align-bottom"]},{name:"text-align",children:["text-align-left","text-align-center","text-align-right"]}],{name:"cell-border-style",children:["cell-border-solid","cell-border-none"]},{name:"cell-border-style-none",children:["cell-border-none-top","cell-border-none-right","cell-border-none-bottom","cell-border-none-left"]},{name:"add-image",children:[]}],type:"concat",controls:{}},url:{images:"src/images/",imageupload:"please-replace-image-upload-server-url-in-config",fileupload:"please-replace-file-upload-server-url-in-config"},shortcutKey:{order:["cut","copy","paste","remove"]},contextmenu:{order:["cut","copy","paste","remove","merge","canel-merge","insert-row","insert-column","remove-row","remove-column"]},events:{updateDatasets:null,customControlClick:null,designSave:null,error:null},enable:{design:{},applying:{"paste-data":!1,"event-select-cells":!1,editable:!1},view:{}},paging:!1,verification:!0,autoResize:!0,readonly:!0,autoFitFullScreen:!0}}(jQuery,window);