(function() { 'use strict'; var SHOW_HIDE_UTIL_NAME = 'showHide'; var SHOW_HIDE_UTIL_SELECTOR = '[uw-show-hide]'; var SHOW_HIDE_LOCAL_STORAGE_KEY = 'SHOW_HIDE'; var SHOW_HIDE_INITIALIZED_CLASS = 'show-hide--initialized'; var SHOW_HIDE_COLLAPSED_CLASS = 'show-hide--collapsed'; var SHOW_HIDE_TOGGLE_CLASS = 'show-hide__toggle'; var SHOW_HIDE_TOGGLE_RIGHT_CLASS = 'show-hide__toggle--right'; /** * * ShowHide Utility * * Attribute: uw-show-hide * * Params: (all optional) * data-show-hide-id: string * If this param is given the state of the utility will be persisted in the clients local storage. * data-show-hide-collapsed: boolean property * If this param is present the ShowHide utility will be collapsed. This value will be overruled by any value stored in the LocalStorage. * data-show-hide-align: 'right' * Where to put the arrow that marks the element as a ShowHide toggle. Left of toggle by default. * * Example usage: *