File: /var/www/Gosuryaid/wp/wp-content/themes/my-listing/assets/dist/admin/vendor.js
!function(t){"function"==typeof define&&define.amd?define("vendor",t):t()}(function(){"use strict";function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e,n,i,O;e=window,n=function(o){var r,a,s,u,l,p,f,c;function t(t){this.$inputor=t}function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}function n(t){this.$inputor=t,this.domInputor=this.$inputor[0]}n.prototype.setPos=function(t){var u,l,c,h;return(h=f.getSelection())&&(c=0,l=!1,(u=function(t,e){var n,i,r,o,a,s;for(s=[],r=0,o=(a=e.childNodes).length;r<o&&(n=a[r],!l);r++)if(3===n.nodeType){if(c+n.length>=t){l=!0,(i=p.createRange()).setStart(n,t-c),h.removeAllRanges(),h.addRange(i);break}s.push(c+=n.length)}else s.push(u(t,n));return s})(t,this.domInputor)),this.domInputor},n.prototype.getIEPosition=function(){return this.getPosition()},n.prototype.getPosition=function(){var t,e;return e=this.getOffset(),t=this.$inputor.offset(),e.left-=t.left,e.top-=t.top,e},n.prototype.getOldIEPos=function(){var t,e;return e=p.selection.createRange(),(t=p.body.createTextRange()).moveToElementText(this.domInputor),t.setEndPoint("EndToEnd",e),t.text.length},n.prototype.getPos=function(){var t,e,n;return(n=this.range())?((t=n.cloneRange()).selectNodeContents(this.domInputor),t.setEnd(n.endContainer,n.endOffset),e=t.toString().length,t.detach(),e):p.selection?this.getOldIEPos():void 0},n.prototype.getOldIEOffset=function(){var t,e;return(t=p.selection.createRange().duplicate()).moveStart("character",-1),{height:(e=t.getBoundingClientRect()).bottom-e.top,left:e.left,top:e.top}},n.prototype.getOffset=function(){var t,e,n,i,r;return f.getSelection&&(n=this.range())?(0<n.endOffset-1&&n.endContainer!==this.domInputor&&((t=n.cloneRange()).setStart(n.endContainer,n.endOffset-1),t.setEnd(n.endContainer,n.endOffset),e={height:(i=t.getBoundingClientRect()).height,left:i.left+i.width,top:i.top},t.detach()),e&&0!==(null!=e?e.height:void 0)||(t=n.cloneRange(),r=o(p.createTextNode("|")),t.insertNode(r[0]),t.selectNode(r[0]),e={height:(i=t.getBoundingClientRect()).height,left:i.left,top:i.top},r.remove(),t.detach())):p.selection&&(e=this.getOldIEOffset()),e&&(e.top+=o(f).scrollTop(),e.left+=o(f).scrollLeft()),e},n.prototype.range=function(){var t;if(f.getSelection)return 0<(t=f.getSelection()).rangeCount?t.getRangeAt(0):null},r=n,e.prototype.getIEPos=function(){var t,e,n,i,r,o;return e=this.domInputor,i=0,(r=p.selection.createRange())&&r.parentElement()===e&&(n=e.value.replace(/\r\n/g,"\n").length,(o=e.createTextRange()).moveToBookmark(r.getBookmark()),(t=e.createTextRange()).collapse(!1),i=-1<o.compareEndPoints("StartToEnd",t)?n:-o.moveStart("character",-n)),i},e.prototype.getPos=function(){return p.selection?this.getIEPos():this.domInputor.selectionStart},e.prototype.setPos=function(t){var e,n;return e=this.domInputor,p.selection?((n=e.createTextRange()).move("character",t),n.select()):e.setSelectionRange&&e.setSelectionRange(t,t),e},e.prototype.getIEOffset=function(t){var e;return e=this.domInputor.createTextRange(),t=t||this.getPos(),e.move("character",t),{left:e.boundingLeft,top:e.boundingTop,height:e.boundingHeight}},e.prototype.getOffset=function(t){var e,n,i;return e=this.$inputor,p.selection?((n=this.getIEOffset(t)).top+=o(f).scrollTop()+e.scrollTop(),n.left+=o(f).scrollLeft()+e.scrollLeft(),n):(n=e.offset(),i=this.getPosition(t),n={left:n.left+i.left-e.scrollLeft(),top:n.top+i.top-e.scrollTop(),height:i.height})},e.prototype.getPosition=function(t){var e,n,i,r,o;return e=this.$inputor,i=function(t){return t=t.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(t=t.replace(/\s/g," ")),t},void 0===t&&(t=this.getPos()),o=e.val().slice(0,t),n=e.val().slice(t),r="<span style='position: relative; display: inline;'>"+i(o)+"</span>",r+="<span id='caret' style='position: relative; display: inline;'>|</span>",r+="<span style='position: relative; display: inline;'>"+i(n)+"</span>",new s(e).create(r).rect()},e.prototype.getIEPosition=function(t){var e,n;return n=this.getIEOffset(t),e=this.$inputor.offset(),{left:n.left-e.left,top:n.top-e.top,height:n.height}},a=e,t.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],t.prototype.mirrorCss=function(){var n,i=this;return n={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),o.each(this.css_attr,function(t,e){return n[e]=i.$inputor.css(e)}),n},t.prototype.create=function(t){return this.$mirror=o("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(t),this.$inputor.after(this.$mirror),this},t.prototype.rect=function(){var t,e,n;return n={left:(e=(t=this.$mirror.find("#caret")).position()).left,top:e.top,height:t.height()},this.$mirror.remove(),n},s=t,u={contentEditable:function(t){return!(!t[0].contentEditable||"true"!==t[0].contentEditable)}},l={pos:function(t){return t||0===t?this.setPos(t):this.getPos()},position:function(t){return p.selection?this.getIEPosition(t):this.getPosition(t)},offset:function(t){return this.getOffset(t)}},f=p=null,c=function(t){var e;return p=(e=null!=t?t.iframe:void 0)?(f=e.contentWindow,e.contentDocument||f.document):(f=window,document)},o.fn.caret=function(t,e,n){var i;return l[t]?(o.isPlainObject(e)?(c(e),e=void 0):c(n),i=u.contentEditable(this)?new r(this):new a(this),l[t].apply(i,[e])):o.error("Method "+t+" does not exist on jQuery.caret")},o.fn.caret.EditableCaret=r,o.fn.caret.InputCaret=a,o.fn.caret.Utils=u,o.fn.caret.apis=l},"function"==typeof define&&define.amd?define(["jquery"],function(t){return e.returnExportsGlobal=n(t)}):"object"==("undefined"==typeof exports?"undefined":T(exports))?module.exports=n(require("jquery")):n(jQuery),window,i=function(f){var i,d,o;function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=f(t),this.setupRootElement(),this.listen()}d={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},i={beforeSave:function(t){return e.arrayToDefaultHash(t)},matcher:function(t,e,n,i){var r,o,a;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(t="(?:^|\\s)"+t),r=decodeURI("%C3%80"),o=decodeURI("%C3%BF"),(a=new RegExp(t+"([A-Za-z"+r+"-"+o+"0-9_"+(i?" ":"")+"'.+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi").exec(e))?a[2]||a[1]:null},filter:function(t,e,n){var i,r,o,a;for(i=[],r=0,a=e.length;r<a;r++)o=e[r],~new String(o[n]).toLowerCase().indexOf(t.toLowerCase())&&i.push(o);return i},remoteFilter:null,sorter:function(t,e,n){var i,r,o,a;if(!t)return e;for(i=[],r=0,a=e.length;r<a;r++)(o=e[r]).atwho_order=new String(o[n]).toLowerCase().indexOf(t.toLowerCase()),-1<o.atwho_order&&i.push(o);return i.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,i){var e;e=t;try{return"string"!=typeof t&&(e=t(i)),e.replace(/\$\{([^\}]*)\}/g,function(t,e,n){return i[e]})}catch(t){return""}},highlighter:function(t,e){var n;return e?(n=new RegExp(">\\s*([^<]*?)("+e.replace("+","\\+")+")([^<]*)\\s*<","ig"),t.replace(n,function(t,e,n,i){return"> "+e+"<strong>"+n+"</strong>"+i+" <"})):t},beforeInsert:function(t,e,n){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},t.prototype.createContainer=function(t){var e;return null!=(e=this.$el)&&e.remove(),f(t.body).append(this.$el=f("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(t,e){var n;if(null==e&&(e=!1),t)this.window=t.contentWindow,this.document=t.contentDocument||this.window.document,this.iframe=t;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(t){if(n=t,this.iframe=null,f.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+n)}}return this.createContainer((this.iframeAsRoot=e)?this.document:document)},t.prototype.controller=function(t){var e,n,i,r;if(this.aliasMaps[t])n=this.controllers[this.aliasMaps[t]];else for(i in r=this.controllers)if(e=r[i],i===t){n=e;break}return n||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(t){return this.currentFlag=t,this},t.prototype.reg=function(t,e){var n,i;return i=(n=this.controllers)[t]||(n[t]=this.$inputor.is("[contentEditable]")?new c(this,t):new a(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),i.init(e),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(s=this,function(t){var e;return null!=(e=s.controller())&&e.view.hide(),s.isComposing=!0,null})).on("compositionend",(a=this,function(t){return a.isComposing=!1,setTimeout(function(t){return a.dispatch(t)}),null})).on("keyup.atwhoInner",(o=this,function(t){return o.onKeyup(t)})).on("keydown.atwhoInner",(i=this,function(t){return i.onKeydown(t)})).on("blur.atwhoInner",(n=this,function(t){var e;return(e=n.controller())?(e.expectedQueryCBId=null,e.view.hide(t,e.getOpt("displayTimeout"))):void 0})).on("click.atwhoInner",(e=this,function(t){return e.dispatch(t)})).on("scroll.atwhoInner",(r=this,function(){var i;return i=r.$inputor.scrollTop(),function(t){var e,n;return e=t.target.scrollTop,i!==e&&null!=(n=r.controller())&&n.view.hide(t),i=e,!0}}()));var r,e,n,i,o,a,s},t.prototype.shutdown=function(){var t,e;for(t in e=this.controllers)e[t].destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(t){var e,n,i,r;for(e in r=[],i=this.controllers)n=i[e],r.push(n.lookUp(t));return r},t.prototype.onKeyup=function(t){var e;switch(t.keyCode){case d.ESC:t.preventDefault(),null!=(e=this.controller())&&e.view.hide();break;case d.DOWN:case d.UP:case d.CTRL:case d.ENTER:f.noop();break;case d.P:case d.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var e,n;if((n=null!=(e=this.controller())?e.view:void 0)&&n.visible())switch(t.keyCode){case d.ESC:t.preventDefault(),n.hide(t);break;case d.UP:t.preventDefault(),n.prev();break;case d.DOWN:t.preventDefault(),n.next();break;case d.P:if(!t.ctrlKey)return;t.preventDefault(),n.prev();break;case d.N:if(!t.ctrlKey)return;t.preventDefault(),n.next();break;case d.TAB:case d.ENTER:case d.SPACE:if(!n.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===d.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===d.TAB)return;n.highlighted()?(t.preventDefault(),n.choose(t)):n.hide(t);break;default:f.noop()}},o=t;var e,r=[].slice;function n(t,e){this.app=t,this.at=e,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=f("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=f("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new h(this),this.view=new p(this)}n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(t){return this.setting=f.extend({},this.setting||f.fn.atwho.default,t),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var t,e,n;n=arguments[0],t=2<=arguments.length?r.call(arguments,1):[];try{return i[n].apply(this,t)}catch(t){return e=t,f.error(e+" Or maybe At.js doesn't have function "+n)}},n.prototype.trigger=function(t,e){var n,i;return null==e&&(e=[]),e.push(this),i=(n=this.getOpt("alias"))?t+"-"+n+".atwho":t+".atwho",this.$inputor.trigger(i,e)},n.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||i[t]},n.prototype.getOpt=function(t,e){try{return this.setting[t]}catch(t){return null}},n.prototype.insertContentFor=function(t){var e,n;return n=this.getOpt("insertTpl"),e=f.extend({},t.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,n,e,"onInsert")},n.prototype.renderView=function(t){var e;return e=this.getOpt("searchKey"),t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(t){var e,n,i,r;if(!f.isArray(t))return t;for(r=[],e=0,i=t.length;e<i;e++)n=t[e],f.isPlainObject(n)?r.push(n):r.push({name:n});return r},n.prototype.lookUp=function(t){var e,n;if((!t||"click"!==t.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(e,n):this._lookUp(e)):this.expectedQueryCBId=null,e},n.prototype._delayLookUp=function(t,e){var n,i,r;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),0<(i=e-(n-this.previousCallTime))&&i<e?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((r=this,function(){return r.previousCallTime=0,r.delayedCallTimeout=null,r._lookUp(t)}),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},n.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(t){var e;return e=function(t,e){return t===this.expectedQueryCBId?e&&0<e.length?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,f.proxy(e,this,this.expectedQueryCBId))};var a,s=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;function l(){return l.__super__.constructor.apply(this,arguments)}s(l,e=n),l.prototype.catchQuery=function(){var t,e,n,i,r,o,a;return e=this.$inputor.val(),t=this.$inputor.caret("pos",{iframe:this.app.iframe}),a=e.slice(0,t),(i="string"==typeof(r=this.callbacks("matcher").call(this,this.at,a,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&r.length<this.getOpt("minLen",0)?void 0:(i&&r.length<=this.getOpt("maxLen",20)?(n=(o=t-r.length)+r.length,r={text:r,headPos:this.pos=o,endPos:n},this.trigger("matched",[this.at,r.text])):(r=null,this.view.hide()),this.query=r)},l.prototype.rect=function(){var t,e,n;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(e=f(this.app.iframe).offset(),t.left+=e.left,t.top+=e.top),n=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+n}},l.prototype.insert=function(t,e){var n,i,r,o,a;return a=""+(r=(i=(n=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(t+=o=""===(o=this.getOpt("suffix"))?o:o||" ")+i.slice(this.query.endPos||0),n.val(a),n.caret("pos",r.length+t.length,{iframe:this.app.iframe}),n.is(":focus")||n.focus(),n.change()},a=l;var c,h,p,g;s=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;function v(){return v.__super__.constructor.apply(this,arguments)}function y(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}function m(t){this.context=t,this.$el=f("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}s(v,e),v.prototype._getRange=function(){var t;return 0<(t=this.app.window.getSelection()).rangeCount?t.getRangeAt(0):void 0},v.prototype._setRange=function(t,e,n){return null==n&&(n=this._getRange()),n&&e?(e=f(e)[0],"after"===t?(n.setEndAfter(e),n.setStartAfter(e)):(n.setEndBefore(e),n.setStartBefore(e)),n.collapse(!1),this._clearRange(n)):void 0},v.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},v.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===d.RIGHT||e===d.LEFT||e===d.UP||e===d.DOWN},v.prototype._unwrap=function(t){var e;return(e=(t=f(t).unwrap().get(0)).nextSibling)&&e.nodeValue&&(t.nodeValue+=e.nodeValue,f(e).remove()),t},v.prototype.catchQuery=function(t){var e,n,i,r,o,a,s,u,l,c,h,p;if((p=this._getRange())&&p.collapsed){if(t.which===d.ENTER)return(n=f(p.startContainer).closest(".atwho-query")).contents().unwrap(),n.is(":empty")&&n.remove(),(n=f(".atwho-query",this.app.document)).text(n.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(f(p.startContainer).is(this.$inputor))return void this._clearRange();t.which===d.BACKSPACE&&p.startContainer.nodeType===document.ELEMENT_NODE&&0<=(l=p.startOffset-1)?((i=p.cloneRange()).setStart(p.startContainer,l),f(i.cloneContents()).contents().last().is(".atwho-inserted")&&(o=f(p.startContainer).contents().get(l),this._setRange("after",f(o).contents().last()))):t.which===d.LEFT&&p.startContainer.nodeType===document.TEXT_NODE&&(e=f(p.startContainer.previousSibling)).is(".atwho-inserted")&&0===p.startOffset&&this._setRange("after",e.contents().last())}if(f(p.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),0<(n=f(".atwho-query",this.app.document)).length&&n.is(":empty")&&0===n.text().length&&n.remove(),this._movingEvent(t)||n.removeClass("atwho-inserted"),0<n.length)switch(t.which){case d.LEFT:return this._setRange("before",n.get(0),p),void n.removeClass("atwho-query");case d.RIGHT:return this._setRange("after",n.get(0).nextSibling,p),void n.removeClass("atwho-query")}if(0<n.length&&(h=n.attr("data-atwho-at-query"))&&(n.empty().html(h).attr("data-atwho-at-query",null),this._setRange("after",n.get(0),p)),(i=p.cloneRange()).setStart(p.startContainer,0),a="string"==typeof(u=this.callbacks("matcher").call(this,this.at,i.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===n.length&&a&&0<=(r=p.startOffset-this.at.length-u.length)&&(p.setStart(p.startContainer,r),n=f("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),p.surroundContents(n.get(0)),(s=n.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(p.setStart(s,s.length),p.setEnd(s,s.length),this._clearRange(p)):this._setRange("after",s,p))),!(a&&u.length<this.getOpt("minLen",0)))return a&&u.length<=this.getOpt("maxLen",20)?(c={text:u,el:n},this.trigger("matched",[this.at,c.text]),this.query=c):(this.view.hide(),this.query={el:n},0<=n.text().indexOf(this.at)&&(this._movingEvent(t)&&n.hasClass("atwho-inserted")?n.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,n)&&this._setRange("after",this._unwrap(n.text(n.text()).contents().first()))),null)}},v.prototype.rect=function(){var t,e;return(e=this.query.el.offset())&&this.query.el[0].getClientRects().length?(this.app.iframe&&!this.app.iframeAsRoot&&(t=f(this.app.iframe).offset(),e.left+=t.left-this.$inputor.scrollLeft(),e.top+=t.top-this.$inputor.scrollTop()),e.bottom=e.top+this.query.el.height(),e):void 0},v.prototype.insert=function(t,e){var n,i,r,o,a;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,t,e):(o=""===(o=this.getOpt("suffix"))?o:o||" ",n=e.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(r=this._getRange())&&(this.query.el.length&&r.setEndAfter(this.query.el[0]),r.collapse(!1),r.insertNode(a=this.app.document.createTextNode(""+o)),this._setRange("after",a,r)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},c=v,y.prototype.destroy=function(){return this.storage.data(this.at,null)},y.prototype.saved=function(){return 0<this.fetch()},y.prototype.query=function(t,e){var n,i,r;return i=this.fetch(),r=this.context.getOpt("searchKey"),i=this.context.callbacks("filter").call(this.context,t,i,r)||[],n=this.context.callbacks("remoteFilter"),0<i.length||!n&&0===i.length?e(i):n.call(this.context,t,e)},y.prototype.fetch=function(){return this.storage.data(this.at)||[]},y.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},y.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},y.prototype.reload=function(t){return this._load(t)},y.prototype._load=function(t){return"string"==typeof t?f.ajax(t,{dataType:"json"}).done((e=this,function(t){return e.save(t)})):this.save(t);var e},h=y,m.prototype.init=function(){var t,e;return e=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(t=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(t),this.$el.attr({id:"at-view-"+e})},m.prototype.destroy=function(){return this.$el.remove()},m.prototype.bindEvent=function(){var n,i,r,e;return n=this.$el.find("ul"),r=i=0,n.on("mousemove.atwho-view","li",function(t){var e;if((i!==t.clientX||r!==t.clientY)&&(i=t.clientX,r=t.clientY,!(e=f(t.currentTarget)).hasClass("cur")))return n.find(".cur").removeClass("cur"),e.addClass("cur")}).on("click.atwho-view","li",(e=this,function(t){return n.find(".cur").removeClass("cur"),f(t.currentTarget).addClass("cur"),e.choose(t),t.preventDefault()}))},m.prototype.visible=function(){return f.expr.filters.visible(this.$el[0])},m.prototype.highlighted=function(){return 0<this.$el.find(".cur").length},m.prototype.choose=function(t){var e,n;return(e=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,e,t),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix")?this.stopShowing=!0:void 0},m.prototype.reposition=function(t){var e,n,i,r;return e=this.context.app.iframeAsRoot?this.context.app.window:window,t.bottom+this.$el.height()-f(e).scrollTop()>f(e).height()&&(t.bottom=t.top-this.$el.height()),t.left>(i=f(e).width()-this.$el.width()-5)&&(t.left=i),n={left:t.left,top:t.bottom},null!=(r=this.context.callbacks("beforeReposition"))&&r.call(this.context,n),this.$el.offset(n),this.context.trigger("reposition",[n])},m.prototype.next=function(){var t,e,n;return(t=this.$el.find(".cur").removeClass("cur").next()).length||(t=this.$el.find("li:first")),t.addClass("cur"),n=(e=t[0]).offsetTop+e.offsetHeight+(e.nextSibling?e.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},m.prototype.prev=function(){var t,e,n;return(e=this.$el.find(".cur").removeClass("cur").prev()).length||(e=this.$el.find("li:last")),e.addClass("cur"),t=(n=e[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},m.prototype.scrollTop=function(t){var e;return(e=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},m.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0)},m.prototype.hide=function(t,e){var n,i;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(n=function(){return i.hide()},clearTimeout((i=this).timeoutID),this.timeoutID=setTimeout(n,e))},m.prototype.render=function(t){var e,n,i,r,o,a,s;if(f.isArray(t)&&0<t.length){for(this.$el.find("ul").empty(),n=this.$el.find("ul"),s=this.context.getOpt("displayTpl"),i=0,o=t.length;i<o;i++)r=t[i],r=f.extend({},r,{"atwho-at":this.context.at}),a=this.context.callbacks("tplEval").call(this.context,s,r,"onDisplay"),(e=f(this.context.callbacks("highlighter").call(this.context,a,this.context.query.text))).data("item-data",r),n.append(e);return this.show(),this.context.getOpt("highlightFirst")?n.find("li:first").addClass("cur"):void 0}this.hide()},p=m,g={load:function(t,e){var n;return(n=this.controller(t))?n.model.load(e):void 0},isSelecting:function(){var t;return!!(null!=(t=this.controller())?t.view.visible():void 0)},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},f.fn.atwho=function(n){var i,r;return i=arguments,r=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var t,e;return(e=(t=f(this)).data("atwho"))||t.data("atwho",e=new o(this)),"object"!=T(n)&&n?g[n]&&e?r=g[n].apply(e,Array.prototype.slice.call(i,1)):f.error("Method "+n+" does not exist on jQuery.atwho"):e.reg(n.at,n)}),null!=r?r:this},f.fn.atwho.default={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:i,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},f.fn.atwho.debug=!1},"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(t)}):"object"==("undefined"==typeof exports?"undefined":T(exports))?module.exports=i(require("jquery")):i(jQuery),(O=jQuery).fn.tipTip=function(t){var w=O.extend({activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},t);if(O("#tiptip_holder").length<=0){(C=O('<div id="tiptip_holder"></div>')).css("max-width",w.maxWidth);var x=O('<div id="tiptip_content"></div>'),$=O('<div id="tiptip_arrow"></div>');O("body").append(C.html(x).prepend($.html('<div id="tiptip_arrow_inner"></div>')))}else{var C=O("#tiptip_holder");x=O("#tiptip_content"),$=O("#tiptip_arrow")}return this.each(function(){function t(){w.enter.call(this),x.html(m),C.hide().removeAttr("class").css("margin","0"),$.removeAttr("style");var t=parseInt(y.offset().top),e=parseInt(y.offset().left),n=parseInt(y.outerWidth()),i=parseInt(y.outerHeight()),r=C.outerWidth(),o=C.outerHeight(),a=Math.round((n-r)/2),s=Math.round((i-o)/2),u=Math.round(e+a),l=Math.round(t+i+w.edgeOffset),c="",h="",p=Math.round(r-12)/2;"bottom"==w.defaultPosition?c="_bottom":"top"==w.defaultPosition?c="_top":"left"==w.defaultPosition?c="_left":"right"==w.defaultPosition&&(c="_right");var f=a+e<parseInt(O(window).scrollLeft()),d=r+e>parseInt(O(window).width());f&&a<0||"_right"==c&&!d||"_left"==c&&e<r+w.edgeOffset+5?(c="_right",h=Math.round(o-13)/2,p=-12,u=Math.round(e+n+w.edgeOffset),l=Math.round(t+s)):(d&&a<0||"_left"==c&&!f)&&(c="_left",h=Math.round(o-13)/2,p=Math.round(r),u=Math.round(e-(r+w.edgeOffset+5)),l=Math.round(t+s));var g=t+i+w.edgeOffset+o+8>parseInt(O(window).height()+O(window).scrollTop()),v=t+i-(w.edgeOffset+o+8)<0;g||"_bottom"==c&&g||"_top"==c&&!v?("_top"==c||"_bottom"==c?c="_top":c+="_top",h=o,l=Math.round(t-(o+5+w.edgeOffset))):(v|("_top"==c&&v)||"_bottom"==c&&!g)&&("_top"==c||"_bottom"==c?c="_bottom":c+="_bottom",h=-12,l=Math.round(t+i+w.edgeOffset)),"_right_top"==c||"_left_top"==c?l+=5:"_right_bottom"!=c&&"_left_bottom"!=c||(l-=5),"_left_top"!=c&&"_left_bottom"!=c||(u+=5),$.css({"margin-left":p+"px","margin-top":h+"px"}),C.css({"margin-left":u+"px","margin-top":l+"px"}).attr("class","tip"+c),b&&clearTimeout(b),b=setTimeout(function(){C.stop(!0,!0).fadeIn(w.fadeIn)},w.delay)}function e(){w.exit.call(this),b&&clearTimeout(b),C.fadeOut(w.fadeOut)}var y=O(this);if(w.content)m=w.content;else var m=y.attr(w.attribute);if(""!=m){w.content||y.removeAttr(w.attribute);var b=!1;"hover"==w.activation?(y.hover(function(){t()},function(){w.keepAlive||e()}),w.keepAlive&&C.hover(function(){},function(){e()})):"focus"==w.activation?y.focus(function(){t()}).blur(function(){e()}):"click"==w.activation&&(y.click(function(){return t(),!1}).hover(function(){},function(){w.keepAlive||e()}),w.keepAlive&&C.hover(function(){},function(){e()}))}})},function(){function t(){}function m(t){var e=T(t);return null!=t&&("object"==e||"function"==e)}function o(t){return null!=t&&"object"==T(t)}function n(t){var e;if(!(e="symbol"==T(t))&&(e=o(t))){if(null==t)t=t===x?"[object Undefined]":"[object Null]";else if(v&&v in Object(t)){e=f.call(t,v);var n=t[v];try{t[v]=x;var i=!0}catch(t){}var r=d.call(t);i&&(e?t[v]=n:delete t[v]),t=r}else t=d.call(t);e="[object Symbol]"==t}return e}function b(t){if("number"==typeof t)return t;if(n(t))return i;if(m(t)&&(t=m(t="function"==typeof t.valueOf?t.valueOf():t)?t+"":t),"string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var e=s.test(t);return e||u.test(t)?l(t.slice(2),e?2:8):a.test(t)?i:+t}function w(){return c.Date.now()}var x,i=NaN,r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,e="object"==("undefined"==typeof self?"undefined":T(self))&&self&&self.Object===Object&&self,c="object"==("undefined"==typeof global?"undefined":T(global))&&global&&global.Object===Object&&global||e||Function("return this")(),h=(e="object"==("undefined"==typeof exports?"undefined":T(exports))&&exports&&!exports.nodeType&&exports)&&"object"==("undefined"==typeof module?"undefined":T(module))&&module&&!module.nodeType&&module,p=Object.prototype,f=p.hasOwnProperty,d=p.toString,g=c._,v=(p=c.Symbol)?p.toStringTag:x,$=Math.max,C=Math.min;t.debounce=function(i,r,t){function n(t){var e=u,n=l;return u=l=x,d=t,h=i.apply(n,e)}function o(t){var e=t-f;return t-=d,f===x||r<=e||e<0||v&&c<=t}function a(){var t=w();if(o(t))return s(t);var e,n=setTimeout;e=t-d,t=r-(t-f),e=v?C(t,c-e):t,p=n(a,e)}function s(t){return p=x,y&&u?n(t):(u=l=x,h)}function e(){var t=w(),e=o(t);if(u=arguments,l=this,f=t,e){if(p===x)return d=t=f,p=setTimeout(a,r),g?n(t):h;if(v)return p=setTimeout(a,r),n(f)}return p===x&&(p=setTimeout(a,r)),h}var u,l,c,h,p,f,d=0,g=!1,v=!1,y=!0;if("function"!=typeof i)throw new TypeError("Expected a function");return r=b(r)||0,m(t)&&(g=!!t.leading,c=(v="maxWait"in t)?$(b(t.maxWait)||0,r):c,y="trailing"in t?!!t.trailing:y),e.cancel=function(){p!==x&&clearTimeout(p),d=0,u=f=l=p=x},e.flush=function(){return p===x?h:s(w())},e},t.isObject=m,t.isObjectLike=o,t.isSymbol=n,t.noConflict=function(){return c._===this&&(c._=g),this},t.now=w,t.toNumber=b,t.VERSION="4.17.4","function"==typeof define&&"object"==T(define.amd)&&define.amd?(c._=t,define(function(){return t})):h?((h.exports=t)._=t,e._=t):c._=t}.call(window);var y,s,u,t=_.noConflict();function m(t){return t}function b(t){return y.isArray(t)}function l(t){return!b(t)&&t instanceof Object}function c(t,e){return y.inArray(e,t)}function w(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n,t)}function x(t){return t[t.length-1]}function $(){var n={};return w(function(t){return Array.prototype.slice.call(t)}(arguments),function(t){w(t,function(t,e){n[e]=t})}),n}function C(t,e,n){return b(t)?function(t,i){var r=[];return w(t,function(t,e,n){r.push(i(t,e,n))}),r}(t,e):function(t,i,r){var o={};return w(t,function(t,e,n){e=r?r(e,t):e,o[e]=i(t,e,n)}),o}(t,e,n)}function r(t,n,i){return C(t,function(t,e){return t[n].apply(t,i||[])})}function o(t,i){var r,o=function(t){var i={};return(t=t||{}).publish=function(t,e){w(i[t],function(t){t(e)})},t.subscribe=function(t,e){i[t]=i[t]||[],i[t].push(e)},t.unsubscribe=function(n){w(i,function(t){var e=c(t,n);-1!==e&&t.splice(e,1)})},t}(),e=t.$;return o.getType=function(){throw'implement me (return type. "text", "radio", etc.)'},o.$=function(t){return t?e.find(t):e},o.disable=function(){o.$().prop("disabled",!0),o.publish("isEnabled",!1)},o.enable=function(){o.$().prop("disabled",!1),o.publish("isEnabled",!0)},i.equalTo=function(t,e){return t===e},i.publishChange=function(t,e){var n=o.get();i.equalTo(n,r)||o.publish("change",{e:t,domElement:e}),r=n},o}function a(t,e){var n=o(t,e);return n.get=function(){return n.$().val()},n.set=function(t){n.$().val(t)},n.clear=function(){n.set("")},e.buildSetter=function(e){return function(t){e.call(n,t)}},n}function h(t,e){t=b(t)?t:[t],e=b(e)?e:[e];var n=!0;return t.length!==e.length?n=!1:w(t,function(t){!function(t,e){return-1!==c(t,e)}(e,t)&&(n=!1)}),n}function p(t){var e={},n=a(t,e);return n.getType=function(){return"button"},n.$().on("change",function(t){e.publishChange(t,this)}),n}function f(t){var e={},n=a(t,e);return n.getType=function(){return"checkbox"},n.get=function(){var t=[];return n.$().filter(":checked").each(function(){t.push(s(this).val())}),t},n.set=function(t){t=b(t)?t:[t],n.$().each(function(){s(this).prop("checked",!1)}),w(t,function(t){n.$().filter('[value="'+t+'"]').prop("checked",!0)})},e.equalTo=h,n.$().change(function(t){e.publishChange(t,this)}),n}function d(t){var e=u(t);return e.getType=function(){return"email"},e}function g(t){var e={},n=o(t,e);return n.getType=function(){return"file"},n.get=function(){return x(n.$().val().split("\\"))},n.clear=function(){this.$().each(function(){s(this).wrap("<form>").closest("form").get(0).reset(),s(this).unwrap()})},n.$().change(function(t){e.publishChange(t,this)}),n}function v(t){var e={},n=a(t,e);return n.getType=function(){return"hidden"},n.$().change(function(t){e.publishChange(t,this)}),n}function k(t){var e={},i=o(t,e);return i.getType=function(){return"file[multiple]"},i.get=function(){var t,e=i.$().get(0).files||[],n=[];for(t=0;t<(e.length||0);t+=1)n.push(e[t].name);return n},i.clear=function(){this.$().each(function(){s(this).wrap("<form>").closest("form").get(0).reset(),s(this).unwrap()})},i.$().change(function(t){e.publishChange(t,this)}),i}function E(t){var e={},n=a(t,e);return n.getType=function(){return"select[multiple]"},n.get=function(){return n.$().val()||[]},n.set=function(t){n.$().val(""===t?[]:b(t)?t:[t])},e.equalTo=h,n.$().change(function(t){e.publishChange(t,this)}),n}function S(t){var e=u(t);return e.getType=function(){return"password"},e}function R(t){var e={},n=a(t,e);return n.getType=function(){return"radio"},n.get=function(){return n.$().filter(":checked").val()||null},n.set=function(t){t?n.$().filter('[value="'+t+'"]').prop("checked",!0):n.$().each(function(){s(this).prop("checked",!1)})},n.$().change(function(t){e.publishChange(t,this)}),n}function I(t){var e={},n=a(t,e);return n.getType=function(){return"range"},n.$().change(function(t){e.publishChange(t,this)}),n}function A(t){var e={},n=a(t,e);return n.getType=function(){return"select"},n.$().change(function(t){e.publishChange(t,this)}),n}function P(t){var e={},n=a(t,e);return n.getType=function(){return"textarea"},n.$().on("change keyup keydown",function(t){e.publishChange(t,this)}),n}function q(t){var e=u(t);return e.getType=function(){return"url"},e}function j(t){function e(e,t){(l(t)?t:o.find(t)).each(function(){var t=s(this).attr("name");r[t]=a[e]({$:s(this)})})}function n(e,t){var n=[],i=l(t)?t:o.find(t);l(t)?r[i.attr("name")]=a[e]({$:i}):(i.each(function(){-1===c(n,s(this).attr("name"))&&n.push(s(this).attr("name"))}),w(n,function(t){r[t]=a[e]({$:o.find('input[name="'+t+'"]')})}))}var r={},o=t.$,a=t.constructorOverride||{button:p,text:u,url:q,email:d,password:S,range:I,textarea:P,select:A,"select[multiple]":E,radio:R,checkbox:f,file:g,"file[multiple]":k,hidden:v};return o.is("input, select, textarea")?o.is('input[type="button"], button, input[type="submit"]')?e("button",o):o.is("textarea")?e("textarea",o):o.is('input[type="text"]')||o.is("input")&&!o.attr("type")?e("text",o):o.is('input[type="password"]')?e("password",o):o.is('input[type="email"]')?e("email",o):o.is('input[type="url"]')?e("url",o):o.is('input[type="range"]')?e("range",o):o.is("select")?o.is("[multiple]")?e("select[multiple]",o):e("select",o):o.is('input[type="file"]')?o.is("[multiple]")?e("file[multiple]",o):e("file",o):o.is('input[type="hidden"]')?e("hidden",o):o.is('input[type="radio"]')?n("radio",o):o.is('input[type="checkbox"]')?n("checkbox",o):e("text",o):(e("button",'input[type="button"], button, input[type="submit"]'),e("text",'input[type="text"]'),e("password",'input[type="password"]'),e("email",'input[type="email"]'),e("url",'input[type="url"]'),e("range",'input[type="range"]'),e("textarea","textarea"),e("select","select:not([multiple])"),e("select[multiple]","select[multiple]"),e("file",'input[type="file"]:not([multiple])'),e("file[multiple]",'input[type="file"][multiple]'),e("hidden",'input[type="hidden"]'),n("radio",'input[type="radio"]'),n("checkbox",'input[type="checkbox"]')),r}MyListing.Helpers.debounce=t.debounce,y=jQuery,s=jQuery,u=function(t){var e={},n=a(t,e);return n.getType=function(){return"text"},n.$().on("change keyup keydown",function(t){e.publishChange(t,this)}),n},s.fn.inputVal=function(t){var e=s(this),n=j({$:e});return e.is("input, textarea, select")?void 0===t?n[e.attr("name")].get():(n[e.attr("name")].set(t),e):void 0===t?r(n,"get"):(w(t,function(t,e){n[e].set(t)}),e)},s.fn.inputOnChange=function(e){var t=s(this),n=j({$:t});return w(n,function(t){t.subscribe("change",function(t){e.call(t.domElement,t.e)})}),t},s.fn.inputDisable=function(){var t=s(this);return r(j({$:t}),"disable"),t},s.fn.inputEnable=function(){var t=s(this);return r(j({$:t}),"enable"),t},s.fn.inputClear=function(){var t=s(this);return r(j({$:t}),"clear"),t},y.fn.repeaterVal=function(){var t,i;return function n(t){if(1===t.length&&(0===t[0].key.length||1===t[0].key.length&&!t[0].key[0]))return t[0].val;w(t,function(t){t.head=t.key.shift()});var i,e,r=(e={},w(t,function(t){e[t.head]||(e[t.head]=[]),e[t.head].push(t)}),e);return/^[0-9]+$/.test(t[0].head)?(i=[],w(r,function(t){i.push(n(t))})):(i={},w(r,function(t,e){i[e]=n(t)})),i}((t=y(this).inputVal(),i=[],w(t,function(t,e){var n=[];"undefined"!==e&&(n.push(e.match(/^[^\[]*/)[0]),n=n.concat(C(e.match(/\[[^\]]*\]/g),function(t){return t.replace(/[\[\]]/g,"")})),i.push({val:t,key:n}))}),i))},y.fn.repeater=function(g){var v;return g=g||{},y(this).each(function(){function u(t,e){return t.filter(function(){return!e||0===y(this).closest(function(t,e){return C(t,function(t){return t[e]})}(e,"selector").join(",")).length})}function n(){return u(r.find("[data-repeater-item]"),g.repeaters)}var t=y(this),i=g.show||function(){y(this).show()},e=g.hide||function(t){t()},r=t.find("[data-repeater-list]").first(),o=r.find("[data-repeater-item]").first().clone().hide(),a=u(u(y(this).find("[data-repeater-item]"),g.repeaters).first().find("[data-repeater-delete]"),g.repeaters);function s(){var t=r.data("repeater-list");return g.$parent?g.$parent.data("item-name")+"["+t+"]":t}function l(t){g.repeaters&&t.each(function(){var e=y(this);w(g.repeaters,function(t){e.find(t.selector).repeater($(t,{$parent:e}))})})}function c(t,e,n){t&&w(t,function(t){n.call(e.find(t.selector)[0],t)})}function h(t,a,s){t.each(function(r){var o=y(this);o.data("item-name",a+"["+r+"]"),u(o.find("[name]"),s).each(function(){var t=y(this),e=t.attr("name").match(/\[[^\]]+\]/g),n=e?x(e).replace(/\[|\]/g,""):t.attr("name"),i=a+"["+r+"]["+n+"]"+(t.is(":checkbox")||t.attr("multiple")?"[]":"");t.attr("name",i),c(s,o,function(t){var e=y(this);h(u(e.find("[data-repeater-item]"),t.repeaters||[]),a+"["+r+"]["+e.find("[data-repeater-list]").first().data("repeater-list")+"]",t.repeaters)})})}),r.find("input[name][checked]").removeAttr("checked").prop("checked",!0)}function p(t){var e=o.clone();f(e,t),g.repeaters&&l(e),i.call(e.get(0))}g.isFirstItemUndeletable&&a&&a.remove(),h(n(),s(),g.repeaters),l(n()),g.initEmpty&&n().remove(),g.ready&&g.ready(function(){h(n(),s(),g.repeaters)});var f=function(t,e){r.append(t),h(n(),s(),g.repeaters),t.find("[name]").each(function(){y(this).inputClear()}),d(t,e||g.defaultValues,g.repeaters)};function d(t,e,n){if(e||g.defaultValues){var i={};u(t.find("[name]"),n).each(function(){var t=y(this).attr("name").match(/\[([^\]]*)(\]|\]\[\])$/)[1];i[t]=y(this).attr("name")}),t.inputVal(C(function(t,i){var r;return b(t)?(r=[],w(t,function(t,e,n){i(t,e,n)&&r.push(t)})):(r={},w(t,function(t,e,n){i(t,e,n)&&(r[e]=t)})),r}(e||g.defaultValues,function(t,e){return i[e]}),m,function(t){return i[t]}))}c(n,t,function(i){var r=y(this);u(r.find("[data-repeater-item]"),i.repeaters).each(function(){var t=r.find("[data-repeater-list]").data("repeater-list");if(e&&e[t]){var n=y(this).clone();r.find("[data-repeater-item]").remove(),w(e[t],function(t){var e=n.clone();d(e,t,i.repeaters||[]),r.find("[data-repeater-list]").append(e)})}else d(y(this),i.defaultValues,i.repeaters||[])})})}v=function(t){n().remove(),w(t,p)},u(t.find("[data-repeater-create]"),g.repeaters).click(function(){p()}),r.on("click","[data-repeater-delete]",function(){var t=y(this).closest("[data-repeater-item]").get(0);e.call(t,function(){y(t).remove(),h(n(),s(),g.repeaters)})})}),this.setList=v,this}});