{"version":3,"file":"best_in_place-HJYeSk3T.js","sources":["../../../node_modules/autosize/dist/autosize.js","../../../node_modules/autosize-input/index.js","../../../app/javascript/vendor/best_in_place.js"],"sourcesContent":["/*!\n\tautosize 4.0.4\n\tlicense: MIT\n\thttp://www.jacklmoore.com/autosize\n*/\n(function (global, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(['module', 'exports'], factory);\n\t} else if (typeof exports !== \"undefined\") {\n\t\tfactory(module, exports);\n\t} else {\n\t\tvar mod = {\n\t\t\texports: {}\n\t\t};\n\t\tfactory(mod, mod.exports);\n\t\tglobal.autosize = mod.exports;\n\t}\n})(this, function (module, exports) {\n\t'use strict';\n\n\tvar map = typeof Map === \"function\" ? new Map() : function () {\n\t\tvar keys = [];\n\t\tvar values = [];\n\n\t\treturn {\n\t\t\thas: function has(key) {\n\t\t\t\treturn keys.indexOf(key) > -1;\n\t\t\t},\n\t\t\tget: function get(key) {\n\t\t\t\treturn values[keys.indexOf(key)];\n\t\t\t},\n\t\t\tset: function set(key, value) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t\tvalues.push(value);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelete: function _delete(key) {\n\t\t\t\tvar index = keys.indexOf(key);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tkeys.splice(index, 1);\n\t\t\t\t\tvalues.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tvar createEvent = function createEvent(name) {\n\t\treturn new Event(name, { bubbles: true });\n\t};\n\ttry {\n\t\tnew Event('test');\n\t} catch (e) {\n\t\t// IE does not support `new Event()`\n\t\tcreateEvent = function createEvent(name) {\n\t\t\tvar evt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, false);\n\t\t\treturn evt;\n\t\t};\n\t}\n\n\tfunction assign(ta) {\n\t\tif (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;\n\n\t\tvar heightOffset = null;\n\t\tvar clientWidth = null;\n\t\tvar cachedHeight = null;\n\n\t\tfunction init() {\n\t\t\tvar style = window.getComputedStyle(ta, null);\n\n\t\t\tif (style.resize === 'vertical') {\n\t\t\t\tta.style.resize = 'none';\n\t\t\t} else if (style.resize === 'both') {\n\t\t\t\tta.style.resize = 'horizontal';\n\t\t\t}\n\n\t\t\tif (style.boxSizing === 'content-box') {\n\t\t\t\theightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n\t\t\t} else {\n\t\t\t\theightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n\t\t\t}\n\t\t\t// Fix when a textarea is not on document body and heightOffset is Not a Number\n\t\t\tif (isNaN(heightOffset)) {\n\t\t\t\theightOffset = 0;\n\t\t\t}\n\n\t\t\tupdate();\n\t\t}\n\n\t\tfunction changeOverflow(value) {\n\t\t\t{\n\t\t\t\t// Chrome/Safari-specific fix:\n\t\t\t\t// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space\n\t\t\t\t// made available by removing the scrollbar. The following forces the necessary text reflow.\n\t\t\t\tvar width = ta.style.width;\n\t\t\t\tta.style.width = '0px';\n\t\t\t\t// Force reflow:\n\t\t\t\t/* jshint ignore:start */\n\t\t\t\tta.offsetWidth;\n\t\t\t\t/* jshint ignore:end */\n\t\t\t\tta.style.width = width;\n\t\t\t}\n\n\t\t\tta.style.overflowY = value;\n\t\t}\n\n\t\tfunction getParentOverflows(el) {\n\t\t\tvar arr = [];\n\n\t\t\twhile (el && el.parentNode && el.parentNode instanceof Element) {\n\t\t\t\tif (el.parentNode.scrollTop) {\n\t\t\t\t\tarr.push({\n\t\t\t\t\t\tnode: el.parentNode,\n\t\t\t\t\t\tscrollTop: el.parentNode.scrollTop\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tel = el.parentNode;\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}\n\n\t\tfunction resize() {\n\t\t\tif (ta.scrollHeight === 0) {\n\t\t\t\t// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar overflows = getParentOverflows(ta);\n\t\t\tvar docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)\n\n\t\t\tta.style.height = '';\n\t\t\tta.style.height = ta.scrollHeight + heightOffset + 'px';\n\n\t\t\t// used to check if an update is actually necessary on window.resize\n\t\t\tclientWidth = ta.clientWidth;\n\n\t\t\t// prevents scroll-position jumping\n\t\t\toverflows.forEach(function (el) {\n\t\t\t\tel.node.scrollTop = el.scrollTop;\n\t\t\t});\n\n\t\t\tif (docTop) {\n\t\t\t\tdocument.documentElement.scrollTop = docTop;\n\t\t\t}\n\t\t}\n\n\t\tfunction update() {\n\t\t\tresize();\n\n\t\t\tvar styleHeight = Math.round(parseFloat(ta.style.height));\n\t\t\tvar computed = window.getComputedStyle(ta, null);\n\n\t\t\t// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box\n\t\t\tvar actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;\n\n\t\t\t// The actual height not matching the style height (set via the resize method) indicates that \n\t\t\t// the max-height has been exceeded, in which case the overflow should be allowed.\n\t\t\tif (actualHeight < styleHeight) {\n\t\t\t\tif (computed.overflowY === 'hidden') {\n\t\t\t\t\tchangeOverflow('scroll');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.\n\t\t\t\tif (computed.overflowY !== 'hidden') {\n\t\t\t\t\tchangeOverflow('hidden');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cachedHeight !== actualHeight) {\n\t\t\t\tcachedHeight = actualHeight;\n\t\t\t\tvar evt = createEvent('autosize:resized');\n\t\t\t\ttry {\n\t\t\t\t\tta.dispatchEvent(evt);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Firefox will throw an error on dispatchEvent for a detached element\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=889376\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar pageResize = function pageResize() {\n\t\t\tif (ta.clientWidth !== clientWidth) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t};\n\n\t\tvar destroy = function (style) {\n\t\t\twindow.removeEventListener('resize', pageResize, false);\n\t\t\tta.removeEventListener('input', update, false);\n\t\t\tta.removeEventListener('keyup', update, false);\n\t\t\tta.removeEventListener('autosize:destroy', destroy, false);\n\t\t\tta.removeEventListener('autosize:update', update, false);\n\n\t\t\tObject.keys(style).forEach(function (key) {\n\t\t\t\tta.style[key] = style[key];\n\t\t\t});\n\n\t\t\tmap.delete(ta);\n\t\t}.bind(ta, {\n\t\t\theight: ta.style.height,\n\t\t\tresize: ta.style.resize,\n\t\t\toverflowY: ta.style.overflowY,\n\t\t\toverflowX: ta.style.overflowX,\n\t\t\twordWrap: ta.style.wordWrap\n\t\t});\n\n\t\tta.addEventListener('autosize:destroy', destroy, false);\n\n\t\t// IE9 does not fire onpropertychange or oninput for deletions,\n\t\t// so binding to onkeyup to catch most of those events.\n\t\t// There is no way that I know of to detect something like 'cut' in IE9.\n\t\tif ('onpropertychange' in ta && 'oninput' in ta) {\n\t\t\tta.addEventListener('keyup', update, false);\n\t\t}\n\n\t\twindow.addEventListener('resize', pageResize, false);\n\t\tta.addEventListener('input', update, false);\n\t\tta.addEventListener('autosize:update', update, false);\n\t\tta.style.overflowX = 'hidden';\n\t\tta.style.wordWrap = 'break-word';\n\n\t\tmap.set(ta, {\n\t\t\tdestroy: destroy,\n\t\t\tupdate: update\n\t\t});\n\n\t\tinit();\n\t}\n\n\tfunction destroy(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.destroy();\n\t\t}\n\t}\n\n\tfunction update(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.update();\n\t\t}\n\t}\n\n\tvar autosize = null;\n\n\t// Do nothing in Node.js environment and IE8 (or lower)\n\tif (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {\n\t\tautosize = function autosize(el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\treturn el;\n\t\t};\n\t} else {\n\t\tautosize = function autosize(el, options) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], function (x) {\n\t\t\t\t\treturn assign(x, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], destroy);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], update);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t}\n\n\texports.default = autosize;\n\tmodule.exports = exports['default'];\n});","var GHOST_ELEMENT_ID = '__autosizeInputGhost'\n\nvar characterEntities = {\n ' ': 'nbsp',\n '<': 'lt',\n '>': 'gt'\n}\nfunction mapSpecialCharacterToCharacterEntity (specialCharacter) {\n return '&' + characterEntities[specialCharacter] + ';'\n}\nfunction escapeSpecialCharacters (string) {\n return string.replace(/\\s|<|>/g, mapSpecialCharacterToCharacterEntity)\n}\n\n// Create `ghostElement`, with inline styles to hide it and ensure that the text is all\n// on a single line.\nfunction createGhostElement () {\n var ghostElement = document.createElement('div')\n ghostElement.id = GHOST_ELEMENT_ID\n ghostElement.style.cssText =\n 'display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;'\n document.body.appendChild(ghostElement)\n return ghostElement\n}\n\nmodule.exports = function (element, options) {\n var elementStyle = window.getComputedStyle(element)\n // prettier-ignore\n var elementCssText = 'box-sizing:' + elementStyle.boxSizing +\n ';border-left:' + elementStyle.borderLeftWidth + ' solid red' +\n ';border-right:' + elementStyle.borderRightWidth + ' solid red' +\n ';font-family:' + elementStyle.fontFamily +\n ';font-feature-settings:' + elementStyle.fontFeatureSettings +\n ';font-kerning:' + elementStyle.fontKerning +\n ';font-size:' + elementStyle.fontSize +\n ';font-stretch:' + elementStyle.fontStretch +\n ';font-style:' + elementStyle.fontStyle +\n ';font-variant:' + elementStyle.fontVariant +\n ';font-variant-caps:' + elementStyle.fontVariantCaps +\n ';font-variant-ligatures:' + elementStyle.fontVariantLigatures +\n ';font-variant-numeric:' + elementStyle.fontVariantNumeric +\n ';font-weight:' + elementStyle.fontWeight +\n ';letter-spacing:' + elementStyle.letterSpacing +\n ';margin-left:' + elementStyle.marginLeft +\n ';margin-right:' + elementStyle.marginRight +\n ';padding-left:' + elementStyle.paddingLeft +\n ';padding-right:' + elementStyle.paddingRight +\n ';text-indent:' + elementStyle.textIndent +\n ';text-transform:' + elementStyle.textTransform\n\n // Assigns an appropriate width to the given `element` based on its contents.\n function setWidth () {\n var string = element.value || element.getAttribute('placeholder') || ''\n // Check if the `ghostElement` exists. If no, create it.\n var ghostElement =\n document.getElementById(GHOST_ELEMENT_ID) || createGhostElement()\n // Copy all width-affecting styles to the `ghostElement`.\n ghostElement.style.cssText += elementCssText\n ghostElement.innerHTML = escapeSpecialCharacters(string)\n // Copy the width of `ghostElement` to `element`.\n var width = window.getComputedStyle(ghostElement).width\n element.style.width = width\n return width\n }\n\n element.addEventListener('input', setWidth)\n\n var width = setWidth()\n\n // Set `min-width` only if `options.minWidth` was set, and only if the initial\n // width is non-zero.\n if (options && options.minWidth && width !== '0px') {\n element.style.minWidth = width\n }\n\n // Return a function for unbinding the event listener and removing the `ghostElement`.\n return function () {\n element.removeEventListener('input', setWidth)\n var ghostElement = document.getElementById(GHOST_ELEMENT_ID)\n if (ghostElement) {\n ghostElement.parentNode.removeChild(ghostElement)\n }\n }\n}\n","/*\n * BestInPlace (for jQuery)\n * version: 3.0.0.alpha (2014)\n *\n * By Bernat Farrero based on the work of Jan Varwig.\n * Examples at http://bernatfarrero.com\n *\n * Licensed under the MIT:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @requires jQuery\n *\n * Usage:\n *\n * Attention.\n * The format of the JSON object given to the select inputs is the following:\n * [[\"key\", \"value\"],[\"key\", \"value\"]]\n * The format of the JSON object given to the checkbox inputs is the following:\n * [\"falseValue\", \"trueValue\"]\n\n */\n//= require jquery.autosize\nimport autosize from \"autosize\";\nimport autosizeInput from \"autosize-input\";\n\n// app.js\nimport $ from 'jquery';\nvar jQuery = $;\n\nfunction BestInPlaceEditor(e) {\n 'use strict';\n this.element = e;\n this.initOptions();\n this.bindForm();\n this.initPlaceHolder();\n jQuery(this.activator).bind('click', {editor: this}, this.clickHandler);\n}\n\nBestInPlaceEditor.prototype = {\n // Public Interface Functions //////////////////////////////////////////////\n\n activate: function () {\n 'use strict';\n var to_display;\n if (this.isPlaceHolder()) {\n to_display = \"\";\n } else if (this.original_content) {\n to_display = this.original_content;\n } else {\n switch (this.formType) {\n case 'input':\n case 'textarea':\n if (this.display_raw) {\n to_display = this.element.html().replace(/&/gi, '&');\n }\n else {\n var value = this.element.data('bipValue');\n if (typeof value === 'undefined') {\n to_display = '';\n } else if (typeof value === 'string') {\n to_display = this.element.data('bipValue').replace(/&/gi, '&');\n } else {\n to_display = this.element.data('bipValue');\n }\n }\n break;\n case 'select':\n to_display = this.element.html();\n\n }\n }\n\n this.oldValue = this.isPlaceHolder() ? \"\" : this.element.html();\n this.display_value = to_display;\n jQuery(this.activator).unbind(\"click\", this.clickHandler);\n this.activateForm();\n this.element.trigger(jQuery.Event(\"best_in_place:activate\"));\n },\n\n abort: function () {\n 'use strict';\n this.activateText(this.oldValue);\n jQuery(this.activator).bind('click', {editor: this}, this.clickHandler);\n this.element.trigger(jQuery.Event(\"best_in_place:abort\"));\n this.element.trigger(jQuery.Event(\"best_in_place:deactivate\"));\n },\n\n abortIfConfirm: function () {\n 'use strict';\n if (!this.useConfirm) {\n this.abort();\n return;\n }\n\n if (confirm(BestInPlaceEditor.defaults.locales[''].confirmMessage)) {\n this.abort();\n }\n },\n\n update: function () {\n 'use strict';\n\n this.element.trigger(jQuery.Event(\"best_in_place:before-update\"));\n\n var editor = this,\n value = this.getValue();\n\n // Avoid request if no change is made\n if (this.formType in {\"input\": 1, \"textarea\": 1} && value === this.oldValue) {\n this.abort();\n return true;\n }\n\n editor.ajax({\n \"type\": this.requestMethod(),\n \"dataType\": BestInPlaceEditor.defaults.ajaxDataType,\n \"data\": editor.requestData(),\n \"success\": function (data, status, xhr) {\n editor.loadSuccessCallback(data, status, xhr);\n },\n \"error\": function (request, error) {\n editor.loadErrorCallback(request, error);\n }\n });\n\n\n switch (this.formType) {\n case \"select\":\n this.previousCollectionValue = value;\n\n // search for the text for the span\n $.each(this.values, function(index, arr){ if (String(arr[0]) === String(value)) editor.element.html(arr[1]); });\n break;\n\n case \"checkbox\":\n $.each(this.values, function(index, arr){ if (String(arr[0]) === String(value)) editor.element.html(arr[1]); });\n break;\n\n default:\n if (value !== \"\") {\n if (this.display_raw) {\n editor.element.html(value);\n } else {\n editor.element.text(value);\n }\n } else {\n editor.element.html(this.placeHolder);\n }\n }\n\n editor.element.data('bipValue', value);\n editor.element.attr('data-bip-value', value);\n\n editor.element.trigger(jQuery.Event(\"best_in_place:update\"));\n },\n\n activateForm: function () {\n 'use strict';\n alert(BestInPlaceEditor.defaults.locales[''].uninitializedForm);\n },\n\n activateText: function (value) {\n 'use strict';\n this.element.html(value);\n if (this.isPlaceHolder()) {\n this.element.html(this.placeHolder);\n }\n },\n\n // Helper Functions ////////////////////////////////////////////////////////\n\n initOptions: function () {\n // Try parent supplied info\n 'use strict';\n var self = this;\n self.element.parents().each(function () {\n var $parent = jQuery(this);\n self.url = self.url || $parent.data(\"bipUrl\");\n self.activator = self.activator || $parent.data(\"bipActivator\");\n self.okButton = self.okButton || $parent.data(\"bipOkButton\");\n self.okButtonClass = self.okButtonClass || $parent.data(\"bipOkButtonClass\");\n self.cancelButton = self.cancelButton || $parent.data(\"bipCancelButton\");\n self.cancelButtonClass = self.cancelButtonClass || $parent.data(\"bipCancelButtonClass\");\n self.skipBlur = self.skipBlur || $parent.data(\"bipSkipBlur\");\n });\n\n // Load own attributes (overrides all others)\n self.url = self.element.data(\"bipUrl\") || self.url || document.location.pathname;\n self.collection = self.element.data(\"bipCollection\") || self.collection;\n self.formType = self.element.data(\"bipType\") || \"input\";\n self.objectName = self.element.data(\"bipObject\") || self.objectName;\n self.attributeName = self.element.data(\"bipAttribute\") || self.attributeName;\n self.activator = self.element.data(\"bipActivator\") || self.element;\n self.okButton = self.element.data(\"bipOkButton\") || self.okButton;\n self.okButtonClass = self.element.data(\"bipOkButtonClass\") || self.okButtonClass || BestInPlaceEditor.defaults.okButtonClass;\n self.cancelButton = self.element.data(\"bipCancelButton\") || self.cancelButton;\n self.cancelButtonClass = self.element.data(\"bipCancelButtonClass\") || self.cancelButtonClass || BestInPlaceEditor.defaults.cancelButtonClass;\n self.skipBlur = self.element.data(\"bipSkipBlur\") || self.skipBlur || BestInPlaceEditor.defaults.skipBlur;\n self.isNewObject = self.element.data(\"bipNewObject\");\n self.dataExtraPayload = self.element.data(\"bipExtraPayload\");\n\n // Fix for default values of 0\n if (self.element.data(\"bipPlaceholder\") == null) {\n self.placeHolder = BestInPlaceEditor.defaults.locales[''].placeHolder;\n } else {\n self.placeHolder = self.element.data(\"bipPlaceholder\");\n }\n\n self.inner_class = self.element.data(\"bipInnerClass\");\n self.html_attrs = self.element.data(\"bipHtmlAttrs\");\n self.original_content = self.element.data(\"bipOriginalContent\") || self.original_content;\n\n // if set the input won't be satinized\n self.display_raw = self.element.data(\"bip-raw\");\n\n self.useConfirm = self.element.data(\"bip-confirm\");\n\n if (self.formType === \"select\" || self.formType === \"checkbox\") {\n self.values = self.collection;\n self.collectionValue = self.element.data(\"bipValue\") || self.collectionValue;\n }\n },\n\n bindForm: function () {\n 'use strict';\n this.activateForm = BestInPlaceEditor.forms[this.formType].activateForm;\n this.getValue = BestInPlaceEditor.forms[this.formType].getValue;\n },\n\n\n initPlaceHolder: function () {\n 'use strict';\n // TODO add placeholder for select and checkbox\n if (this.element.html() === \"\") {\n this.element.addClass('bip-placeholder');\n this.element.html(this.placeHolder);\n }\n },\n\n isPlaceHolder: function () {\n 'use strict';\n // TODO: It only work when form is deactivated.\n // Condition will fail when form is activated\n return this.element.html() === \"\" || this.element.html() === this.placeHolder;\n },\n\n getValue: function () {\n 'use strict';\n alert(BestInPlaceEditor.defaults.locales[''].uninitializedForm);\n },\n\n // Trim and Strips HTML from text\n sanitizeValue: function (s) {\n 'use strict';\n return jQuery.trim(s);\n },\n\n requestMethod: function() {\n 'use strict';\n return this.isNewObject ? 'post' : BestInPlaceEditor.defaults.ajaxMethod;\n },\n\n /* Generate the data sent in the POST request */\n requestData: function () {\n 'use strict';\n // To prevent xss attacks, a csrf token must be defined as a meta attribute\n var csrf_token = jQuery('meta[name=csrf-token]').attr('content'),\n csrf_param = jQuery('meta[name=csrf-param]').attr('content');\n\n var data = {}\n data['_method'] = this.requestMethod()\n\n data[this.objectName] = this.dataExtraPayload || {}\n\n data[this.objectName][this.attributeName] = this.getValue()\n\n if (csrf_param !== undefined && csrf_token !== undefined) {\n data[csrf_param] = csrf_token\n }\n return jQuery.param(data);\n },\n\n ajax: function (options) {\n 'use strict';\n options.url = this.url;\n options.beforeSend = function (xhr) {\n xhr.setRequestHeader(\"Accept\", \"application/json\");\n };\n return jQuery.ajax(options);\n },\n\n // Handlers ////////////////////////////////////////////////////////////////\n\n loadSuccessCallback: function (data, status, xhr) {\n 'use strict';\n data = jQuery.trim(data);\n //Update original content with current text.\n if (this.display_raw) {\n this.original_content = this.element.html();\n } else {\n this.original_content = this.element.text();\n }\n\n if (data && data !== \"\") {\n var response = jQuery.parseJSON(data);\n if (response !== null && response.hasOwnProperty(\"display_as\")) {\n this.element.data('bip-original-content', this.element.text());\n this.element.html(response.display_as);\n }\n if (this.isNewObject && response && response[this.objectName]) {\n if (response[this.objectName][\"id\"]) {\n this.isNewObject = false\n this.url += \"/\" + response[this.objectName][\"id\"] // in REST a POST /thing url should become PUT /thing/123\n }\n }\n }\n this.element.toggleClass('bip-placeholder', this.isPlaceHolder());\n\n this.element.trigger(jQuery.Event(\"best_in_place:success\"), [data, status, xhr]);\n this.element.trigger(jQuery.Event(\"ajax:success\"), [data, status, xhr]);\n\n // Binding back after being clicked\n jQuery(this.activator).bind('click', {editor: this}, this.clickHandler);\n this.element.trigger(jQuery.Event(\"best_in_place:deactivate\"));\n\n if (this.collectionValue !== null && this.formType === \"select\") {\n this.collectionValue = this.previousCollectionValue;\n this.previousCollectionValue = null;\n }\n },\n\n loadErrorCallback: function (request, error) {\n 'use strict';\n this.activateText(this.oldValue);\n\n this.element.trigger(jQuery.Event(\"best_in_place:error\"), [request, error]);\n this.element.trigger(jQuery.Event(\"ajax:error\"), request, error);\n\n // Binding back after being clicked\n jQuery(this.activator).bind('click', {editor: this}, this.clickHandler);\n this.element.trigger(jQuery.Event(\"best_in_place:deactivate\"));\n },\n\n clickHandler: function (event) {\n 'use strict';\n event.preventDefault();\n event.data.editor.activate();\n },\n\n setHtmlAttributes: function () {\n 'use strict';\n var formField = this.element.find(this.formType);\n\n if (this.html_attrs) {\n var attrs = this.html_attrs;\n $.each(attrs, function (key, val) {\n formField.attr(key, val);\n });\n }\n },\n\n placeButtons: function (output, field) {\n 'use strict';\n if (field.okButton) {\n output.append(\n jQuery(document.createElement('input'))\n .attr('type', 'submit')\n .attr('class', field.okButtonClass)\n .attr('value', field.okButton)\n );\n }\n if (field.cancelButton) {\n output.append(\n jQuery(document.createElement('input'))\n .attr('type', 'button')\n .attr('class', field.cancelButtonClass)\n .attr('value', field.cancelButton)\n );\n }\n }\n};\n\n\n// Button cases:\n// If no buttons, then blur saves, ESC cancels\n// If just Cancel button, then blur saves, ESC or clicking Cancel cancels (careful of blur event!)\n// If just OK button, then clicking OK saves (careful of blur event!), ESC or blur cancels\n// If both buttons, then clicking OK saves, ESC or clicking Cancel or blur cancels\nBestInPlaceEditor.forms = {\n \"input\": {\n activateForm: function () {\n 'use strict';\n var output = jQuery(document.createElement('form'))\n .addClass('form_in_place')\n .attr('action', 'javascript:void(0);')\n\t .attr('data-turbo', 'false')\n .attr('style', 'display:inline');\n var input_elt = jQuery(document.createElement('input'))\n .attr('type', 'text')\n .attr('name', this.attributeName)\n .val(this.display_value);\n\n // Add class to form input\n if (this.inner_class) {\n input_elt.addClass(this.inner_class);\n }\n\n output.append(input_elt);\n this.placeButtons(output, this);\n\n this.element.html(output);\n this.setHtmlAttributes();\n\n autosizeInput(this.element.find(\"input[type='text']\")[0]);\n this.element.find(\"input[type='text']\")[0].select();\n this.element.find(\"form\").bind('submit', {editor: this}, BestInPlaceEditor.forms.input.submitHandler);\n\n if (this.cancelButton) {\n this.element.find(\"input[type='button']\").bind('click', {editor: this}, BestInPlaceEditor.forms.input.cancelButtonHandler);\n }\n if (!this.okButton) {\n this.element.find(\"input[type='text']\").bind('blur', {editor: this}, BestInPlaceEditor.forms.input.inputBlurHandler);\n }\n this.element.find(\"input[type='text']\").bind('keyup', {editor: this}, BestInPlaceEditor.forms.input.keyupHandler);\n this.blurTimer = null;\n this.userClicked = false;\n },\n\n getValue: function () {\n 'use strict';\n return this.sanitizeValue(this.element.find(\"input\").val());\n },\n\n // When buttons are present, use a timer on the blur event to give precedence to clicks\n inputBlurHandler: function (event) {\n 'use strict';\n if (event.data.editor.okButton) {\n event.data.editor.blurTimer = setTimeout(function () {\n if (!event.data.editor.userClicked) {\n event.data.editor.abort();\n }\n }, 500);\n } else {\n if (event.data.editor.cancelButton) {\n event.data.editor.blurTimer = setTimeout(function () {\n if (!event.data.editor.userClicked) {\n event.data.editor.update();\n }\n }, 500);\n } else {\n event.data.editor.update();\n }\n }\n },\n\n submitHandler: function (event) {\n 'use strict';\n event.data.editor.userClicked = true;\n clearTimeout(event.data.editor.blurTimer);\n event.data.editor.update();\n },\n\n cancelButtonHandler: function (event) {\n 'use strict';\n event.data.editor.userClicked = true;\n clearTimeout(event.data.editor.blurTimer);\n event.data.editor.abort();\n event.stopPropagation(); // Without this, click isn't handled\n },\n\n keyupHandler: function (event) {\n 'use strict';\n if (event.keyCode === 27) {\n event.data.editor.abort();\n event.stopImmediatePropagation();\n }\n }\n },\n\n \"select\": {\n activateForm: function () {\n 'use strict';\n var output = jQuery(document.createElement('form'))\n .attr('action', 'javascript:void(0)')\n \t .attr('data-turbo', 'false')\n .attr('style', 'display:inline'),\n selected = '',\n select_elt = jQuery(document.createElement('select'))\n .attr('class', this.inner_class !== null ? this.inner_class : ''),\n currentCollectionValue = this.collectionValue,\n key, value,\n a = this.values;\n\n $.each(a, function(index, arr){\n key = arr[0];\n value = arr[1];\n var option_elt = jQuery(document.createElement('option'))\n .val(key)\n .html(value);\n\n if (currentCollectionValue) {\n if (String(key) === String(currentCollectionValue)) option_elt.attr('selected', 'selected');\n }\n select_elt.append(option_elt);\n });\n output.append(select_elt);\n\n this.element.html(output);\n this.setHtmlAttributes();\n this.element.find(\"select\").bind('change', {editor: this}, BestInPlaceEditor.forms.select.blurHandler);\n this.element.find(\"select\").bind('blur', {editor: this}, BestInPlaceEditor.forms.select.blurHandler);\n this.element.find(\"select\").bind('keyup', {editor: this}, BestInPlaceEditor.forms.select.keyupHandler);\n this.element.find(\"select\")[0].focus();\n\n // automatically click on the select so you\n // don't have to click twice\n try {\n var e = document.createEvent(\"MouseEvents\");\n e.initMouseEvent(\"mousedown\", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.element.find(\"select\")[0].dispatchEvent(e);\n }\n catch(e) {\n // browser doesn't support this, e.g. IE8\n }\n },\n\n getValue: function () {\n 'use strict';\n return this.sanitizeValue(this.element.find(\"select\").val());\n },\n\n blurHandler: function (event) {\n 'use strict';\n event.data.editor.update();\n },\n\n keyupHandler: function (event) {\n 'use strict';\n if (event.keyCode === 27) {\n event.data.editor.abort();\n }\n }\n },\n\n \"checkbox\": {\n activateForm: function () {\n 'use strict';\n this.collectionValue = !this.getValue();\n this.setHtmlAttributes();\n this.update();\n },\n\n getValue: function () {\n 'use strict';\n return this.collectionValue;\n }\n },\n\n \"textarea\": {\n activateForm: function () {\n 'use strict';\n // grab width and height of text\n var width = this.element.css('width');\n var height = this.element.css('height');\n\n // construct form\n var output = jQuery(document.createElement('form'))\n .addClass('form_in_place')\n \t\t .attr('data-turbo', 'false')\n .attr('action', 'javascript:void(0);')\n .attr('style', 'display:inline');\n var textarea_elt = jQuery(document.createElement('textarea'))\n .attr('name', this.attributeName)\n .val(this.sanitizeValue(this.display_value));\n\n if (this.inner_class !== null) {\n textarea_elt.addClass(this.inner_class);\n }\n\n output.append(textarea_elt);\n\n this.placeButtons(output, this);\n\n this.element.html(output);\n this.setHtmlAttributes();\n\n // set width and height of textarea\n jQuery(this.element.find(\"textarea\")[0]).css({'min-width': width, 'min-height': height});\n // jQuery(this.element.find(\"textarea\")[0]).autosize();\n\n\t // autosize(textarea_elt); // this.element.find(\"textarea\")[0]);\n\t // autosize(textarea_elt);\n\n this.element.find(\"textarea\")[0].focus();\n this.element.find(\"form\").bind('submit', {editor: this}, BestInPlaceEditor.forms.textarea.submitHandler);\n\n if (this.cancelButton) {\n this.element.find(\"input[type='button']\").bind('click', {editor: this}, BestInPlaceEditor.forms.textarea.cancelButtonHandler);\n }\n\n if (!this.skipBlur) {\n this.element.find(\"textarea\").bind('blur', {editor: this}, BestInPlaceEditor.forms.textarea.blurHandler);\n }\n this.element.find(\"textarea\").bind('keyup', {editor: this}, BestInPlaceEditor.forms.textarea.keyupHandler);\n this.blurTimer = null;\n this.userClicked = false;\n },\n\n getValue: function () {\n 'use strict';\n return this.sanitizeValue(this.element.find(\"textarea\").val());\n },\n\n // When buttons are present, use a timer on the blur event to give precedence to clicks\n blurHandler: function (event) {\n 'use strict';\n if (event.data.editor.okButton) {\n event.data.editor.blurTimer = setTimeout(function () {\n if (!event.data.editor.userClicked) {\n event.data.editor.abortIfConfirm();\n }\n }, 500);\n } else {\n if (event.data.editor.cancelButton) {\n event.data.editor.blurTimer = setTimeout(function () {\n if (!event.data.editor.userClicked) {\n event.data.editor.update();\n }\n }, 500);\n } else {\n event.data.editor.update();\n }\n }\n },\n\n submitHandler: function (event) {\n 'use strict';\n event.data.editor.userClicked = true;\n clearTimeout(event.data.editor.blurTimer);\n event.data.editor.update();\n },\n\n cancelButtonHandler: function (event) {\n 'use strict';\n event.data.editor.userClicked = true;\n clearTimeout(event.data.editor.blurTimer);\n event.data.editor.abortIfConfirm();\n event.stopPropagation(); // Without this, click isn't handled\n },\n\n keyupHandler: function (event) {\n 'use strict';\n if (event.keyCode === 27) {\n event.data.editor.abortIfConfirm();\n }\n }\n }\n};\n\nBestInPlaceEditor.defaults = {\n locales: {},\n ajaxMethod: \"put\", //TODO Change to patch when support to 3.2 is dropped\n ajaxDataType: 'text',\n okButtonClass: '',\n cancelButtonClass: '',\n skipBlur: false\n};\n\n// Default locale\nBestInPlaceEditor.defaults.locales[''] = {\n confirmMessage: \"Are you sure you want to discard your changes?\",\n uninitializedForm: \"The form was not properly initialized. getValue is unbound\",\n placeHolder: '-'\n};\n\njQuery.fn.best_in_place = function () {\n 'use strict';\n function setBestInPlace(element) {\n if (!element.data('bestInPlaceEditor')) {\n element.data('bestInPlaceEditor', new BestInPlaceEditor(element));\n return true;\n }\n }\n\n jQuery(this.context).delegate(this.selector, 'click', function () {\n var el = jQuery(this);\n if (setBestInPlace(el)) {\n el.click();\n }\n });\n\n this.each(function () {\n setBestInPlace(jQuery(this));\n });\n\n return this;\n};\n"],"names":["global","factory","module","exports","this","map","keys","values","key","value","index","createEvent","name","evt","assign","ta","heightOffset","clientWidth","cachedHeight","init","style","update","changeOverflow","width","getParentOverflows","el","arr","resize","overflows","docTop","styleHeight","computed","actualHeight","pageResize","destroy","methods","autosize","options","x","GHOST_ELEMENT_ID","characterEntities","mapSpecialCharacterToCharacterEntity","specialCharacter","escapeSpecialCharacters","string","createGhostElement","ghostElement","autosizeInput","element","elementStyle","elementCssText","setWidth","jQuery","$","BestInPlaceEditor","e","to_display","editor","data","status","xhr","request","error","self","$parent","s","csrf_token","csrf_param","response","event","formField","attrs","val","output","field","input_elt","select_elt","currentCollectionValue","a","option_elt","height","textarea_elt","setBestInPlace"],"mappings":";;;;kBAKC,SAAUA,EAAQC,EAAS,CAI1BA,EAAQC,EAAQC,CAAO,CAQzB,GAAGC,EAAM,SAAUF,EAAQC,EAAS,CAGnC,IAAIE,EAAM,OAAO,KAAQ,WAAa,IAAI,IAAQ,UAAY,CAC7D,IAAIC,EAAO,CAAA,EACPC,EAAS,CAAA,EAEb,MAAO,CACN,IAAK,SAAaC,EAAK,CACtB,OAAOF,EAAK,QAAQE,CAAG,EAAI,EAC3B,EACD,IAAK,SAAaA,EAAK,CACtB,OAAOD,EAAOD,EAAK,QAAQE,CAAG,CAAC,CAC/B,EACD,IAAK,SAAaA,EAAKC,EAAO,CACzBH,EAAK,QAAQE,CAAG,IAAM,KACzBF,EAAK,KAAKE,CAAG,EACbD,EAAO,KAAKE,CAAK,EAElB,EACD,OAAQ,SAAiBD,EAAK,CAC7B,IAAIE,EAAQJ,EAAK,QAAQE,CAAG,EACxBE,EAAQ,KACXJ,EAAK,OAAOI,EAAO,CAAC,EACpBH,EAAO,OAAOG,EAAO,CAAC,EAEvB,CACJ,CACA,IAEKC,EAAc,SAAqBC,EAAM,CAC5C,OAAO,IAAI,MAAMA,EAAM,CAAE,QAAS,EAAM,CAAA,CAC1C,EACC,GAAI,CACH,IAAI,MAAM,MAAM,CAChB,MAAW,CAEXD,EAAc,SAAqBC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