]+)/)[1]
+
+ var table= "
"
+ e.outerHTML = table
+ },
+
+ makeHtmlEditor: function(textarea) {
+ // do nothing - plugins can overwrite this method
+ }
+
+
+}
+
+Element.findContaining = function(el, tag) {
+ el = $(el)
+ tag = tag.toLowerCase()
+ e = el.parentNode
+ while (el) {
+ if (el.nodeName.toLowerCase() == tag) {
+ return el;
+ }
+ e = el.parentNode
+ }
+ return null;
+}
+
+Element.Methods.childWithClass = function(el, klass) {
+ var ret=null;
+ el.childElements().each(function(el2) {
+ if(ret==null && el2.hasClassName(klass)) ret=el2;
+ });
+ return ret;
+}
+
+// Add an afterEnterEditMode hook to in-place-editor
+origEnterEditMode = Ajax.InPlaceEditor.prototype.enterEditMode
+Ajax.InPlaceEditor.prototype.enterEditMode = function(evt) {
+ origEnterEditMode.bind(this)(evt)
+ if (this.afterEnterEditMode) this.afterEnterEditMode()
+ return false
+}
+
+// Fix Safari in-place-editor bug
+Ajax.InPlaceEditor.prototype.removeForm = function() {
+ if (!this._form) return;
+
+ if (this._form.parentNode) { try { Element.remove(this._form); } catch (e) {}}
+ this._form = null;
+ this._controls = { };
+}
+
+// Silence errors from IE :-(
+Field.scrollFreeActivate = function(field) {
+ setTimeout(function() {
+ try {
+ Field.activate(field);
+ } catch(e) {}
+ }, 1);
+}
+
+
+Element.Methods.$$ = function(e, css) {
+ return new Selector(css).findElements(e)
+}
+
+
+HoboBehavior = Class.create({
+
+ initialize: function(mainSelector, features) {
+ this.mainSelector = mainSelector
+ this.features = features
+ this.addEvents(mainSelector, features.events)
+ if (features.initialize) {
+ document.observe("dom:loaded", features.initialize);
+ }
+ },
+
+ addEvents: function(parentSelector, events) {
+ var self = this
+
+ for (selector in events) {
+ fullSelector = parentSelector + ' ' + selector
+ var rhs = events[selector]
+ if (Object.isString(rhs)) {
+ this.addBehavior(fullSelector, this.features[rhs])
+ } else {
+ this.addEvents(fullSelector, rhs)
+ }
+ }
+
+ },
+
+ addBehavior: function(selector, handler) {
+ var self = this
+ behavior = {}
+ behavior[selector] = function(ev) {
+ self.features.element = this.up(self.mainSelector)
+ handler.call(self.features, ev, this)
+ }
+ Event.addBehavior(behavior)
+ }
+
+})
+
+
+HoboInputMany = {
+
+ events: {
+ "> li > div.buttons": {
+ ".add-item:click": 'addOne',
+ ".remove-item:click": 'removeOne'
+ }
+ },
+
+ initialize: function(ev) {
+ /* the second clause should be sufficient, but it isn't in IE7. See bug 603 */
+ Element.select(ev.target, ".input-many-template input:hidden, .input-many-template select:hidden, .input-many-template textarea:hidden, .input-many-template button:hidden").each(function(input) {
+ if(!input.disabled) {
+ input.disabled = true;
+ input.addClassName("input_many_template_input");
+ }
+ });
+
+ // disable all elements inside our template, and mark them so we can find them later.
+ Element.select(ev.target, ".input-many-template input:enabled, .input-many-template select:enabled, .input-many-template textarea:enabled, .input-many-template button:enabled").each(function(input) {
+ input.disabled = true;
+ input.addClassName("input_many_template_input");
+ });
+
+ Element.select(ev.target, ".sortable-input-many").each(function(el) {
+ HoboInputMany.createSortable.call(el);
+ });
+
+ /* need to reinitialize after every change */
+ Event.addBehavior({".sortable-input-many:rapid:change": function(ev) {
+ HoboInputMany.createSortable.call(this);
+ }});
+
+ document.observe("rapid:partupdated", HoboInputMany.initialize);
+ },
+
+ createSortable: function() {
+ Sortable.create(this.id, {
+ constraint: 'vertical',
+ handle: 'ordering-handle',
+ overlap: 'vertical',
+ scroll: 'window',
+ onUpdate: function(list) {
+ HoboInputMany.fixIndices.call(list);
+ }
+ });
+ },
+
+ // given this==the input-many, returns a lambda that updates the name & id for an element
+ getNameUpdater: function(new_index) {
+ var name_prefix = Hobo.getClassData(this, 'input-many-prefix');
+ var id_prefix = name_prefix.replace(/\[/g, "_").replace(/\]/g, "");
+ var name_re = RegExp("^" + RegExp.escape(name_prefix)+ "\[\-?[0-9]+\]");
+ var name_sub = name_prefix + '[' + new_index.toString() + ']';
+ var id_re = RegExp("^" + RegExp.escape(id_prefix)+ "_\-?[0-9]+");
+ var id_sub = id_prefix + '_' + new_index.toString();
+ var class_re = RegExp(RegExp.escape(name_prefix)+ "\[\-?[0-9]+\]");
+ var class_sub = name_sub;
+
+ return function() {
+ if(this.name) {
+ this.name = this.name.replace(name_re, name_sub);
+ }
+ if (id_prefix==this.id.slice(0, id_prefix.length)) {
+ this.id = this.id.replace(id_re, id_sub);
+ } else {
+ // silly rails. text_area_tag and text_field_tag use different conventions for the id.
+ if(name_prefix==this.id.slice(0, name_prefix.length)) {
+ this.id = this.id.replace(name_re, name_sub);
+ } /* else {
+ hjq.util.log("hjq.input_many.update_id: id_prefix "+id_prefix+" didn't match input "+this.id);
+ } */
+ }
+ if (class_re.test(this.className)) {
+ this.className = this.className.replace(class_re, class_sub);
+ }
+ return this;
+ };
+ },
+
+ // given this==an input-many item, get the submit index
+ getIndex: function() {
+ return Number(this.id.match(/_([-0-9]+)$/)[1]);
+ },
+
+ /* For some reason, select() and down() and all those useful functions aren't working for us. Roll our own replacement.
+
+ this: element to recurse on.
+ klass: class to filter on
+ f: function to invoke
+ */
+ recurse_elements_with_class: function(klass,f ) {
+ if(klass==null || this.hasClassName(klass)) {
+ f(this);
+ }
+ this.childElements().each(function(el2) {HoboInputMany.recurse_elements_with_class.call(el2, klass, f);});
+ },
+
+/* fixes the indices on an input-many so they're in order. */
+ fixIndices: function() {
+ var lis = this.immediateDescendants();
+ var minimum = parseInt(Hobo.getClassData(this, 'minimum'));
+ /* first two lis are hidden/disabled on an input-many */
+ for(var i=0; i
=0 && ul.immediateDescendants().length>2) {
+ /* if(console) console.log("IE7 messed up again (bug 605)"); */
+ return;
+ }
+
+ var template = ul.down("li.input-many-template");
+ var clone = $(template.cloneNode(true));
+ clone.removeClassName("input-many-template");
+ // length-2 because ignore the template li and the empty li
+ var name_updater = this.getNameUpdater.call(ul, ul.childElements().length-2);
+
+ function reenable_inputs(el) {
+ if(el.hasClassName("input_many_template_input")) {
+ el.disabled = false;
+ el.removeClassName("input_many_template_input");
+ }
+ el.childElements().each(function(el2) {
+ if(!el2.hasClassName("input-many-template")) reenable_inputs(el2);
+ });
+ }
+ reenable_inputs(clone);
+
+ // update id & name
+ HoboInputMany.recurse_elements_with_class.call(clone, null, function(el) {
+ name_updater.call(el);
+ });
+
+ // do the add with anim
+ clone.setStyle("display", "none")
+ li.insert({after: clone});
+ new Effect.BlindDown(clone, {duration: 0.3, afterFinish: function(ef) {
+ Event.addBehavior.reload();
+
+ ul.fire("rapid:add", { element: clone });
+ ul.fire("rapid:change", { element: clone });
+ }});
+
+ // visibility
+ if(li.hasClassName("empty")) {
+ li.addClassName("hidden");
+ li.childWithClass("empty-input").disabled = true;
+ } else {
+ // now that we've added an element after us, we should only have a '-' button
+ li.childWithClass("buttons").childWithClass("remove-item").removeClassName("hidden");
+ li.childWithClass("buttons").childWithClass("add-item").addClassName("hidden");
+ }
+
+ return;
+ },
+
+ removeOne: function(ev, el) {
+ Event.stop(ev);
+ var that = this;
+ var ul = el.up('ul.input-many'), li = el.up('li.input-many-li')
+ var minimum = parseInt(Hobo.getClassData(ul, 'minimum'));
+
+ if(li.id.search(/_-1$/)>=0) {
+ /* if(console) console.log("IE7 messed up again (bug 605)"); */
+ return;
+ }
+
+ if(ul.fire("rapid:remove", { element: li }).stopped) return;
+
+ // rename everybody from me onwards
+ var i=this.getIndex.call(li)
+ var n=li.next();
+ for(; n; i+=1, n=n.next()) {
+ var name_updater = this.getNameUpdater.call(ul, i);
+ HoboInputMany.recurse_elements_with_class.call(n, null, function(el) {name_updater.call(el);});
+ }
+
+ // adjust +/- buttons on the button element as appropriate
+ var last=ul.childElements()[ul.childElements().length-1];
+ if(last==li) {
+ last = last.previous();
+ }
+
+ if(last.hasClassName("empty")) {
+ last.removeClassName("hidden");
+ HoboInputMany.recurse_elements_with_class.call(last, "empty-input", function(el) {el.disabled=false;});
+ } else {
+ // if we've reached the minimum, we don't want to add the '-' button
+ if(ul.childElements().length-3 <= minimum||0) {
+ last.childWithClass("buttons").childWithClass("remove-item").addClassName("hidden");
+ } else {
+ last.childWithClass("buttons").childWithClass("remove-item").removeClassName("hidden");
+ }
+ last.childWithClass("buttons").childWithClass("add-item").removeClassName("hidden");
+ }
+
+ new Effect.BlindUp(li, { duration: 0.3, afterFinish: function (ef) {
+ ul.fire("rapid:change")
+ li.remove()
+ } });
+
+ }
+
+
+
+}
+
+new HoboBehavior("ul.input-many", HoboInputMany);
+
+
+SelectManyInput = Behavior.create({
+
+ initialize : function() {
+ // onchange doesn't bubble in IE6 so...
+ Event.observe(this.element.down('select'), 'change', this.addOne.bind(this))
+ },
+
+ addOne : function() {
+ var select = this.element.down('select')
+ var selected = select.options[select.selectedIndex]
+ if ($F(select) != "") {
+ var newItem = $(DOM.Builder.fromHTML(this.element.down('.item-proto').innerHTML.strip()))
+ this.element.down('.items').appendChild(newItem);
+ newItem.down('span').innerHTML = selected.innerHTML
+ this.itemAdded(newItem, selected)
+ var optgroup = new Element("optgroup", {alt:selected.value, label:selected.text})
+ optgroup.addClassName("disabled-option")
+ selected.replace(optgroup)
+ select.value = ""
+ Event.addBehavior.reload()
+ this.element.fire("rapid:add", { element: newItem })
+ this.element.fire("rapid:change", { element: newItem })
+ }
+ },
+
+ onclick : function(ev) {
+ var el = Event.element(ev);
+ if (el.match(".remove-item")) { this.removeOne(el.parentNode) }
+ },
+
+ removeOne : function(el) {
+ var element = this.element
+ new Effect.BlindUp(el,
+ { duration: 0.3,
+ afterFinish: function (ef) {
+ ef.element.remove()
+ element.fire("rapid:remove", { element: el })
+ element.fire("rapid:change", { element: el })
+ } } )
+ var label = el.down('span').innerHTML
+ var optgroup = element.down("optgroup[label="+label+"]")
+ var option = new Element("option", {value:optgroup.readAttribute("alt")})
+ option.innerHTML = optgroup.readAttribute("label")
+ optgroup.replace(option)
+ },
+
+ itemAdded: function(item, option) {
+ this.hiddenField(item).value = option.value
+ },
+
+ hiddenField: function(item) {
+ return item.down('input[type=hidden]')
+ //return item.getElementsByClassName("hidden-field")[0]
+ }
+
+
+})
+
+NameManyInput = Object.extend(SelectManyInput, {
+ addOne : function() {
+ var select = this.element.down('select')
+ var selected = select.options[select.selectedIndex]
+ if (selected.value != "") {
+ var newItem = $(DOM.Builder.fromHTML(this.element.down('.item-proto').innerHTML.strip()))
+ this.element.down('.items').appendChild(newItem);
+ newItem.down('span').innerHTML = selected.innerHTML
+ this.itemAdded(newItem, selected)
+ selected.disabled = true
+ select.value = ""
+ Event.addBehavior.reload()
+ }
+ }
+})
+
+
+AutocompleteBehavior = Behavior.create({
+ initialize : function() {
+ this.minChars = parseInt(Hobo.getClassData(this.element, "min-chars"));
+ var match = this.element.className.match(/complete-on::([\S]+)/)
+ var target = match[1].split('::')
+ var typedId = target[0]
+ var completer = target[1]
+
+ var spec = Hobo.parseModelSpec(typedId)
+ var url = urlBase + "/" + Hobo.pluralise(spec.name) + "/complete_" + completer
+ var parameters = spec.id ? "id=" + spec.id : ""
+ this.autocompleter = new Ajax.Autocompleter(this.element,
+ this.element.next('.completions-popup'),
+ url,
+ {paramName:'query', method:'get', parameters: parameters, minChars: this.minChars,
+ afterUpdateElement: this.afterUpdateElement});
+ },
+
+ onfocus: function() {
+ if(this.element.hasClassName("nil-value")) {
+ this.element.value = '';
+ this.element.removeClassName("nil-value");
+ }
+ if(this.minChars==0) {
+ this.autocompleter.activate();
+ }
+ },
+
+ afterUpdateElement: function(input, li) {
+ input.fire("rapid:autocomplete-assigned");
+ }
+
+})
+
+
+
+Event.addBehavior.reassignAfterAjax = true;
+Event.addBehavior({
+
+ 'div.section-group' : function() {
+ if (Prototype.Browser.IE) Hobo.fixSectionGroup(this);
+ },
+
+ 'div.select-many.input' : SelectManyInput(),
+
+ 'textarea.html' : function() {
+ Hobo.makeHtmlEditor(this)
+ },
+
+ 'form.filter-menu select:change': function(event) {
+ var paramName = this.getAttribute('name')
+ var params = {}
+ var remove = [ 'page' ]
+ if ($F(this) == '') {
+ remove.push(paramName)
+ } else {
+ params[paramName] = $F(this)
+ }
+ location.href = Hobo.addUrlParams(params, {remove: remove})
+ },
+
+ '.autocompleter' : AutocompleteBehavior(),
+
+ '.string.in-place-edit, .datetime.in-place-edit, .date.in-place-edit, .integer.in-place-edit, .float.in-place-edit, .decimal.in-place-edit' :
+ function (ev) {
+
+ var ipe = Hobo._makeInPlaceEditor(this)
+ ipe.getText = function() {
+ return this.element.innerHTML.gsub(/
/, "\n").unescapeHTML()
+ }
+ },
+
+ '.text.in-place-edit, .markdown.in-place-edit, .textile.in-place-edit' : function (ev) {
+ var ipe = Hobo._makeInPlaceEditor(this, {rows: 2})
+ ipe.getText = function() {
+ return this.element.innerHTML.gsub(/
/, "\n").unescapeHTML()
+ }
+ },
+
+ ".html.in-place-edit" : function (ev) {
+ if (Hobo.makeInPlaceHtmlEditor) {
+ Hobo.makeInPlaceHtmlEditor(this)
+ } else {
+ var options = {
+ rows: 2, handleLineBreaks: false, okButton: true, cancelLink: true, okText: "Save", submitOnBlur: false
+ }
+ var ipe = Hobo._makeInPlaceEditor(this, options)
+ ipe.getText = function() {
+ // Be careful! we're not calling unescapeHTML() here!
+ return this.element.innerHTML
+ }
+ }
+ },
+
+ "select.integer.editor" : function(e) {
+ var el = this
+ el.onchange = function() {
+ Hobo.ajaxSetFieldForElement(el, $F(el))
+ }
+ },
+
+ "input.live-search[type=search]" : function(e) {
+ var element = this
+ new Form.Element.Observer(element, 1.0, function() { Hobo.doSearch(element) })
+ }
+
+
+});
+
+ElementSet = Class.create(Enumerable, {
+
+ initialize: function(array) {
+ this.items = array
+ },
+
+ _each: function(fn) {
+ return this.items.each(fn)
+ },
+
+ selectChildren: function(selector) {
+ return new ElementSet(this.items.invoke('selectChildren', selector).pluck('items').flatten())
+ },
+
+ child: function(selector) {
+ return this.selectChildren(selector).first()
+ },
+
+ select: function(selector) {
+ return new ElementSet(this.items.invoke('select', selector).flatten())
+ },
+
+ down: function(selector) {
+ for (var i = 0; i < this.items.length; i++) {
+ var match = this.items[i].down(selector)
+ if (match) return match
+ }
+ return null
+ },
+
+ size: function() {
+ return this.items.length
+ },
+
+ first: function() {
+ return this.items.first()
+ },
+
+ last: function() {
+ return this.items.last()
+ }
+
+})
+
+Element.addMethods({
+ selectChildren: function(element, selector) {
+ return new ElementSet(Selector.matchElements(element.childElements(), selector))
+ }
+})
diff --git a/public/javascripts/ie7-recalc.js b/public/javascripts/ie7-recalc.js
new file mode 100644
index 0000000..91e6417
--- /dev/null
+++ b/public/javascripts/ie7-recalc.js
@@ -0,0 +1,166 @@
+
+// =========================================================================
+// ie7-recalc.js
+// =========================================================================
+
+(function() {
+ /* ---------------------------------------------------------------------
+
+ This allows refreshing of IE7 style rules. If you modify the DOM
+ you can update IE7 by calling document.recalc().
+
+ This should be the LAST module included.
+
+ --------------------------------------------------------------------- */
+
+ if (!IE7.loaded) return;
+
+ // remove all IE7 classes from an element
+ CLASSES = /\sie7_class\d+/g;
+
+ IE7.CSS.extend({
+ // store for elements that have style properties calculated
+ elements: {},
+ handlers: [],
+
+ // clear IE7 classes and styles
+ reset: function() {
+ this.removeEventHandlers();
+ // reset IE7 classes here
+ var elements = this.elements;
+ for (var i in elements) elements[i].runtimeStyle.cssText = "";
+ this.elements = {};
+ // reset runtimeStyle here
+ var elements = IE7.Rule.elements;
+ for (var i in elements) {
+ with (elements[i]) className = className.replace(CLASSES, "");
+ }
+ IE7.Rule.elements = {};
+ },
+
+ reload: function() {
+ this.rules = [];
+ this.getInlineStyles();
+ this.screen.load();
+ if (this.print) this.print.load();
+ this.refresh();
+ this.trash();
+ },
+
+ addRecalc: function(propertyName, test, handler, replacement) {
+ // call the ancestor method to add a wrapped recalc method
+ this.base(propertyName, test, function(element) {
+ // execute the original recalc method
+ handler(element);
+ // store a reference to this element so we can clear its style later
+ IE7.CSS.elements[element.uniqueID] = element;
+ }, replacement);
+ },
+
+ recalc: function() {
+ // clear IE7 styles and classes
+ this.reset();
+ // execute the ancestor method to perform recalculations
+ this.base();
+ },
+
+ addEventHandler: function(element, type, handler) {
+ element.attachEvent(type, handler);
+ // store the handler so it can be detached later
+ this.handlers.push(arguments);
+ },
+
+ removeEventHandlers: function() {
+ var handler;
+ while (handler = this.handlers.pop()) {
+ handler[0].detachEvent(handler[1], handler[2]);
+ }
+ },
+
+ getInlineStyles: function() {
+ // load inline styles
+ var styleSheets = document.getElementsByTagName("style"), styleSheet;
+ for (var i = styleSheets.length - 1; (styleSheet = styleSheets[i]); i--) {
+ if (!styleSheet.disabled && !styleSheet.ie7) {
+ var cssText = styleSheet.cssText || styleSheet.innerHTML;
+ this.styles.push(cssText);
+ styleSheet.cssText = cssText;
+ }
+ }
+ },
+
+ trash: function() {
+ // trash the old style sheets
+ var styleSheets = document.styleSheets, styleSheet, i;
+ for (i = 0; i < styleSheets.length; i++) {
+ styleSheet = styleSheets[i];
+ if (!styleSheet.ie7 && !styleSheet.cssText && styleSheet.cssText != '') {
+ styleSheet.cssText = styleSheet.cssText;
+ }
+ }
+ this.base();
+ },
+
+ getText: function(styleSheet) {
+ return styleSheet.cssText || this.base(styleSheet);
+ }
+ });
+
+ // remove event handlers (they eat memory)
+ IE7.CSS.addEventHandler(window, "onunload", function() {
+ IE7.CSS.removeEventHandlers();
+ });
+
+ // store all elements with an IE7 class assigned
+ IE7.Rule.elements = {};
+
+ IE7.Rule.prototype.extend({
+ add: function(element) {
+ // execute the ancestor "add" method
+ this.base(element);
+ // store a reference to this element so we can clear its classes later
+ IE7.Rule.elements[element.uniqueID] = element;
+ }
+ });
+
+ // store created pseudo elements
+ if (IE7.PseudoElement) {
+ IE7.PseudoElement.hash = {};
+
+ IE7.PseudoElement.prototype.extend({
+ create: function(target) {
+ var key = this.selector + ":" + target.uniqueID;
+ if (!IE7.PseudoElement.hash[key]) {
+ IE7.PseudoElement.hash[key] = true;
+ this.base(target);
+ }
+ }
+ });
+ }
+
+ IE7.HTML.extend({
+ elements: {},
+
+ addRecalc: function(selector, handler) {
+ // call the ancestor method to add a wrapped recalc method
+ this.base(selector, function(element) {
+ if (!this.elements[element.uniqueID]) {
+ // execute the original recalc method
+ handler(element);
+ // store a reference to this element so that
+ // it is not "fixed" again
+ this.elements[element.uniqueID] = element;
+ }
+ });
+ }
+ });
+
+ // allow refreshing of IE7 fixes
+ document.recalc = function(reload) {
+ if (IE7.CSS.screen) {
+ if (reload) IE7.CSS.reload();
+ IE7.recalc();
+ }
+ };
+
+})();
diff --git a/public/javascripts/lowpro.js b/public/javascripts/lowpro.js
new file mode 100644
index 0000000..67fbee1
--- /dev/null
+++ b/public/javascripts/lowpro.js
@@ -0,0 +1,339 @@
+LowPro = {};
+LowPro.Version = '0.5';
+LowPro.CompatibleWithPrototype = '1.6';
+
+if (Prototype.Version.indexOf(LowPro.CompatibleWithPrototype) != 0 && window.console && window.console.warn)
+ console.warn("This version of Low Pro is tested with Prototype " + LowPro.CompatibleWithPrototype +
+ " it may not work as expected with this version (" + Prototype.Version + ")");
+
+if (!Element.addMethods)
+ Element.addMethods = function(o) { Object.extend(Element.Methods, o) };
+
+// Simple utility methods for working with the DOM
+DOM = {};
+
+// DOMBuilder for prototype
+DOM.Builder = {
+ tagFunc : function(tag) {
+ return function() {
+ var attrs, children;
+ if (arguments.length>0) {
+ if (arguments[0].constructor == Object) {
+ attrs = arguments[0];
+ children = Array.prototype.slice.call(arguments, 1);
+ } else {
+ children = arguments;
+ };
+ children = $A(children).flatten()
+ }
+ return DOM.Builder.create(tag, attrs, children);
+ };
+ },
+ create : function(tag, attrs, children) {
+ attrs = attrs || {}; children = children || []; tag = tag.toLowerCase();
+ var el = new Element(tag, attrs);
+
+ for (var i=0; i -1,
+ Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
+ MobileSafari: /Apple.*Mobile/.test(ua)
+ }
+ })(),
+
+ BrowserFeatures: {
+ XPath: !!document.evaluate,
+
+ SelectorsAPI: !!document.querySelector,
+
+ ElementExtensions: (function() {
+ var constructor = window.Element || window.HTMLElement;
+ return !!(constructor && constructor.prototype);
+ })(),
+ SpecificElementExtensions: (function() {
+ if (typeof window.HTMLDivElement !== 'undefined')
+ return true;
+
+ var div = document.createElement('div'),
+ form = document.createElement('form'),
+ isSupported = false;
+
+ if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
+ isSupported = true;
+ }
+
+ div = form = null;
+
+ return isSupported;
+ })()
+ },
+
+ ScriptFragment: '