2017-02-28 04:01:13 +01:00
webpackJsonp ( [ 3 ] , [ function ( e , t , n ) { "use strict"
2017-02-19 23:34:18 +01:00
n ( 2 ) , n ( 3 ) , n ( 6 ) , n ( 16 ) , n ( 18 ) , n ( 24 ) , n ( 26 ) , n ( 28 ) , n ( 29 ) , n ( 31 ) , n ( 34 ) , n ( 104 ) , n ( 112 ) , n ( 116 ) , n ( 126 ) , n ( 127 ) , n ( 128 ) , n ( 129 ) , n ( 130 ) , n ( 131 ) , n ( 133 ) , n ( 136 ) , n ( 138 ) , n ( 140 ) , n ( 143 ) , n ( 146 ) , n ( 148 ) , n ( 150 ) , n ( 152 ) , n ( 154 ) , n ( 156 ) ,
2017-03-09 23:47:09 +01:00
n ( 157 ) , n ( 166 ) , n ( 167 ) , n ( 170 ) , n ( 171 ) , n ( 172 ) , n ( 173 ) , n ( 174 ) , n ( 175 ) , n ( 176 ) , n ( 177 ) , n ( 178 ) , n ( 179 ) , n ( 180 ) , n ( 181 ) , n ( 182 ) , n ( 185 ) , n ( 187 ) , n ( 188 ) , n ( 189 ) , n ( 190 ) , n ( 191 ) , n ( 192 ) , n ( 193 ) , n ( 190 ) , n ( 196 ) , n ( 198 ) , n ( 200 ) , n ( 201 )
2017-02-28 04:01:13 +01:00
} , , function ( e , t ) { "use strict"
2016-11-22 03:18:26 +01:00
function n ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var r = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , i = function ( ) { function e ( ) {
2017-03-09 23:47:09 +01:00
n ( this , e ) , this . defaultLocale = "en_US" , this . currentLocale = this . detectLocale ( ) , this . lang = { } } return r ( e , [ { key : "setLocale" , value : function e ( t ) { this . currentLocale = t } } , { key : "getLocale" , value : function e ( ) { return null !== this . currentLocale ? this . currentLocale : this . defaultLocale
} } , { key : "_t" , value : function e ( t , n , r , i ) { var o = this . getLocale ( ) . replace ( /_[\w]+/i , "" ) , a = this . defaultLocale . replace ( /_[\w]+/i , "" )
return this . lang && this . lang [ this . getLocale ( ) ] && this . lang [ this . getLocale ( ) ] [ t ] ? this . lang [ this . getLocale ( ) ] [ t ] : this . lang && this . lang [ o ] && this . lang [ o ] [ t ] ? this . lang [ o ] [ t ] : this . lang && this . lang [ this . defaultLocale ] && this . lang [ this . defaultLocale ] [ t ] ? this . lang [ this . defaultLocale ] [ t ] : this . lang && this . lang [ a ] && this . lang [ a ] [ t ] ? this . lang [ a ] [ t ] : n ? n : ""
} } , { key : "addDictionary" , value : function e ( t , n ) { "undefined" == typeof this . lang [ t ] && ( this . lang [ t ] = { } )
for ( var r in n ) this . lang [ t ] [ r ] = n [ r ] } } , { key : "getDictionary" , value : function e ( t ) { return this . lang [ t ] } } , { key : "stripStr" , value : function e ( t ) { return t . replace ( /^\s*/ , "" ) . replace ( /\s*$/ , "" ) } } , { key : "stripStrML" ,
value : function e ( t ) { for ( var n = t . split ( "\n" ) , r = 0 ; r < n . length ; r += 1 ) n [ r ] = stripStr ( n [ r ] )
return stripStr ( n . join ( " " ) ) } } , { key : "sprintf" , value : function e ( t ) { for ( var n = arguments . length , r = Array ( n > 1 ? n - 1 : 0 ) , i = 1 ; i < n ; i ++ ) r [ i - 1 ] = arguments [ i ]
if ( 0 === r . length ) return t
var o = new RegExp ( "(.?)(%s)" , "g" ) , a = 0
return t . replace ( o , function ( e , t , n , i , o ) { return "%" === t ? e : t + r [ a ++ ] } ) } } , { key : "inject" , value : function e ( t , n ) { var r = new RegExp ( "{([A-Za-z0-9_]*)}" , "g" )
return t . replace ( r , function ( e , t , r , i ) { return n [ t ] ? n [ t ] : e } ) } } , { key : "detectLocale" , value : function t ( ) { var n , r
if ( n = document . body . getAttribute ( "lang" ) , ! n ) for ( var i = document . getElementsByTagName ( "meta" ) , o = 0 ; o < i . length ; o ++ ) i [ o ] . attributes [ "http-equiv" ] && "content-language" == i [ o ] . attributes [ "http-equiv" ] . nodeValue . toLowerCase ( ) && ( n = i [ o ] . attributes . content . nodeValue )
n || ( n = this . defaultLocale )
var a = n . match ( /([^-|_]*)[-|_](.*)/ )
if ( 2 == n . length ) { for ( var s in e . lang ) if ( s . substr ( 0 , 2 ) . toLowerCase ( ) == n . toLowerCase ( ) ) { r = s
break } } else a && ( r = a [ 1 ] . toLowerCase ( ) + "_" + a [ 2 ] . toUpperCase ( ) )
return r } } , { key : "addEvent" , value : function e ( t , n , r , i ) { return t . addEventListener ? ( t . addEventListener ( n , r , i ) , ! 0 ) : t . attachEvent ? t . attachEvent ( "on" + n , r ) : void console . log ( "Handler could not be attached" ) } } ] ) ,
2017-02-28 04:01:13 +01:00
e } ( ) , o = new i
2017-03-09 23:47:09 +01:00
window . ss = "undefined" != typeof window . ss ? window . ss : { } , window . ss . i18n = window . i18n = o , t . default = o } , function ( e , t , n ) { ( function ( t ) { e . exports = t . SilverStripeComponent = n ( 4 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
"use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 1 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "componentDidMount" , value : function e ( ) { if ( "undefined" != typeof this . props . cmsEvents ) {
2016-09-21 07:30:24 +02:00
this . cmsEvents = this . props . cmsEvents
2017-03-09 23:47:09 +01:00
for ( var t in this . cmsEvents ) ( { } ) . hasOwnProperty . call ( this . cmsEvents , t ) && ( 0 , d . default ) ( document ) . on ( t , this . cmsEvents [ t ] . bind ( this ) ) } } } , { key : "componentWillUnmount" , value : function e ( ) { for ( var t in this . cmsEvents ) ( { } ) . hasOwnProperty . call ( this . cmsEvents , t ) && ( 0 ,
d . default ) ( document ) . off ( t ) } } , { key : "emitCmsEvent" , value : function e ( t , n ) { ( 0 , d . default ) ( document ) . trigger ( t , n ) } } ] ) , t } ( l . Component )
f . propTypes = { cmsEvents : u . default . PropTypes . object } , t . default = f } , , function ( e , t , n ) { ( function ( t ) { e . exports = t . Backend = n ( 7 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , {
2017-02-28 04:01:13 +01:00
value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function a ( e ) { var t = null , n = null
2016-09-21 07:30:24 +02:00
if ( ! ( e . status >= 200 && e . status < 300 ) ) throw n = new Error ( e . statusText ) , n . response = e , n
return t = e } function s ( e ) { var t = null
if ( e instanceof FormData || "string" == typeof e ) t = e
else { if ( ! e || "object" !== ( "undefined" == typeof e ? "undefined" : g ( e ) ) ) throw new Error ( "Invalid body type" )
2017-03-09 23:47:09 +01:00
t = JSON . stringify ( e ) } return t } function l ( e , t ) { switch ( e ) { case "application/x-www-form-urlencoded" : return C . default . stringify ( t )
2016-09-21 07:30:24 +02:00
case "application/json" : case "application/x-json" : case "application/x-javascript" : case "text/javascript" : case "text/x-javascript" : case "text/x-json" : return JSON . stringify ( t )
2017-03-09 23:47:09 +01:00
default : throw new Error ( "Can't encode format: " + e ) } } function u ( e , t ) { switch ( e ) { case "application/x-www-form-urlencoded" : return C . default . parse ( t )
2016-09-21 07:30:24 +02:00
case "application/json" : case "application/x-json" : case "application/x-javascript" : case "text/javascript" : case "text/x-javascript" : case "text/x-json" : return JSON . parse ( t )
2017-01-26 05:20:08 +01:00
default : throw new Error ( "Can't decode format: " + e ) } } function c ( e , t ) { return "" === t ? e : e . match ( /\?/ ) ? e + "&" + t : e + "?" + t } function d ( e ) { return e . text ( ) . then ( function ( t ) { return u ( e . headers . get ( "Content-Type" ) , t )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
} ) } function f ( e , t ) { return Object . keys ( t ) . reduce ( function ( n , r ) { var i = e [ r ]
2017-03-09 23:47:09 +01:00
return ! i || i . remove !== ! 0 && i . querystring !== ! 0 ? m ( n , o ( { } , r , t [ r ] ) ) : n } , { } ) } function p ( e , t , n ) { var r = arguments . length > 3 && void 0 !== arguments [ 3 ] ? arguments [ 3 ] : { setFromData : ! 1 } , i = t , a = Object . keys ( n ) . reduce ( function ( t , i ) {
2017-02-28 04:01:13 +01:00
var a = e [ i ] , s = r . setFromData === ! 0 && ! ( a && a . remove === ! 0 ) , l = a && a . querystring === ! 0 && a . remove !== ! 0
return s || l ? m ( t , o ( { } , i , n [ i ] ) ) : t } , { } ) , s = l ( "application/x-www-form-urlencoded" , a )
return i = c ( i , s ) , i = Object . keys ( e ) . reduce ( function ( t , r ) { var i = e [ r ] . urlReplacement
return i ? t . replace ( i , n [ r ] ) : t } , i ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var h = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , m = Object . assign || function ( e ) {
2016-09-21 07:30:24 +02:00
for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-03-09 23:47:09 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , g = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , y = n ( 8 ) , v = r ( y ) , b = n ( 10 ) , _ = r ( b ) , w = n ( 13 ) , C = r ( w ) , T = n ( 14 ) , P = r ( T )
_ . default . polyfill ( )
var E = function ( ) { function e ( ) { i ( this , e ) , this . fetch = v . default } return h ( e , [ { key : "createEndpointFetcher" , value : function e ( t ) { var n = this , r = m ( { method : "get" , payloadFormat : "application/x-www-form-urlencoded" ,
responseFormat : "application/json" , payloadSchema : { } , defaultData : { } } , t ) , i = { json : "application/json" , urlencoded : "application/x-www-form-urlencoded" }
return [ "payloadFormat" , "responseFormat" ] . forEach ( function ( e ) { i [ r [ e ] ] && ( r [ e ] = i [ r [ e ] ] ) } ) , function ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : { } , t = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : { } , i = m ( { } , t , {
Accept : r . responseFormat , "Content-Type" : r . payloadFormat } ) , o = P . default . recursive ( { } , r . defaultData , e ) , a = p ( r . payloadSchema , r . url , o , { setFromData : "get" === r . method . toLowerCase ( ) } ) , s = "get" !== r . method . toLowerCase ( ) ? l ( r . payloadFormat , f ( r . payloadSchema , o ) ) : "" , u = "get" === r . method . toLowerCase ( ) ? [ a , i ] : [ a , s , i ]
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return n [ r . method . toLowerCase ( ) ] . apply ( n , u ) . then ( d ) } } } , { key : "get" , value : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : { }
return this . fetch ( t , { method : "get" , credentials : "same-origin" , headers : n } ) . then ( a ) } } , { key : "post" , value : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : { } , r = arguments . length > 2 && void 0 !== arguments [ 2 ] ? arguments [ 2 ] : { } , i = {
2016-09-21 07:30:24 +02:00
"Content-Type" : "application/x-www-form-urlencoded" }
2017-03-09 23:47:09 +01:00
return this . fetch ( t , { method : "post" , credentials : "same-origin" , body : s ( n ) , headers : m ( { } , i , r ) } ) . then ( a ) } } , { key : "put" , value : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : { } , r = arguments . length > 2 && void 0 !== arguments [ 2 ] ? arguments [ 2 ] : { }
return this . fetch ( t , { method : "put" , credentials : "same-origin" , body : s ( n ) , headers : r } ) . then ( a ) } } , { key : "delete" , value : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : { } , r = arguments . length > 2 && void 0 !== arguments [ 2 ] ? arguments [ 2 ] : { }
return this . fetch ( t , { method : "delete" , credentials : "same-origin" , body : s ( n ) , headers : r } ) . then ( a ) } } ] ) , e } ( ) , k = new E
t . default = k } , function ( e , t , n ) { n ( 9 ) , e . exports = self . fetch . bind ( self ) } , , function ( e , t , n ) { var r ; ( function ( t , i ) { ! function ( t , n ) { e . exports = n ( ) } ( this , function ( ) { "use strict"
2017-02-28 04:01:13 +01:00
function e ( e ) { return "function" == typeof e || "object" == typeof e && null !== e } function o ( e ) { return "function" == typeof e } function a ( e ) { K = e } function s ( e ) { J = e } function l ( ) { return function ( ) { return t . nextTick ( p ) } }
2017-01-26 05:20:08 +01:00
function u ( ) { return function ( ) { Q ( p ) } } function c ( ) { var e = 0 , t = new ee ( p ) , n = document . createTextNode ( "" )
return t . observe ( n , { characterData : ! 0 } ) , function ( ) { n . data = e = ++ e % 2 } } function d ( ) { var e = new MessageChannel
2016-09-21 07:30:24 +02:00
return e . port1 . onmessage = p , function ( ) { return e . port2 . postMessage ( 0 ) } } function f ( ) { var e = setTimeout
2017-02-28 04:01:13 +01:00
return function ( ) { return e ( p , 1 ) } } function p ( ) { for ( var e = 0 ; e < W ; e += 2 ) { var t = re [ e ] , n = re [ e + 1 ]
t ( n ) , re [ e ] = void 0 , re [ e + 1 ] = void 0 } W = 0 } function h ( ) { try { var e = r , t = n ( 12 )
2017-03-09 23:47:09 +01:00
return Q = t . runOnLoop || t . runOnContext , u ( ) } catch ( e ) { return f ( ) } } function m ( e , t ) { var n = arguments , r = this , i = new this . constructor ( y )
void 0 === i [ oe ] && F ( i )
2017-02-28 04:01:13 +01:00
var o = r . _state
return o ? ! function ( ) { var e = n [ o - 1 ]
J ( function ( ) { return A ( o , i , e , r . _result ) } ) } ( ) : j ( r , i , e , t ) , i } function g ( e ) { var t = this
2016-09-21 07:30:24 +02:00
if ( e && "object" == typeof e && e . constructor === t ) return e
2017-02-28 04:01:13 +01:00
var n = new t ( y )
2017-03-09 23:47:09 +01:00
return E ( n , e ) , n } function y ( ) { } function v ( ) { return new TypeError ( "You cannot resolve a promise with itself" ) } function b ( ) { return new TypeError ( "A promises callback cannot return that same promise." ) } function _ ( e ) {
try { return e . then } catch ( e ) { return ue . error = e , ue } } function w ( e , t , n , r ) { try { e . call ( t , n , r ) } catch ( e ) { return e } } function C ( e , t , n ) { J ( function ( e ) { var r = ! 1 , i = w ( n , t , function ( n ) { r || ( r = ! 0 , t !== n ? E ( e , n ) : O ( e , n ) ) } , function ( t ) {
2017-02-28 04:01:13 +01:00
r || ( r = ! 0 , S ( e , t ) ) } , "Settle: " + ( e . _label || " unknown promise" ) )
2017-03-09 23:47:09 +01:00
! r && i && ( r = ! 0 , S ( e , i ) ) } , e ) } function T ( e , t ) { t . _state === se ? O ( e , t . _result ) : t . _state === le ? S ( e , t . _result ) : j ( t , void 0 , function ( t ) { return E ( e , t ) } , function ( t ) { return S ( e , t ) } ) } function P ( e , t , n ) { t . constructor === e . constructor && n === m && t . constructor . resolve === g ? T ( e , t ) : n === ue ? S ( e , ue . error ) : void 0 === n ? O ( e , t ) : o ( n ) ? C ( e , t , n ) : O ( e , t )
2017-02-28 04:01:13 +01:00
2017-03-09 23:47:09 +01:00
} function E ( t , n ) { t === n ? S ( t , v ( ) ) : e ( n ) ? P ( t , n , _ ( n ) ) : O ( t , n ) } function k ( e ) { e . _onerror && e . _onerror ( e . _result ) , x ( e ) } function O ( e , t ) { e . _state === ae && ( e . _result = t , e . _state = se , 0 !== e . _subscribers . length && J ( x , e ) ) } function S ( e , t ) {
e . _state === ae && ( e . _state = le , e . _result = t , J ( k , e ) ) } function j ( e , t , n , r ) { var i = e . _subscribers , o = i . length
2017-02-28 04:01:13 +01:00
e . _onerror = null , i [ o ] = t , i [ o + se ] = n , i [ o + le ] = r , 0 === o && e . _state && J ( x , e ) } function x ( e ) { var t = e . _subscribers , n = e . _state
if ( 0 !== t . length ) { for ( var r = void 0 , i = void 0 , o = e . _result , a = 0 ; a < t . length ; a += 3 ) r = t [ a ] , i = t [ a + n ] , r ? A ( n , r , i , o ) : i ( o )
2017-03-09 23:47:09 +01:00
e . _subscribers . length = 0 } } function R ( ) { this . error = null } function I ( e , t ) { try { return e ( t ) } catch ( e ) { return ce . error = e , ce } } function A ( e , t , n , r ) { var i = o ( n ) , a = void 0 , s = void 0 , l = void 0 , u = void 0
if ( i ) { if ( a = I ( n , r ) , a === ce ? ( u = ! 0 , s = a . error , a = null ) : l = ! 0 , t === a ) return void S ( t , b ( ) ) } else a = r , l = ! 0
t . _state !== ae || ( i && l ? E ( t , a ) : u ? S ( t , s ) : e === se ? O ( t , a ) : e === le && S ( t , a ) ) } function D ( e , t ) { try { t ( function t ( n ) { E ( e , n ) } , function t ( n ) { S ( e , n ) } ) } catch ( t ) { S ( e , t ) } } function M ( ) { return de ++ } function F ( e ) { e [ oe ] = de ++ ,
e . _state = void 0 , e . _result = void 0 , e . _subscribers = [ ] } function N ( e , t ) { this . _instanceConstructor = e , this . promise = new e ( y ) , this . promise [ oe ] || F ( this . promise ) , X ( t ) ? ( this . _input = t , this . length = t . length , this . _remaining = t . length ,
this . _result = new Array ( this . length ) , 0 === this . length ? O ( this . promise , this . _result ) : ( this . length = this . length || 0 , this . _enumerate ( ) , 0 === this . _remaining && O ( this . promise , this . _result ) ) ) : S ( this . promise , L ( ) ) } function L ( ) {
2017-02-28 04:01:13 +01:00
return new Error ( "Array Methods must be provided an Array" ) } function U ( e ) { return new N ( this , e ) . promise } function B ( e ) { var t = this
return new t ( X ( e ) ? function ( n , r ) { for ( var i = e . length , o = 0 ; o < i ; o ++ ) t . resolve ( e [ o ] ) . then ( n , r ) } : function ( e , t ) { return t ( new TypeError ( "You must pass an array to race." ) ) } ) } function H ( e ) { var t = this , n = new t ( y )
return S ( n , e ) , n } function $ ( ) { throw new TypeError ( "You must pass a resolver function as the first argument to the promise constructor" ) } function q ( ) { throw new TypeError ( "Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function." )
2017-03-09 23:47:09 +01:00
} function V ( e ) { this [ oe ] = M ( ) , this . _result = this . _state = void 0 , this . _subscribers = [ ] , y !== e && ( "function" != typeof e && $ ( ) , this instanceof V ? D ( this , e ) : q ( ) ) } function G ( ) { var e = void 0
2017-02-28 04:01:13 +01:00
if ( "undefined" != typeof i ) e = i
2016-09-21 07:30:24 +02:00
else if ( "undefined" != typeof self ) e = self
2017-03-09 23:47:09 +01:00
else try { e = Function ( "return this" ) ( ) } catch ( e ) { throw new Error ( "polyfill failed because global object is unavailable in this environment" ) } var t = e . Promise
if ( t ) { var n = null
try { n = Object . prototype . toString . call ( t . resolve ( ) ) } catch ( e ) { } if ( "[object Promise]" === n && ! t . cast ) return } e . Promise = V } var z = void 0
2016-10-10 10:05:32 +02:00
z = Array . isArray ? Array . isArray : function ( e ) { return "[object Array]" === Object . prototype . toString . call ( e ) }
2017-03-09 23:47:09 +01:00
var X = z , W = 0 , Q = void 0 , K = void 0 , J = function e ( t , n ) { re [ W ] = t , re [ W + 1 ] = n , W += 2 , 2 === W && ( K ? K ( p ) : ie ( ) ) } , Y = "undefined" != typeof window ? window : void 0 , Z = Y || { } , ee = Z . MutationObserver || Z . WebKitMutationObserver , te = "undefined" == typeof self && "undefined" != typeof t && "[object process]" === { } . toString . call ( t ) , ne = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel , re = new Array ( 1e3 ) , ie = void 0
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
ie = te ? l ( ) : ee ? c ( ) : ne ? d ( ) : void 0 === Y ? h ( ) : f ( )
var oe = Math . random ( ) . toString ( 36 ) . substring ( 16 ) , ae = void 0 , se = 1 , le = 2 , ue = new R , ce = new R , de = 0
return N . prototype . _enumerate = function ( ) { for ( var e = this . length , t = this . _input , n = 0 ; this . _state === ae && n < e ; n ++ ) this . _eachEntry ( t [ n ] , n ) } , N . prototype . _eachEntry = function ( e , t ) { var n = this . _instanceConstructor , r = n . resolve
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
if ( r === g ) { var i = _ ( e )
if ( i === m && e . _state !== ae ) this . _settledAt ( e . _state , t , e . _result )
else if ( "function" != typeof i ) this . _remaining -- , this . _result [ t ] = e
else if ( n === V ) { var o = new n ( y )
P ( o , e , i ) , this . _willSettleAt ( o , t ) } else this . _willSettleAt ( new n ( function ( t ) { return t ( e ) } ) , t ) } else this . _willSettleAt ( r ( e ) , t ) } , N . prototype . _settledAt = function ( e , t , n ) { var r = this . promise
2017-03-09 23:47:09 +01:00
r . _state === ae && ( this . _remaining -- , e === le ? S ( r , n ) : this . _result [ t ] = n ) , 0 === this . _remaining && O ( r , this . _result ) } , N . prototype . _willSettleAt = function ( e , t ) { var n = this
2017-02-28 04:01:13 +01:00
j ( e , void 0 , function ( e ) { return n . _settledAt ( se , t , e ) } , function ( e ) { return n . _settledAt ( le , t , e ) } ) } , V . all = U , V . race = B , V . resolve = g , V . reject = H , V . _setScheduler = a , V . _setAsap = s , V . _asap = J , V . prototype = { constructor : V ,
2017-03-09 23:47:09 +01:00
then : m , catch : function e ( t ) { return this . then ( null , t ) } } , G ( ) , V . polyfill = G , V . Promise = V , V } ) } ) . call ( t , n ( 11 ) , function ( ) { return this } ( ) ) } , , function ( e , t ) { } , function ( e , t ) { e . exports = qs } , function ( e , t , n ) { ( function ( e ) {
2017-02-28 04:01:13 +01:00
! function ( t ) { function n ( e , t ) { if ( "object" !== i ( e ) ) return t
for ( var r in t ) "object" === i ( e [ r ] ) && "object" === i ( t [ r ] ) ? e [ r ] = n ( e [ r ] , t [ r ] ) : e [ r ] = t [ r ]
return e } function r ( e , t , r ) { var a = r [ 0 ] , s = r . length ; ( e || "object" !== i ( a ) ) && ( a = { } )
for ( var l = 0 ; l < s ; ++ l ) { var u = r [ l ] , c = i ( u )
if ( "object" === c ) for ( var d in u ) { var f = e ? o . clone ( u [ d ] ) : u [ d ]
t ? a [ d ] = n ( a [ d ] , f ) : a [ d ] = f } } return a } function i ( e ) { return { } . toString . call ( e ) . slice ( 8 , - 1 ) . toLowerCase ( ) } var o = function ( e ) { return r ( e === ! 0 , ! 1 , arguments ) } , a = "merge"
o . recursive = function ( e ) { return r ( e === ! 0 , ! 0 , arguments ) } , o . clone = function ( e ) { var t = e , n = i ( e ) , r , a
if ( "array" === n ) for ( t = [ ] , a = e . length , r = 0 ; r < a ; ++ r ) t [ r ] = o . clone ( e [ r ] )
2016-09-21 07:30:24 +02:00
else if ( "object" === n ) { t = { }
2017-02-28 04:01:13 +01:00
for ( r in e ) t [ r ] = o . clone ( e [ r ] ) } return t } , t ? e . exports = o : window [ a ] = o } ( "object" == typeof e && e && "object" == typeof e . exports && e . exports ) } ) . call ( t , n ( 15 ) ( e ) ) } , , function ( e , t , n ) { ( function ( t ) { e . exports = t . schemaFieldValues = n ( 17 )
2016-10-20 10:44:11 +02:00
} ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function o ( e , t ) { return "undefined" == typeof t ? e : c . default . recursive ( ! 0 , e , {
2017-02-28 04:01:13 +01:00
data : t . data , source : t . source , message : t . message , valid : t . valid , value : t . value } ) } function a ( e , t ) { var n = null
2016-12-16 01:41:36 +01:00
if ( ! e ) return n
n = e . find ( function ( e ) { return e . name === t } )
2017-02-28 04:01:13 +01:00
var r = ! 0 , i = ! 1 , o = void 0
try { for ( var s = e [ Symbol . iterator ] ( ) , l ; ! ( r = ( l = s . next ( ) ) . done ) ; r = ! 0 ) { var u = l . value
2016-12-16 01:41:36 +01:00
if ( n ) break
2017-03-09 23:47:09 +01:00
n = a ( u . children , t ) } } catch ( e ) { i = ! 0 , o = e } finally { try { ! r && s . return && s . return ( ) } finally { if ( i ) throw o } } return n } function s ( e , t ) { return t ? t . fields . reduce ( function ( t , n ) { var r = a ( e . fields , n . name )
2017-02-28 04:01:13 +01:00
return r ? "Structural" === r . type || r . readOnly === ! 0 ? t : l ( { } , t , i ( { } , r . name , n . value ) ) : t } , { } ) : { } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2016-12-16 01:41:36 +01:00
var l = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e }
2017-03-09 23:47:09 +01:00
t . schemaMerge = o , t . findField = a , t . default = s
2017-02-28 04:01:13 +01:00
var u = n ( 14 ) , c = r ( u ) } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FieldHolder = n ( 19 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-11-03 05:36:19 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function s ( e ) { var t = function ( t ) {
2017-03-09 23:47:09 +01:00
function n ( ) { return i ( this , n ) , o ( this , ( n . _ _proto _ _ || Object . getPrototypeOf ( n ) ) . apply ( this , arguments ) ) } return a ( n , t ) , u ( n , [ { key : "renderDescription" , value : function e ( ) { return null === this . props . description ? null : ( 0 ,
g . default ) ( "div" , this . props . description , { className : "form__field-description" } ) } } , { key : "renderMessage" , value : function e ( ) { var t = this . props . meta , n = t ? t . error : null
return ! n || t && ! t . touched ? null : d . default . createElement ( v . default , l ( { className : "form__field-message" } , n ) ) } } , { key : "renderLeftTitle" , value : function e ( ) { var t = null !== this . props . leftTitle ? this . props . leftTitle : this . props . title
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return ! t || this . props . hideLabels ? null : ( 0 , g . default ) ( h . ControlLabel , t , { className : "form__field-label" } ) } } , { key : "renderRightTitle" , value : function e ( ) { return ! this . props . rightTitle || this . props . hideLabels ? null : ( 0 ,
g . default ) ( h . ControlLabel , this . props . rightTitle , { className : "form__field-label" } ) } } , { key : "getHolderProps" , value : function e ( ) { var t = [ "field" , this . props . extraClass ]
return this . props . readOnly && t . push ( "readonly" ) , { bsClass : this . props . bsClass , bsSize : this . props . bsSize , validationState : this . props . validationState , className : t . join ( " " ) , controlId : this . props . id , id : this . props . holderId
} } } , { key : "render" , value : function t ( ) { return d . default . createElement ( h . FormGroup , this . getHolderProps ( ) , this . renderLeftTitle ( ) , d . default . createElement ( "div" , { className : "form__field-holder" } , d . default . createElement ( e , this . props ) , this . renderMessage ( ) , this . renderDescription ( ) ) , this . renderRightTitle ( ) )
2016-11-03 05:36:19 +01:00
2017-03-09 23:47:09 +01:00
} } ] ) , n } ( p . default )
return t . propTypes = { leftTitle : d . default . PropTypes . any , rightTitle : d . default . PropTypes . any , title : d . default . PropTypes . any , extraClass : d . default . PropTypes . string , holderId : d . default . PropTypes . string , id : d . default . PropTypes . string ,
description : d . default . PropTypes . any , hideLabels : d . default . PropTypes . bool , message : d . default . PropTypes . shape ( { extraClass : d . default . PropTypes . string , value : d . default . PropTypes . any , type : d . default . PropTypes . string
} ) } , t . defaultProps = { className : "" , extraClass : "" , leftTitle : null , rightTitle : null } , t } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2016-11-03 05:36:19 +01:00
var l = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , u = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , c = n ( 5 ) , d = r ( c ) , f = n ( 20 ) , p = r ( f ) , h = n ( 21 ) , m = n ( 22 ) , g = r ( m ) , y = n ( 23 ) , v = r ( y )
2016-11-03 05:36:19 +01:00
2017-03-09 23:47:09 +01:00
t . default = s } , function ( e , t ) { e . exports = SilverStripeComponent } , function ( e , t ) { e . exports = ReactBootstrap } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { var n = arguments . length > 2 && void 0 !== arguments [ 2 ] ? arguments [ 2 ] : { }
if ( t && "undefined" != typeof t . react ) return l . default . createElement ( e , n , t . react )
2017-02-28 04:01:13 +01:00
if ( t && "undefined" != typeof t . html ) { if ( null !== t . html ) { var r = { _ _html : t . html }
2017-03-09 23:47:09 +01:00
return l . default . createElement ( e , a ( { } , n , { dangerouslySetInnerHTML : r } ) ) } return null } var i = null
2017-02-28 04:01:13 +01:00
if ( i = t && "undefined" != typeof t . text ? t . text : t , i && "object" === ( "undefined" == typeof i ? "undefined" : o ( i ) ) ) throw new Error ( "Unsupported string value " + JSON . stringify ( i ) )
2017-03-09 23:47:09 +01:00
return null !== i && "undefined" != typeof i ? l . default . createElement ( e , n , i ) : null } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var o = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e
} , a = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e }
2017-03-09 23:47:09 +01:00
t . default = i
2017-02-28 04:01:13 +01:00
var s = n ( 5 ) , l = r ( s ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-10-28 05:13:29 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-10-28 05:13:29 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 21 ) , p = n ( 22 ) , h = r ( p ) , m = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleDismiss = n . handleDismiss . bind ( n ) , n . state = { visible : ! 0 } , n } return a ( t , e ) , s ( t , [ { key : "handleDismiss" , value : function e ( ) { "function" == typeof this . props . onDismiss ? this . props . onDismiss ( ) : this . setState ( {
visible : ! 1 } ) } } , { key : "getMessageStyle" , value : function e ( ) { switch ( this . props . type ) { case "good" : case "success" : return "success"
2016-10-28 05:13:29 +02:00
case "info" : return "info"
case "warn" : case "warning" : return "warning"
2017-03-09 23:47:09 +01:00
default : return "danger" } } } , { key : "getMessageProps" , value : function e ( ) { var t = this . props . type || "no-type"
return { className : [ "message-box" , "message-box--" + t , this . props . className , this . props . extraClass ] . join ( " " ) , bsStyle : this . props . bsStyle || this . getMessageStyle ( ) , bsClass : this . props . bsClass , onDismiss : this . props . closeLabel ? this . handleDismiss : null ,
closeLabel : this . props . closeLabel } } } , { key : "render" , value : function e ( ) { if ( "boolean" != typeof this . props . visible && this . state . visible || this . props . visible ) { var t = ( 0 , h . default ) ( "div" , this . props . value )
if ( t ) return u . default . createElement ( f . Alert , this . getMessageProps ( ) , t ) } return null } } ] ) , t } ( d . default )
2016-10-28 05:13:29 +02:00
m . propTypes = { extraClass : l . PropTypes . string , value : l . PropTypes . any , type : l . PropTypes . string , onDismiss : l . PropTypes . func , closeLabel : l . PropTypes . string , visible : l . PropTypes . bool } , m . defaultProps = { extraClass : "" ,
2017-03-09 23:47:09 +01:00
className : "" } , t . default = m } , function ( e , t , n ) { ( function ( t ) { e . exports = t . Form = n ( 25 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-11-03 05:36:19 +01:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-11-03 05:36:19 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = n ( 23 ) , h = r ( p ) , m = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , l ( t , [ { key : "renderMessages" , value : function e ( ) { return Array . isArray ( this . props . messages ) ? this . props . messages . map ( function ( e , t ) {
return c . default . createElement ( h . default , s ( { key : t , className : t ? "" : "message-box--panel-top" } , e ) ) } ) : null } } , { key : "render" , value : function e ( ) { var t = this . props . valid !== ! 1 , n = this . props . mapFieldsToComponents ( this . props . fields ) , r = this . props . mapActionsToComponents ( this . props . actions ) , i = this . renderMessages ( ) , o = [ "form" ]
t === ! 1 && o . push ( "form--invalid" ) , this . props . attributes && this . props . attributes . className && o . push ( this . props . attributes . className )
var a = s ( { } , this . props . attributes , { onSubmit : this . props . handleSubmit , className : o . join ( " " ) } )
return c . default . createElement ( "form" , a , i , this . props . afterMessages , n && c . default . createElement ( "fieldset" , null , n ) , r && c . default . createElement ( "div" , { className : "btn-toolbar" , role : "group" } , r ) ) } } ] ) , t } ( f . default )
2016-11-03 05:36:19 +01:00
m . propTypes = { actions : u . PropTypes . array , afterMessages : u . PropTypes . node , attributes : u . PropTypes . shape ( { action : u . PropTypes . string . isRequired , className : u . PropTypes . string , encType : u . PropTypes . string , id : u . PropTypes . string ,
method : u . PropTypes . string . isRequired } ) , fields : u . PropTypes . array . isRequired , handleSubmit : u . PropTypes . func , mapActionsToComponents : u . PropTypes . func . isRequired , mapFieldsToComponents : u . PropTypes . func . isRequired ,
2017-03-09 23:47:09 +01:00
messages : u . PropTypes . arrayOf ( u . PropTypes . shape ( { extraClass : u . PropTypes . string , value : u . PropTypes . any , type : u . PropTypes . string } ) ) } , t . default = m } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FormConstants = n ( 27 )
2016-11-03 05:36:19 +01:00
} ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t ) { "use strict"
2017-03-09 23:47:09 +01:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . default = { CSRF _HEADER : "X-SecurityID" } } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FormAlert = n ( 23 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { ( function ( t ) {
e . exports = t . FormAction = n ( 30 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleClick = n . handleClick . bind ( n ) , n } return a ( t , e ) , l ( t , [ { key : "render" , value : function e ( ) { return c . default . createElement ( "button" , this . getButtonProps ( ) , this . getLoadingIcon ( ) , c . default . createElement ( "span" , null , this . props . title ) )
} } , { key : "getButtonProps" , value : function e ( ) { return s ( { } , "undefined" == typeof this . props . attributes ? { } : this . props . attributes , { id : this . props . id , name : this . props . name , className : this . getButtonClasses ( ) , disabled : this . props . disabled ,
onClick : this . handleClick } ) } } , { key : "getButtonClasses" , value : function e ( ) { var t = [ "btn" ] , n = this . getButtonStyle ( )
n && t . push ( "btn-" + n ) , "string" != typeof this . props . title && t . push ( "btn--no-text" )
var r = this . getIcon ( )
return r && t . push ( "font-icon-" + r ) , this . props . loading && t . push ( "btn--loading" ) , this . props . disabled && t . push ( "disabled" ) , "string" == typeof this . props . extraClass && t . push ( this . props . extraClass ) , t . join ( " " ) } } , {
key : "getButtonStyle" , value : function e ( ) { if ( "undefined" != typeof this . props . data . buttonStyle ) return this . props . data . buttonStyle
2016-12-21 03:52:45 +01:00
if ( "undefined" != typeof this . props . buttonStyle ) return this . props . buttonStyle
2017-03-09 23:47:09 +01:00
var t = this . props . extraClass . split ( " " )
return t . find ( function ( e ) { return e . indexOf ( "btn-" ) > - 1 } ) ? null : "action_save" === this . props . name || t . find ( function ( e ) { return "ss-ui-action-constructive" === e } ) ? "primary" : "secondary" } } , { key : "getIcon" , value : function e ( ) {
return this . props . icon || this . props . data . icon || null } } , { key : "getLoadingIcon" , value : function e ( ) { return this . props . loading ? c . default . createElement ( "div" , { className : "btn__loading-icon" } , c . default . createElement ( "span" , {
className : "btn__circle btn__circle--1" } ) , c . default . createElement ( "span" , { className : "btn__circle btn__circle--2" } ) , c . default . createElement ( "span" , { className : "btn__circle btn__circle--3" } ) ) : null } } , { key : "handleClick" ,
value : function e ( t ) { "function" == typeof this . props . handleClick && this . props . handleClick ( t , this . props . name || this . props . id ) } } ] ) , t } ( f . default )
p . propTypes = { id : c . default . PropTypes . string , name : c . default . PropTypes . string , handleClick : c . default . PropTypes . func , title : c . default . PropTypes . string , type : c . default . PropTypes . string , loading : c . default . PropTypes . bool ,
icon : c . default . PropTypes . string , disabled : c . default . PropTypes . bool , data : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . array , c . default . PropTypes . shape ( { buttonStyle : c . default . PropTypes . string } ) ] ) , extraClass : c . default . PropTypes . string ,
attributes : c . default . PropTypes . object } , p . defaultProps = { title : "" , icon : "" , extraClass : "" , attributes : { } , data : { } , disabled : ! 1 } , t . default = p } , function ( e , t , n ) { ( function ( t ) { e . exports = t . SchemaActions = n ( 32 ) } ) . call ( t , function ( ) {
return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { return { type : u . default . SET _SCHEMA , payload : s ( { id : e } , t ) } } function o ( e , t ) { return { type : u . default . SET _SCHEMA _STATE _OVERRIDES , payload : { id : e , stateOverride : t
} } } function a ( e , t ) { return { type : u . default . SET _SCHEMA _LOADING , payload : { id : e , loading : t } } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2016-11-22 03:18:26 +01:00
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e }
t . setSchema = i , t . setSchemaStateOverrides = o , t . setSchemaLoading = a
var l = n ( 33 ) , u = r ( l ) } , function ( e , t ) { "use strict"
2016-11-22 03:18:26 +01:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var n = { SET _SCHEMA : "SET_SCHEMA" , SET _SCHEMA _STATE _OVERRIDES : "SET_SCHEMA_STATE_OVERRIDES" , SET _SCHEMA _LOADING : "SET_SCHEMA_LOADING" }
2017-03-09 23:47:09 +01:00
t . default = n } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FormBuilder = n ( 35 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function o ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
} function a ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-10-20 10:44:11 +02:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function s ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . schemaPropType = t . basePropTypes = void 0
var l = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , u = function ( ) { function e ( e , t ) { var n = [ ] , r = ! 0 , i = ! 1 , o = void 0
2017-03-09 23:47:09 +01:00
try { for ( var a = e [ Symbol . iterator ] ( ) , s ; ! ( r = ( s = a . next ( ) ) . done ) && ( n . push ( s . value ) , ! t || n . length !== t ) ; r = ! 0 ) ; } catch ( e ) { i = ! 0 , o = e } finally { try { ! r && a . return && a . return ( ) } finally { if ( i ) throw o } } return n } return function ( t , n ) {
2016-11-02 01:42:44 +01:00
if ( Array . isArray ( t ) ) return t
if ( Symbol . iterator in Object ( t ) ) return e ( t , n )
2017-02-28 04:01:13 +01:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) } } ( ) , c = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , d = n ( 5 ) , f = r ( d ) , p = n ( 14 ) , h = r ( p ) , m = n ( 17 ) , g = r ( m ) , y = n ( 20 ) , v = r ( y ) , b = n ( 36 ) , _ = r ( b ) , w = n ( 102 ) , C = r ( w ) , T = n ( 103 ) , P = r ( T ) , E = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { o ( this , t )
var n = a ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) ) , r = e . schema . schema
2017-03-09 23:47:09 +01:00
return n . state = { submittingAction : null } , n . submitApi = C . default . createEndpointFetcher ( { url : r . attributes . action , method : r . attributes . method } ) , n . mapActionsToComponents = n . mapActionsToComponents . bind ( n ) , n . mapFieldsToComponents = n . mapFieldsToComponents . bind ( n ) ,
n . handleSubmit = n . handleSubmit . bind ( n ) , n . handleAction = n . handleAction . bind ( n ) , n . buildComponent = n . buildComponent . bind ( n ) , n . validateForm = n . validateForm . bind ( n ) , n } return s ( t , e ) , c ( t , [ { key : "validateForm" , value : function e ( t ) {
var n = this
if ( "function" == typeof this . props . validate ) return this . props . validate ( t )
var r = this . props . schema && this . props . schema . schema
if ( ! r ) return { }
var o = new _ . default ( t )
return Object . entries ( t ) . reduce ( function ( e , t ) { var r = u ( t , 1 ) , a = r [ 0 ] , s = ( 0 , m . findField ) ( n . props . schema . schema . fields , a ) , c = o . validateFieldSchema ( s ) , d = c . valid , p = c . errors
2017-01-26 05:20:08 +01:00
if ( d ) return e
2017-03-09 23:47:09 +01:00
var h = p . map ( function ( e , t ) { return f . default . createElement ( "span" , { key : t , className : "form__validation-message" } , e ) } )
return l ( { } , e , i ( { } , a , { type : "error" , value : { react : h } } ) ) } , { } ) } } , { key : "handleAction" , value : function e ( t ) { "function" == typeof this . props . handleAction && this . props . handleAction ( t , this . props . values ) , t . isPropagationStopped ( ) || this . setState ( {
submittingAction : t . currentTarget . name } ) } } , { key : "handleSubmit" , value : function e ( t ) { var n = this , r = this . state . submittingAction ? this . state . submittingAction : this . props . schema . schema . actions [ 0 ] . name , o = l ( { } , t , i ( { } , r , 1 ) ) , a = this . props . responseRequestedSchema . join ( ) , s = {
"X-Formschema-Request" : a , "X-Requested-With" : "XMLHttpRequest" } , u = function e ( t ) { return n . submitApi ( t || o , s ) . then ( function ( e ) { return n . setState ( { submittingAction : null } ) , e } ) . catch ( function ( e ) { throw n . setState ( {
2016-11-23 06:09:10 +01:00
submittingAction : null } ) , e } ) }
2017-03-09 23:47:09 +01:00
return "function" == typeof this . props . handleSubmit ? this . props . handleSubmit ( o , r , u ) : u ( ) } } , { key : "buildComponent" , value : function e ( t ) { var n = t , r = null !== n . schemaComponent ? P . default . getComponentByName ( n . schemaComponent ) : P . default . getComponentByDataType ( n . type )
if ( null === r ) return null
if ( null !== n . schemaComponent && void 0 === r ) throw Error ( "Component not found in injector: " + n . schemaComponent )
n = l ( { } , n , n . input ) , delete n . input
var i = this . props . createFn
return "function" == typeof i ? i ( r , n ) : f . default . createElement ( r , l ( { key : n . id } , n ) ) } } , { key : "mapFieldsToComponents" , value : function e ( t ) { var n = this , r = this . props . baseFieldComponent
return t . map ( function ( e ) { var t = e
return e . children && ( t = l ( { } , e , { children : n . mapFieldsToComponents ( e . children ) } ) ) , t = l ( { onAutofill : n . props . onAutofill , form : n . props . form } , t ) , "Structural" === e . type || e . readOnly === ! 0 ? n . buildComponent ( t ) : f . default . createElement ( r , l ( {
key : t . id } , t , { component : n . buildComponent } ) ) } ) } } , { key : "mapActionsToComponents" , value : function e ( t ) { var n = this
return t . map ( function ( e ) { var t = l ( { } , e )
return e . children ? t . children = n . mapActionsToComponents ( e . children ) : ( t . handleClick = n . handleAction , n . props . submitting && n . state . submittingAction === e . name && ( t . loading = ! 0 ) ) , n . buildComponent ( t ) } ) } } , { key : "normalizeFields" ,
value : function e ( t , n ) { var r = this
return t . map ( function ( e ) { var t = n && n . fields ? n . fields . find ( function ( t ) { return t . id === e . id } ) : { } , i = h . default . recursive ( ! 0 , ( 0 , m . schemaMerge ) ( e , t ) , { schemaComponent : e . component } )
return e . children && ( i . children = r . normalizeFields ( e . children , n ) ) , i } ) } } , { key : "normalizeActions" , value : function e ( t ) { var n = this
return t . map ( function ( e ) { var t = h . default . recursive ( ! 0 , e , { schemaComponent : e . component } )
return e . children && ( t . children = n . normalizeActions ( e . children ) ) , t } ) } } , { key : "render" , value : function e ( ) { var t = this . props . schema . schema , n = this . props . schema . state , r = this . props . baseFormComponent , i = l ( { } , t . attributes , {
className : t . attributes . class , encType : t . attributes . enctype } )
delete i . class , delete i . enctype
var o = this . props , a = o . asyncValidate , s = o . onSubmitFail , u = o . onSubmitSuccess , c = o . shouldAsyncValidate , d = o . touchOnBlur , p = o . touchOnChange , h = o . persistentSubmitErrors , m = o . form , y = o . afterMessages , v = { form : m , afterMessages : y ,
fields : this . normalizeFields ( t . fields , n ) , actions : this . normalizeActions ( t . actions ) , attributes : i , data : t . data , initialValues : ( 0 , g . default ) ( t , n ) , onSubmit : this . handleSubmit , valid : n && n . valid , messages : n && Array . isArray ( n . messages ) ? n . messages : [ ] ,
mapActionsToComponents : this . mapActionsToComponents , mapFieldsToComponents : this . mapFieldsToComponents , asyncValidate : a , onSubmitFail : s , onSubmitSuccess : u , shouldAsyncValidate : c , touchOnBlur : d , touchOnChange : p ,
persistentSubmitErrors : h , validate : this . validateForm }
return f . default . createElement ( r , v ) } } ] ) , t } ( v . default ) , k = d . PropTypes . shape ( { id : d . PropTypes . string , schema : d . PropTypes . shape ( { attributes : d . PropTypes . shape ( { class : d . PropTypes . string , enctype : d . PropTypes . string
} ) , fields : d . PropTypes . array . isRequired } ) , state : d . PropTypes . shape ( { fields : d . PropTypes . array } ) , loading : d . PropTypes . boolean , stateOverride : d . PropTypes . shape ( { fields : d . PropTypes . array } ) } ) , O = { createFn : d . PropTypes . func ,
2017-01-26 05:20:08 +01:00
handleSubmit : d . PropTypes . func , handleAction : d . PropTypes . func , asyncValidate : d . PropTypes . func , onSubmitFail : d . PropTypes . func , onSubmitSuccess : d . PropTypes . func , shouldAsyncValidate : d . PropTypes . func , touchOnBlur : d . PropTypes . bool ,
touchOnChange : d . PropTypes . bool , persistentSubmitErrors : d . PropTypes . bool , validate : d . PropTypes . func , values : d . PropTypes . object , submitting : d . PropTypes . bool , baseFormComponent : d . PropTypes . func . isRequired , baseFieldComponent : d . PropTypes . func . isRequired ,
responseRequestedSchema : d . PropTypes . arrayOf ( d . PropTypes . oneOf ( [ "schema" , "state" , "errors" , "auto" ] ) ) }
2017-03-09 23:47:09 +01:00
E . propTypes = l ( { } , O , { form : d . PropTypes . string . isRequired , schema : k . isRequired } ) , E . defaultProps = { responseRequestedSchema : [ "auto" ] } , t . basePropTypes = O , t . schemaPropType = k , t . default = E } , function ( e , t , n ) { "use strict"
2016-11-23 06:09:10 +01:00
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var o = function ( ) { function e ( e , t ) { var n = [ ] , r = ! 0 , i = ! 1 , o = void 0
2017-03-09 23:47:09 +01:00
try { for ( var a = e [ Symbol . iterator ] ( ) , s ; ! ( r = ( s = a . next ( ) ) . done ) && ( n . push ( s . value ) , ! t || n . length !== t ) ; r = ! 0 ) ; } catch ( e ) { i = ! 0 , o = e } finally { try { ! r && a . return && a . return ( ) } finally { if ( i ) throw o } } return n } return function ( t , n ) {
2016-11-02 01:42:44 +01:00
if ( Array . isArray ( t ) ) return t
if ( Symbol . iterator in Object ( t ) ) return e ( t , n )
2017-02-28 04:01:13 +01:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) } } ( ) , a = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 37 ) , u = r ( l ) , c = function ( ) {
2017-03-09 23:47:09 +01:00
function e ( t ) { i ( this , e ) , this . setValues ( t ) } return s ( e , [ { key : "setValues" , value : function e ( t ) { this . values = t } } , { key : "getFieldValue" , value : function e ( t ) { var n = this . values [ t ]
return "string" != typeof n && ( n = "undefined" == typeof n || null === n || n === ! 1 ? "" : n . toString ( ) ) , n } } , { key : "validateValue" , value : function e ( t , n , r ) { switch ( n ) { case "equals" : var i = this . getFieldValue ( r . field )
return u . default . equals ( t , i )
case "numeric" : return u . default . isNumeric ( t )
case "date" : return u . default . isDate ( t )
case "alphanumeric" : return u . default . isAlphanumeric ( t )
case "alpha" : return u . default . isAlpha ( t )
case "regex" : return u . default . matches ( t , r . pattern )
case "max" : return t . length <= r . length
case "email" : return u . default . isEmail ( t )
default : return console . warn ( "Unknown validation rule used: '" + n + "'" ) , ! 1 } } } , { key : "validateFieldSchema" , value : function e ( t ) { return this . validateField ( t . name , t . validation , null !== t . leftTitle ? t . leftTitle : t . title , t . customValidationMessage )
} } , { key : "getMessage" , value : function e ( t , n ) { var r = ""
if ( "string" == typeof n . message ) r = n . message
else switch ( t ) { case "required" : r = "{name} is required."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
case "equals" : r = "{name} are not equal."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
case "numeric" : r = "{name} is not a number."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
case "date" : r = "{name} is not a proper date format."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
case "alphanumeric" : r = "{name} is not an alpha-numeric value."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
case "alpha" : r = "{name} is not only letters."
2016-11-02 01:42:44 +01:00
break
2017-03-09 23:47:09 +01:00
default : r = "{name} is not a valid value." } return n . title && ( r = r . replace ( "{name}" , n . title ) ) , r } } , { key : "validateField" , value : function e ( t , n , r , i ) { var s = this , l = { valid : ! 0 , errors : [ ] }
if ( ! n ) return l
var u = this . getFieldValue ( t )
if ( "" === u && n . required ) { var c = a ( { title : "" !== r ? r : t } , n . required ) , d = i || this . getMessage ( "required" , c )
return { valid : ! 1 , errors : [ d ] } } return Object . entries ( n ) . forEach ( function ( e ) { var n = o ( e , 2 ) , i = n [ 0 ] , c = n [ 1 ] , d = a ( { title : t } , { title : r } , c )
if ( "required" !== i ) { var f = s . validateValue ( u , i , d )
if ( ! f ) { var p = s . getMessage ( i , d )
l . valid = ! 1 , l . errors . push ( p ) } } } ) , i && ! l . valid && ( l . errors = [ i ] ) , l } } ] ) , e } ( )
t . default = c } , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function ( e , t ) { e . exports = Backend } , function ( e , t ) { "use strict"
2016-09-21 07:30:24 +02:00
function n ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var r = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , i = function ( ) { function e ( ) {
2017-03-09 23:47:09 +01:00
n ( this , e ) , this . components = { } } return r ( e , [ { key : "getComponentByName" , value : function e ( t ) { return this . components [ t ] } } , { key : "getComponentByDataType" , value : function e ( t ) { switch ( t ) { case "Text" : case "Date" : case "DateTime" :
2016-09-21 07:30:24 +02:00
return this . components . TextField
case "Hidden" : return this . components . HiddenField
case "SingleSelect" : return this . components . SingleSelectField
case "Custom" : return this . components . GridField
case "Structural" : return this . components . CompositeField
2016-09-29 22:10:02 +02:00
case "Boolean" : return this . components . CheckboxField
case "MultiSelect" : return this . components . CheckboxSetField
2017-03-09 23:47:09 +01:00
default : return null } } } , { key : "register" , value : function e ( t , n ) { this . components [ t ] = n } } ] ) , e } ( )
window . ss = window . ss || { } , window . ss . injector = window . ss . injector || new i , t . default = window . ss . injector } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FormBuilderLoader = n ( 105 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
"use strict"
2017-02-28 04:01:13 +01:00
function r ( e ) { if ( e && e . _ _esModule ) return e
2016-10-20 10:44:11 +02:00
var t = { }
if ( null != e ) for ( var n in e ) Object . prototype . hasOwnProperty . call ( e , n ) && ( t [ n ] = e [ n ] )
2017-03-09 23:47:09 +01:00
return t . default = e , t } function i ( e ) { return e && e . _ _esModule ? e : { default : e } } function o ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function a ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-10-20 10:44:11 +02:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function s ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2017-02-28 04:01:13 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function l ( e , t ) { var n = e . schemas [ t . schemaUrl ] , r = e . form && e . form [ t . schemaUrl ] , i = r && r . submitting , o = r && r . values , a = n && n . stateOverride , s = n && n . metadata && n . metadata . loading
2016-10-20 10:44:11 +02:00
2017-02-28 04:01:13 +01:00
return { schema : n , submitting : i , values : o , stateOverrides : a , loading : s } } function u ( e ) { return { actions : { schema : ( 0 , m . bindActionCreators ) ( C , e ) , reduxForm : ( 0 , m . bindActionCreators ) ( { autofill : _ . autofill } , e ) } } } Object . defineProperty ( t , "__esModule" , {
2016-12-14 21:19:11 +01:00
value : ! 0 } )
2017-01-26 05:20:08 +01:00
var c = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , d = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , f = n ( 5 ) , p = i ( f ) , h = n ( 106 ) , m = n ( 107 ) , g = n ( 8 ) , y = i ( g ) , v = n ( 108 ) , b = i ( v ) , _ = n ( 109 ) , w = n ( 110 ) , C = r ( w ) , T = n ( 14 ) , P = i ( T ) , E = n ( 25 ) , k = i ( E ) , O = n ( 111 ) , S = i ( O ) , j = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { o ( this , t )
var n = a ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-01-26 05:20:08 +01:00
return n . handleSubmit = n . handleSubmit . bind ( n ) , n . clearSchema = n . clearSchema . bind ( n ) , n . reduceSchemaErrors = n . reduceSchemaErrors . bind ( n ) , n . handleAutofill = n . handleAutofill . bind ( n ) , n } return s ( t , e ) , d ( t , [ { key : "componentDidMount" ,
2017-03-09 23:47:09 +01:00
value : function e ( ) { this . fetch ( ) } } , { key : "componentDidUpdate" , value : function e ( t ) { this . props . schemaUrl !== t . schemaUrl && ( this . clearSchema ( t . schemaUrl ) , this . fetch ( ) ) } } , { key : "componentWillUnmount" , value : function e ( ) {
this . clearSchema ( this . props . schemaUrl ) } } , { key : "getMessages" , value : function e ( t ) { var n = { }
return t && t . fields && t . fields . forEach ( function ( e ) { e . message && ( n [ e . name ] = e . message ) } ) , n } } , { key : "clearSchema" , value : function e ( t ) { t && ( ( 0 , _ . destroy ) ( t ) , this . props . actions . schema . setSchema ( t , null ) ) } } , { key : "handleSubmit" ,
value : function e ( t , n , r ) { var i = this , o = null
if ( o = "function" == typeof this . props . handleSubmit ? this . props . handleSubmit ( t , n , r ) : r ( ) , ! o ) throw new Error ( "Promise was not returned for submitting" )
return o . then ( function ( e ) { var t = e
return t && ( t = i . reduceSchemaErrors ( t ) , i . props . actions . schema . setSchema ( i . props . schemaUrl , t ) ) , t } ) . then ( function ( e ) { if ( ! e || ! e . state ) return e
var t = i . getMessages ( e . state )
2016-12-12 03:25:18 +01:00
if ( Object . keys ( t ) . length ) throw new _ . SubmissionError ( t )
2017-03-09 23:47:09 +01:00
return e } ) } } , { key : "reduceSchemaErrors" , value : function e ( t ) { if ( ! t . errors ) return t
var n = c ( { } , t )
return n . state || ( n = c ( { } , n , { state : this . props . schema . state } ) ) , n = c ( { } , n , { state : c ( { } , n . state , { fields : n . state . fields . map ( function ( e ) { return c ( { } , e , { message : t . errors . find ( function ( t ) { return t . field === e . name } )
} ) } ) , messages : t . errors . filter ( function ( e ) { return ! e . field } ) } ) } ) , delete n . errors , ( 0 , b . default ) ( n ) } } , { key : "overrideStateData" , value : function e ( t ) { if ( ! this . props . stateOverrides || ! t ) return t
var n = this . props . stateOverrides . fields , r = t . fields
return n && r && ( r = r . map ( function ( e ) { var t = n . find ( function ( t ) { return t . name === e . name } )
return t ? P . default . recursive ( ! 0 , e , t ) : e } ) ) , c ( { } , t , this . props . stateOverrides , { fields : r } ) } } , { key : "callFetch" , value : function e ( t ) { return ( 0 , y . default ) ( this . props . schemaUrl , { headers : { "X-FormSchema-Request" : t . join ( "," )
} , credentials : "same-origin" } ) . then ( function ( e ) { return e . json ( ) } ) } } , { key : "fetch" , value : function e ( ) { var t = this , n = ! ( arguments . length > 0 && void 0 !== arguments [ 0 ] ) || arguments [ 0 ] , r = ! ( arguments . length > 1 && void 0 !== arguments [ 1 ] ) || arguments [ 1 ] , i = [ ]
return n && i . push ( "schema" ) , r && i . push ( "state" ) , this . props . loading ? Promise . resolve ( { } ) : ( this . props . actions . schema . setSchemaLoading ( this . props . schemaUrl , ! 0 ) , this . callFetch ( i ) . then ( function ( e ) { if ( t . props . actions . schema . setSchemaLoading ( t . props . schemaUrl , ! 1 ) ,
"undefined" != typeof e . id ) { var n = c ( { } , e , { state : t . overrideStateData ( e . state ) } )
return t . props . actions . schema . setSchema ( t . props . schemaUrl , n ) , n } return e } ) ) } } , { key : "handleAutofill" , value : function e ( t , n ) { this . props . actions . reduxForm . autofill ( this . props . schemaUrl , t , n ) } } , { key : "render" ,
value : function e ( ) { if ( ! this . props . schema || ! this . props . schema . schema || this . props . loading ) return null
var t = c ( { } , this . props , { form : this . props . schemaUrl , onSubmitSuccess : this . props . onSubmitSuccess , handleSubmit : this . handleSubmit , onAutofill : this . handleAutofill } )
return p . default . createElement ( S . default , t ) } } ] ) , t } ( f . Component )
j . propTypes = c ( { } , O . basePropTypes , { actions : f . PropTypes . shape ( { schema : f . PropTypes . object , reduxFrom : f . PropTypes . object } ) , schemaUrl : f . PropTypes . string . isRequired , schema : O . schemaPropType , form : f . PropTypes . string ,
submitting : f . PropTypes . bool } ) , j . defaultProps = { baseFormComponent : ( 0 , _ . reduxForm ) ( ) ( k . default ) , baseFieldComponent : _ . Field } , t . default = ( 0 , h . connect ) ( l , u ) ( j ) } , , , function ( e , t ) { e . exports = DeepFreezeStrict } , function ( e , t ) {
e . exports = ReduxForm } , function ( e , t ) { e . exports = SchemaActions } , function ( e , t ) { e . exports = FormBuilder } , function ( e , t , n ) { ( function ( t ) { e . exports = t . FormBuilderModal = n ( 113 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
"use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 114 ) , d = r ( c ) , f = n ( 21 ) , p = n ( 20 ) , h = r ( p ) , m = n ( 115 ) , g = r ( m ) , y = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleSubmit = n . handleSubmit . bind ( n ) , n . handleHide = n . handleHide . bind ( n ) , n . clearResponse = n . clearResponse . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "getForm" , value : function e ( ) { return this . props . schemaUrl ? u . default . createElement ( g . default , {
schemaUrl : this . props . schemaUrl , handleSubmit : this . handleSubmit , handleAction : this . props . handleAction } ) : null } } , { key : "getResponse" , value : function e ( ) { if ( ! this . state || ! this . state . response ) return null
var t = ""
return t = this . state . error ? this . props . responseClassBad || "response error" : this . props . responseClassGood || "response good" , u . default . createElement ( "div" , { className : t } , u . default . createElement ( "span" , null , this . state . response ) )
} } , { key : "clearResponse" , value : function e ( ) { this . setState ( { response : null } ) } } , { key : "handleHide" , value : function e ( ) { this . clearResponse ( ) , "function" == typeof this . props . handleHide && this . props . handleHide ( ) } } , {
key : "handleSubmit" , value : function e ( t , n , r ) { var i = this , o = null
if ( o = "function" == typeof this . props . handleSubmit ? this . props . handleSubmit ( t , n , r ) : r ( ) , ! o ) throw new Error ( "Promise was not returned for submitting" )
return o . then ( function ( e ) { return i . setState ( { response : e . message , error : ! 1 } ) , e } ) . catch ( function ( e ) { e . then ( function ( e ) { i . setState ( { response : e , error : ! 0 } ) } ) } ) , o } } , { key : "renderHeader" , value : function e ( ) { return this . props . title !== ! 1 ? u . default . createElement ( f . Modal . Header , {
closeButton : ! 0 } , u . default . createElement ( f . Modal . Title , null , this . props . title ) ) : "function" == typeof this . props . handleHide ? u . default . createElement ( "button" , { type : "button" , className : "close form-builder-modal__close-button" ,
onClick : this . handleHide , "aria-label" : d . default . _t ( "FormBuilderModal.CLOSE" , "Close" ) } , u . default . createElement ( "span" , { "aria-hidden" : "true" } , "× " ) ) : null } } , { key : "render" , value : function e ( ) { var t = this . getForm ( ) , n = this . getResponse ( )
return u . default . createElement ( f . Modal , { show : this . props . show , onHide : this . handleHide , className : this . props . className , bsSize : this . props . bsSize } , this . renderHeader ( ) , u . default . createElement ( f . Modal . Body , { className : this . props . bodyClassName
} , n , t , this . props . children ) ) } } ] ) , t } ( h . default )
y . propTypes = { show : u . default . PropTypes . bool , title : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . bool ] ) , className : u . default . PropTypes . string , bodyClassName : u . default . PropTypes . string ,
handleHide : u . default . PropTypes . func , schemaUrl : u . default . PropTypes . string , handleSubmit : u . default . PropTypes . func , handleAction : u . default . PropTypes . func , responseClassGood : u . default . PropTypes . string , responseClassBad : u . default . PropTypes . string
} , y . defaultProps = { show : ! 1 , title : null } , t . default = y } , function ( e , t ) { e . exports = i18n } , function ( e , t ) { e . exports = FormBuilderLoader } , function ( e , t , n ) { ( function ( t ) { e . exports = t . GridField = n ( 117 ) } ) . call ( t , function ( ) {
return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-02-28 04:01:13 +01:00
function r ( e ) { if ( e && e . _ _esModule ) return e
2016-09-21 07:30:24 +02:00
var t = { }
if ( null != e ) for ( var n in e ) Object . prototype . hasOwnProperty . call ( e , n ) && ( t [ n ] = e [ n ] )
2017-03-09 23:47:09 +01:00
return t . default = e , t } function i ( e ) { return e && e . _ _esModule ? e : { default : e } } function o ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function a ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function s ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function l ( e , t ) { var n = t . data ? t . data . recordType : null
2017-03-09 23:47:09 +01:00
return { config : e . config , records : n && e . records [ n ] ? e . records [ n ] : F } } function u ( e ) { return { actions : ( 0 , g . bindActionCreators ) ( M , e ) } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var c = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , d = function e ( t , n , r ) { null === t && ( t = Function . prototype )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
var i = Object . getOwnPropertyDescriptor ( t , n )
if ( void 0 === i ) { var o = Object . getPrototypeOf ( t )
return null === o ? void 0 : e ( o , n , r ) } if ( "value" in i ) return i . value
var a = i . get
if ( void 0 !== a ) return a . call ( r ) } , f = n ( 5 ) , p = i ( f ) , h = n ( 114 ) , m = i ( h ) , g = n ( 107 ) , y = n ( 106 ) , v = n ( 20 ) , b = i ( v ) , _ = n ( 118 ) , w = i ( _ ) , C = n ( 119 ) , T = i ( C ) , P = n ( 121 ) , E = i ( P ) , k = n ( 120 ) , O = i ( k ) , S = n ( 122 ) , j = i ( S ) , x = n ( 123 ) , R = i ( x ) , I = n ( 27 ) , A = i ( I ) , D = n ( 124 ) , M = r ( D ) , F = { } , N = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { o ( this , t )
var n = a ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . deleteRecord = n . deleteRecord . bind ( n ) , n . editRecord = n . editRecord . bind ( n ) , n } return s ( t , e ) , c ( t , [ { key : "componentDidMount" , value : function e ( ) { d ( t . prototype . _ _proto _ _ || Object . getPrototypeOf ( t . prototype ) , "componentDidMount" , this ) . call ( this )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
var n = this . props . data
this . props . actions . fetchRecords ( n . recordType , n . collectionReadEndpoint . method , n . collectionReadEndpoint . url ) } } , { key : "render" , value : function e ( ) { var t = this
if ( this . props . records === F ) return p . default . createElement ( "div" , null , m . default . _t ( "Campaigns.LOADING" , "Loading..." ) )
if ( ! Object . getOwnPropertyNames ( this . props . records ) . length ) return p . default . createElement ( "div" , null , m . default . _t ( "Campaigns.NO_RECORDS" , "No campaigns created yet." ) )
var n = p . default . createElement ( "th" , { key : "holder" , className : "grid-field__action-placeholder" } ) , r = this . props . data . columns . map ( function ( e ) { return p . default . createElement ( E . default , { key : "" + e . name } , e . name ) } ) , i = p . default . createElement ( T . default , null , r . concat ( n ) ) , o = Object . keys ( this . props . records ) . map ( function ( e ) {
return t . createRow ( t . props . records [ e ] ) } )
return p . default . createElement ( w . default , { header : i , rows : o } ) } } , { key : "createRowActions" , value : function e ( t ) { return p . default . createElement ( j . default , { className : "grid-field__cell--actions" , key : "Actions" } , p . default . createElement ( R . default , {
icon : "cog" , handleClick : this . editRecord , record : t } ) , p . default . createElement ( R . default , { icon : "cancel" , handleClick : this . deleteRecord , record : t } ) ) } } , { key : "createCell" , value : function e ( t , n ) { var r = this . props . data . handleDrillDown , i = {
className : r ? "grid-field__cell--drillable" : "" , handleDrillDown : r ? function ( e ) { return r ( e , t ) } : null , key : "" + n . name , width : n . width } , o = n . field . split ( "." ) . reduce ( function ( e , t ) { return e [ t ] } , t )
return p . default . createElement ( j . default , i , o ) } } , { key : "createRow" , value : function e ( t ) { var n = this , r = { className : this . props . data . handleDrillDown ? "grid-field__row--drillable" : "" , key : "" + t . ID } , i = this . props . data . columns . map ( function ( e ) {
return n . createCell ( t , e ) } ) , o = this . createRowActions ( t )
return p . default . createElement ( O . default , r , i , o ) } } , { key : "deleteRecord" , value : function e ( t , n ) { t . preventDefault ( )
var r = { }
r [ A . default . CSRF _HEADER ] = this . props . config . SecurityID , confirm ( m . default . _t ( "Campaigns.DELETECAMPAIGN" , "Are you sure you want to delete this record?" ) ) && this . props . actions . deleteRecord ( this . props . data . recordType , n , this . props . data . itemDeleteEndpoint . method , this . props . data . itemDeleteEndpoint . url , r )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "editRecord" , value : function e ( t , n ) { t . preventDefault ( ) , "undefined" != typeof this . props . data && "undefined" != typeof this . props . data . handleEditRecord && this . props . data . handleEditRecord ( t , n ) } } ] ) , t } ( b . default )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
N . propTypes = { data : p . default . PropTypes . shape ( { recordType : p . default . PropTypes . string . isRequired , headerColumns : p . default . PropTypes . array , collectionReadEndpoint : p . default . PropTypes . object , handleDrillDown : p . default . PropTypes . func ,
handleEditRecord : p . default . PropTypes . func } ) } , t . default = ( 0 , y . connect ) ( l , u ) ( N ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { return u . default . createElement ( "div" , { className : "grid-field"
} , u . default . createElement ( "table" , { className : "table table-hover grid-field__table" } , u . default . createElement ( "thead" , null , this . generateHeader ( ) ) , u . default . createElement ( "tbody" , null , this . generateRows ( ) ) ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "generateHeader" , value : function e ( ) { return "undefined" != typeof this . props . header ? this . props . header : ( "undefined" != typeof this . props . data , null ) } } , { key : "generateRows" , value : function e ( ) { return "undefined" != typeof this . props . rows ? this . props . rows : ( "undefined" != typeof this . props . data ,
null ) } } ] ) , t } ( d . default )
f . propTypes = { data : u . default . PropTypes . object , header : u . default . PropTypes . object , rows : u . default . PropTypes . array } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 120 ) , p = r ( f ) , h = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { return u . default . createElement ( p . default , null , this . props . children )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ] ) , t } ( d . default )
t . default = h } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = "grid-field__row " + this . props . className
return u . default . createElement ( "tr" , { tabIndex : "0" , className : t } , this . props . children ) } } ] ) , t } ( d . default )
t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { return u . default . createElement ( "th" , null , this . props . children )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ] ) , t } ( d . default )
f . PropTypes = { width : u . default . PropTypes . number } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleDrillDown = n . handleDrillDown . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = [ "grid-field__cell" ]
"undefined" != typeof this . props . className && t . push ( this . props . className )
var n = { className : t . join ( " " ) , onClick : this . handleDrillDown }
return u . default . createElement ( "td" , n , this . props . children ) } } , { key : "handleDrillDown" , value : function e ( t ) { "undefined" != typeof this . props . handleDrillDown && this . props . handleDrillDown ( t ) } } ] ) , t } ( d . default )
f . PropTypes = { className : u . default . PropTypes . string , width : u . default . PropTypes . number , handleDrillDown : u . default . PropTypes . func } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleClick = n . handleClick . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { return u . default . createElement ( "button" , { className : "grid-field__icon-action font-icon-" + this . props . icon + " btn--icon-large" ,
onClick : this . handleClick } ) } } , { key : "handleClick" , value : function e ( t ) { this . props . handleClick ( t , this . props . record . ID ) } } ] ) , t } ( d . default )
f . PropTypes = { handleClick : u . default . PropTypes . func . isRequired } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { var n = [ "id" ]
2017-02-28 04:01:13 +01:00
return n . reduce ( function ( e , n ) { return e . replace ( ":" + n , t [ n ] ) } , e ) } function o ( e , t , n ) { var r = { recordType : e } , o = { Accept : "text/json" } , a = t . toLowerCase ( )
2017-03-09 23:47:09 +01:00
return function ( t ) { t ( { type : u . default . FETCH _RECORDS _REQUEST , payload : r } )
2017-02-28 04:01:13 +01:00
var s = "get" === a ? [ i ( n , r ) , o ] : [ i ( n , r ) , { } , o ]
2017-03-09 23:47:09 +01:00
return d . default [ a ] . apply ( d . default , s ) . then ( function ( e ) { return e . json ( ) } ) . then ( function ( n ) { t ( { type : u . default . FETCH _RECORDS _SUCCESS , payload : { recordType : e , data : n } } ) } ) . catch ( function ( n ) { throw t ( { type : u . default . FETCH _RECORDS _FAILURE ,
payload : { error : n , recordType : e } } ) , n } ) } } function a ( e , t , n ) { var r = { recordType : e } , o = { Accept : "text/json" } , a = t . toLowerCase ( )
return function ( t ) { t ( { type : u . default . FETCH _RECORD _REQUEST , payload : r } )
2017-02-28 04:01:13 +01:00
var s = "get" === a ? [ i ( n , r ) , o ] : [ i ( n , r ) , { } , o ]
2017-03-09 23:47:09 +01:00
return d . default [ a ] . apply ( d . default , s ) . then ( function ( e ) { return e . json ( ) } ) . then ( function ( n ) { t ( { type : u . default . FETCH _RECORD _SUCCESS , payload : { recordType : e , data : n } } ) } ) . catch ( function ( n ) { throw t ( { type : u . default . FETCH _RECORD _FAILURE ,
payload : { error : n , recordType : e } } ) , n } ) } } function s ( e , t , n , r ) { var o = arguments . length > 4 && void 0 !== arguments [ 4 ] ? arguments [ 4 ] : { } , a = { recordType : e , id : t } , s = n . toLowerCase ( ) , l = "get" === s ? [ i ( r , a ) , o ] : [ i ( r , a ) , { } , o ]
return function ( n ) { return n ( { type : u . default . DELETE _RECORD _REQUEST , payload : a } ) , d . default [ s ] . apply ( d . default , l ) . then ( function ( ) { n ( { type : u . default . DELETE _RECORD _SUCCESS , payload : { recordType : e , id : t } } ) } ) . catch ( function ( r ) {
throw n ( { type : u . default . DELETE _RECORD _FAILURE , payload : { error : r , recordType : e , id : t } } ) , r } ) } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . fetchRecords = o , t . fetchRecord = a , t . deleteRecord = s
2017-02-28 04:01:13 +01:00
var l = n ( 125 ) , u = r ( l ) , c = n ( 7 ) , d = r ( c ) } , function ( e , t ) { "use strict"
2017-03-09 23:47:09 +01:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . default = { CREATE _RECORD : "CREATE_RECORD" , UPDATE _RECORD : "UPDATE_RECORD" , DELETE _RECORD : "DELETE_RECORD" , FETCH _RECORDS _REQUEST : "FETCH_RECORDS_REQUEST" , FETCH _RECORDS _FAILURE : "FETCH_RECORDS_FAILURE" ,
2016-09-21 07:30:24 +02:00
FETCH _RECORDS _SUCCESS : "FETCH_RECORDS_SUCCESS" , FETCH _RECORD _REQUEST : "FETCH_RECORD_REQUEST" , FETCH _RECORD _FAILURE : "FETCH_RECORD_FAILURE" , FETCH _RECORD _SUCCESS : "FETCH_RECORD_SUCCESS" , DELETE _RECORD _REQUEST : "DELETE_RECORD_REQUEST" ,
2017-01-04 22:03:43 +01:00
DELETE _RECORD _FAILURE : "DELETE_RECORD_FAILURE" , DELETE _RECORD _SUCCESS : "DELETE_RECORD_SUCCESS" } } , function ( e , t , n ) { ( function ( t ) { e . exports = t . GridFieldCell = n ( 122 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
( function ( t ) { e . exports = t . GridFieldHeader = n ( 119 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { ( function ( t ) { e . exports = t . GridFieldHeaderCell = n ( 121 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
( function ( t ) { e . exports = t . GridFieldRow = n ( 120 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { ( function ( t ) { e . exports = t . GridFieldTable = n ( 118 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { ( function ( t ) {
e . exports = t . HiddenField = n ( 132 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 21 ) , p = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "getInputProps" , value : function e ( ) { return { bsClass : this . props . bsClass , componentClass : "input" ,
className : this . props . className + " " + this . props . extraClass , id : this . props . id , name : this . props . name , type : "hidden" , value : this . props . value } } } , { key : "render" , value : function e ( ) { return u . default . createElement ( f . FormControl , this . getInputProps ( ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ] ) , t } ( d . default )
p . propTypes = { id : u . default . PropTypes . string , extraClass : u . default . PropTypes . string , name : u . default . PropTypes . string . isRequired , value : u . default . PropTypes . any } , p . defaultProps = { className : "" , extraClass : "" , value : ""
} , t . default = p } , function ( e , t , n ) { ( function ( t ) { e . exports = t . TextField = n ( 134 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
2016-09-29 22:10:02 +02:00
value : ! 0 } ) , t . TextField = void 0
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = n ( 135 ) , h = r ( p ) , m = n ( 21 ) , g = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleChange = n . handleChange . bind ( n ) , n } return a ( t , e ) , l ( t , [ { key : "render" , value : function e ( ) { var t = null
return t = this . props . readOnly ? c . default . createElement ( m . FormControl . Static , this . getInputProps ( ) , this . props . value ) : c . default . createElement ( m . FormControl , this . getInputProps ( ) ) } } , { key : "getInputProps" , value : function e ( ) {
var t = { bsClass : this . props . bsClass , className : this . props . className + " " + this . props . extraClass , id : this . props . id , name : this . props . name , disabled : this . props . disabled , readOnly : this . props . readOnly }
return this . props . readOnly || ( s ( t , { placeholder : this . props . placeholder , onChange : this . handleChange , value : this . props . value } ) , this . isMultiline ( ) ? s ( t , { componentClass : "textarea" , rows : this . props . data . rows , cols : this . props . data . columns
} ) : s ( t , { componentClass : "input" , type : this . props . type . toLowerCase ( ) } ) ) , t } } , { key : "isMultiline" , value : function e ( ) { return this . props . data && this . props . data . rows > 1 } } , { key : "handleChange" , value : function e ( t ) { "function" == typeof this . props . onChange && this . props . onChange ( t , {
id : this . props . id , value : t . target . value } ) } } ] ) , t } ( f . default )
g . propTypes = { extraClass : c . default . PropTypes . string , id : c . default . PropTypes . string , name : c . default . PropTypes . string . isRequired , onChange : c . default . PropTypes . func , value : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . string , c . default . PropTypes . number ] ) ,
readOnly : c . default . PropTypes . bool , disabled : c . default . PropTypes . bool , placeholder : c . default . PropTypes . string , type : c . default . PropTypes . string } , g . defaultProps = { value : "" , extraClass : "" , className : "" , type : "text"
} , t . TextField = g , t . default = ( 0 , h . default ) ( g ) } , function ( e , t ) { e . exports = FieldHolder } , function ( e , t , n ) { ( function ( t ) { e . exports = t . LiteralField = n ( 137 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-12-14 21:19:11 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , l ( t , [ { key : "getContent" , value : function e ( ) { return { _ _html : this . props . value } } } , { key : "getInputProps" ,
value : function e ( ) { return { className : this . props . className + " " + this . props . extraClass , id : this . props . id , name : this . props . name } } } , { key : "render" , value : function e ( ) { return c . default . createElement ( "div" , s ( { } , this . getInputProps ( ) , {
dangerouslySetInnerHTML : this . getContent ( ) } ) ) } } ] ) , t } ( f . default )
p . propTypes = { id : c . default . PropTypes . string , name : c . default . PropTypes . string . isRequired , extraClass : c . default . PropTypes . string , value : c . default . PropTypes . string } , p . defaultProps = { extraClass : "" , className : "" } ,
t . default = p } , function ( e , t , n ) { ( function ( t ) { e . exports = t . Toolbar = n ( 139 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-12-14 21:19:11 +01:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleBackButtonClick = n . handleBackButtonClick . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = [ "btn" , "btn-secondary" , "action" , "font-icon-left-open-big" , "toolbar__back-button" , "btn--no-text" ] , n = {
className : t . join ( " " ) , onClick : this . handleBackButtonClick , href : "#" , type : "button" }
return u . default . createElement ( "div" , { className : "toolbar toolbar--north" } , u . default . createElement ( "div" , { className : "toolbar__navigation fill-width" } , this . props . showBackButton && u . default . createElement ( "button" , n ) , this . props . children ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "handleBackButtonClick" , value : function e ( t ) { return "undefined" != typeof this . props . handleBackButtonClick ? void this . props . handleBackButtonClick ( t ) : void t . preventDefault ( ) } } ] ) , t } ( d . default )
f . propTypes = { handleBackButtonClick : u . default . PropTypes . func , showBackButton : u . default . PropTypes . bool , breadcrumbs : u . default . PropTypes . array } , f . defaultProps = { showBackButton : ! 1 } , t . default = f } , function ( e , t , n ) {
2017-01-04 22:03:43 +01:00
( function ( t ) { e . exports = t . Breadcrumb = n ( 141 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-11-22 03:18:26 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function s ( e ) { return { crumbs : e . breadcrumbs
} } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . Breadcrumb = void 0
2017-02-28 04:01:13 +01:00
var l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = n ( 106 ) , h = n ( 142 ) , m = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , l ( t , [ { key : "getLastCrumb" , value : function e ( ) { return this . props . crumbs && this . props . crumbs [ this . props . crumbs . length - 1 ]
} } , { key : "renderBreadcrumbs" , value : function e ( ) { return this . props . crumbs ? this . props . crumbs . slice ( 0 , - 1 ) . map ( function ( e , t ) { return c . default . createElement ( "li" , { key : t , className : "breadcrumb__item" } , c . default . createElement ( h . Link , {
className : "breadcrumb__item-title" , to : e . href , onClick : e . onClick } , e . text ) ) } ) . concat ( [ c . default . createElement ( "li" , { key : this . props . crumbs . length - 1 , className : "breadcrumb__item" } ) ] ) : null } } , { key : "renderLastCrumb" ,
value : function e ( ) { var t = this . getLastCrumb ( )
if ( ! t ) return null
var n = [ "breadcrumb__icon" ]
return t . icon && n . push ( t . icon . className ) , c . default . createElement ( "div" , { className : "breadcrumb__item breadcrumb__item--last" } , c . default . createElement ( "h2" , { className : "breadcrumb__item-title" } , t . text , t . icon && c . default . createElement ( "span" , {
className : n . join ( " " ) , onClick : t . icon . action } ) ) ) } } , { key : "render" , value : function e ( ) { return c . default . createElement ( "div" , { className : "breadcrumb__container fill-height flexbox-area-grow" } , c . default . createElement ( "ol" , {
className : "breadcrumb" } , this . renderBreadcrumbs ( ) ) , this . renderLastCrumb ( ) ) } } ] ) , t } ( f . default )
m . propTypes = { crumbs : c . default . PropTypes . array } , t . Breadcrumb = m , t . default = ( 0 , p . connect ) ( s ) ( m ) } , function ( e , t ) { e . exports = ReactRouter } , function ( e , t , n ) { ( function ( t ) { e . exports = t . BreadcrumbsActions = n ( 144 ) } ) . call ( t , function ( ) {
return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e ) { return { type : a . default . SET _BREADCRUMBS , payload : { breadcrumbs : e } } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . setBreadcrumbs = i
2017-02-28 04:01:13 +01:00
var o = n ( 145 ) , a = r ( o ) } , function ( e , t ) { "use strict"
2017-03-09 23:47:09 +01:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . default = { SET _BREADCRUMBS : "SET_BREADCRUMBS" } } , function ( e , t , n ) { ( function ( t ) { e . exports = t . Badge = n ( 147 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) {
2016-09-21 07:30:24 +02:00
"use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var i = n ( 5 ) , o = r ( i ) , a = function e ( t ) { var n = t . status , r = t . message , i = t . className
return n ? o . default . createElement ( "span" , { className : ( i || "" ) + " label label-" + n + " label-pill" } , r ) : null }
a . propTypes = { message : i . PropTypes . node , status : i . PropTypes . oneOf ( [ "default" , "info" , "success" , "warning" , "danger" , "primary" , "secondary" ] ) , className : i . PropTypes . string } , t . default = a } , function ( e , t , n ) { ( function ( t ) {
2017-02-19 23:34:18 +01:00
e . exports = t . Config = n ( 149 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t ) { "use strict"
2016-09-21 07:30:24 +02:00
function n ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var r = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , i = function ( ) { function e ( ) {
2017-03-09 23:47:09 +01:00
n ( this , e ) } return r ( e , null , [ { key : "get" , value : function e ( t ) { return window . ss . config [ t ] } } , { key : "getAll" , value : function e ( ) { return window . ss . config } } , { key : "getSection" , value : function e ( t ) { return window . ss . config . sections [ t ]
2016-09-21 07:30:24 +02:00
} } ] ) , e } ( )
2017-03-09 23:47:09 +01:00
t . default = i } , function ( e , t , n ) { ( function ( t ) { e . exports = t . DataFormat = n ( 151 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e ) { return c . default . parse ( e . replace ( /^\?/ , "" ) ) } function o ( e ) { var t = null , n = ""
2016-12-09 03:20:40 +01:00
return e < 1024 ? ( t = e , n = "bytes" ) : e < 10240 ? ( t = Math . round ( e / 1024 * 10 ) / 10 , n = "KB" ) : e < 1048576 ? ( t = Math . round ( e / 1024 ) , n = "KB" ) : e < 10485760 ? ( t = Math . round ( e / 1024 * 1024 * 10 ) / 10 , n = "MB" ) : e < 1073741824 && ( t = Math . round ( e / 1024 * 1024 ) ,
2017-03-09 23:47:09 +01:00
n = "MB" ) , ( t || 0 === t ) && n || ( t = Math . round ( e / 1073741824 * 10 ) / 10 , n = "GB" ) , isNaN ( t ) ? l . default . _t ( "File.NO_SIZE" , "N/A" ) : t + " " + n } function a ( e ) { return /[.]/ . exec ( e ) ? e . replace ( /^.+[.]/ , "" ) : "" } Object . defineProperty ( t , "__esModule" , {
2017-02-28 04:01:13 +01:00
value : ! 0 } ) , t . decodeQuery = i , t . fileSize = o , t . getFileExtension = a
var s = n ( 114 ) , l = r ( s ) , u = n ( 13 ) , c = r ( u ) } , function ( e , t , n ) { ( function ( t ) { e . exports = t . ReducerRegister = n ( 153 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t ) { "use strict"
2016-09-21 07:30:24 +02:00
function n ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var r = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , i = { } , o = function ( ) { function e ( ) {
2017-03-09 23:47:09 +01:00
n ( this , e ) } return r ( e , [ { key : "add" , value : function e ( t , n ) { if ( "undefined" != typeof i [ t ] ) throw new Error ( "Reducer already exists at '" + t + "'" )
i [ t ] = n } } , { key : "getAll" , value : function e ( ) { return i } } , { key : "getByKey" , value : function e ( t ) { return i [ t ] } } , { key : "remove" , value : function e ( t ) { delete i [ t ] } } ] ) , e } ( )
window . ss = window . ss || { } , window . ss . reducerRegister = window . ss . reducerRegister || new o , t . default = window . ss . reducerRegister } , function ( e , t , n ) { ( function ( t ) { e . exports = t . ReactRouteRegister = n ( 155 ) } ) . call ( t , function ( ) {
2016-09-21 07:30:24 +02:00
return this } ( ) ) } , function ( e , t ) { "use strict"
function n ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var r = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , i = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , o = function ( ) { function e ( ) {
2017-03-09 23:47:09 +01:00
n ( this , e ) , this . reset ( ) } return i ( e , [ { key : "reset" , value : function e ( ) { var t = this
this . childRoutes = [ ] , this . rootRoute = { path : "/" , getChildRoutes : function e ( n , r ) { r ( null , t . childRoutes ) } } } } , { key : "updateRootRoute" , value : function e ( t ) { this . rootRoute = r ( { } , this . rootRoute , t ) } } , { key : "add" , value : function e ( t ) {
var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : [ ] , i = this . findChildRoute ( n ) , o = r ( { } , { childRoutes : [ ] } , t ) , a = o . childRoutes [ o . childRoutes . length - 1 ]
a && "**" === a . path || ( a = { path : "**" } , o . childRoutes . push ( a ) )
var s = i . findIndex ( function ( e ) { return e . path === t . path } )
s >= 0 ? i [ s ] = o : i . unshift ( o ) } } , { key : "findChildRoute" , value : function e ( t ) { var n = this . childRoutes
return t && t . forEach ( function ( e ) { var t = n . find ( function ( t ) { return t . path === e } )
if ( ! t ) throw new Error ( "Parent path " + e + " could not be found." )
n = t . childRoutes } ) , n } } , { key : "getRootRoute" , value : function e ( ) { return this . rootRoute } } , { key : "getChildRoutes" , value : function e ( ) { return this . childRoutes } } , { key : "remove" , value : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : [ ] , r = this . findChildRoute ( n ) , i = r . findIndex ( function ( e ) {
return e . path === t } )
return i < 0 ? null : r . splice ( i , 1 ) [ 0 ] } } ] ) , e } ( )
window . ss = window . ss || { } , window . ss . routeRegister = window . ss . routeRegister || new o , t . default = window . ss . routeRegister } , function ( e , t , n ) { ( function ( t ) { e . exports = t . Injector = n ( 103 ) } ) . call ( t , function ( ) { return this
2016-09-21 07:30:24 +02:00
2017-02-19 23:34:18 +01:00
} ( ) ) } , function ( e , t , n ) { ( function ( t ) { e . exports = t . Router = n ( 158 ) } ) . call ( t , function ( ) { return this } ( ) ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e ) { var t = c . default . getAbsoluteBase ( ) , n = f . default . resolve ( t , e )
return 0 !== n . indexOf ( t ) ? n : n . substring ( t . length - 1 ) } function o ( e ) { return function ( t , n , r , i ) { return e ( c . default . resolveURLToBase ( t ) , n , r , i ) } } function a ( e ) { var t = new c . default . Route ( e )
return t . match ( c . default . current , { } ) } function s ( ) { return c . default . absoluteBaseURL } function l ( e ) { c . default . absoluteBaseURL = e
2016-09-21 07:30:24 +02:00
var t = document . createElement ( "a" )
t . href = e
var n = t . pathname
2017-03-09 23:47:09 +01:00
n = n . replace ( /\/$/ , "" ) , n . match ( /^[^\/]/ ) && ( n = "/" + n ) , c . default . base ( n ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var u = n ( 159 ) , c = r ( u ) , d = n ( 160 ) , f = r ( d )
2017-03-09 23:47:09 +01:00
c . default . oldshow || ( c . default . oldshow = c . default . show ) , c . default . setAbsoluteBase = l . bind ( c . default ) , c . default . getAbsoluteBase = s . bind ( c . default ) , c . default . resolveURLToBase = i . bind ( c . default ) , c . default . show = o ( c . default . oldshow ) ,
c . default . routeAppliesToCurrentLocation = a , window . ss = window . ss || { } , window . ss . router = window . ss . router || c . default , t . default = window . ss . router } , function ( e , t ) { e . exports = Page } , function ( e , t , n ) { "use strict"
2017-02-28 04:01:13 +01:00
function r ( ) { this . protocol = null , this . slashes = null , this . auth = null , this . host = null , this . port = null , this . hostname = null , this . hash = null , this . search = null , this . query = null , this . pathname = null , this . path = null , this . href = null
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
} function i ( e , t , n ) { if ( e && u . isObject ( e ) && e instanceof r ) return e
var i = new r
return i . parse ( e , t , n ) , i } function o ( e ) { return u . isString ( e ) && ( e = i ( e ) ) , e instanceof r ? e . format ( ) : r . prototype . format . call ( e ) } function a ( e , t ) { return i ( e , ! 1 , ! 0 ) . resolve ( t ) } function s ( e , t ) { return e ? i ( e , ! 1 , ! 0 ) . resolveObject ( t ) : t
2016-09-21 07:30:24 +02:00
2017-02-19 23:34:18 +01:00
} var l = n ( 161 ) , u = n ( 162 )
2017-02-28 04:01:13 +01:00
t . parse = i , t . resolve = a , t . resolveObject = s , t . format = o , t . Url = r
2017-03-09 23:47:09 +01:00
var c = /^([a-z0-9.+-]+:)/i , d = /:[0-9]*$/ , f = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/ , p = [ "<" , ">" , '"' , "`" , " " , "\r" , "\n" , "\t" ] , h = [ "{" , "}" , "|" , "\\" , "^" , "`" ] . concat ( p ) , m = [ "'" ] . concat ( h ) , g = [ "%" , "/" , "?" , ";" , "#" ] . concat ( m ) , y = [ "/" , "?" , "#" ] , v = 255 , b = /^[+a-z0-9A-Z_-]{0,63}$/ , _ = /^([+a-z0-9A-Z_-]{0,63})(.*)$/ , w = {
2017-02-28 04:01:13 +01:00
javascript : ! 0 , "javascript:" : ! 0 } , C = { javascript : ! 0 , "javascript:" : ! 0 } , T = { http : ! 0 , https : ! 0 , ftp : ! 0 , gopher : ! 0 , file : ! 0 , "http:" : ! 0 , "https:" : ! 0 , "ftp:" : ! 0 , "gopher:" : ! 0 , "file:" : ! 0 } , P = n ( 163 )
r . prototype . parse = function ( e , t , n ) { if ( ! u . isString ( e ) ) throw new TypeError ( "Parameter 'url' must be a string, not " + typeof e )
var r = e . indexOf ( "?" ) , i = r !== - 1 && r < e . indexOf ( "#" ) ? "?" : "#" , o = e . split ( i ) , a = /\\/g
o [ 0 ] = o [ 0 ] . replace ( a , "/" ) , e = o . join ( i )
2016-09-21 07:30:24 +02:00
var s = e
2017-01-26 05:20:08 +01:00
if ( s = s . trim ( ) , ! n && 1 === e . split ( "#" ) . length ) { var d = f . exec ( s )
2017-02-28 04:01:13 +01:00
if ( d ) return this . path = s , this . href = s , this . pathname = d [ 1 ] , d [ 2 ] ? ( this . search = d [ 2 ] , t ? this . query = P . parse ( this . search . substr ( 1 ) ) : this . query = this . search . substr ( 1 ) ) : t && ( this . search = "" , this . query = { } ) , this } var p = c . exec ( s )
2016-09-21 07:30:24 +02:00
if ( p ) { p = p [ 0 ]
var h = p . toLowerCase ( )
2017-02-28 04:01:13 +01:00
this . protocol = h , s = s . substr ( p . length ) } if ( n || p || s . match ( /^\/\/[^@\/]+@[^@\/]+/ ) ) { var E = "//" === s . substr ( 0 , 2 )
2017-03-09 23:47:09 +01:00
! E || p && C [ p ] || ( s = s . substr ( 2 ) , this . slashes = ! 0 ) } if ( ! C [ p ] && ( E || p && ! T [ p ] ) ) { for ( var k = - 1 , O = 0 ; O < y . length ; O ++ ) { var S = s . indexOf ( y [ O ] )
S !== - 1 && ( k === - 1 || S < k ) && ( k = S ) } var j , x
x = k === - 1 ? s . lastIndexOf ( "@" ) : s . lastIndexOf ( "@" , k ) , x !== - 1 && ( j = s . slice ( 0 , x ) , s = s . slice ( x + 1 ) , this . auth = decodeURIComponent ( j ) ) , k = - 1
for ( var O = 0 ; O < g . length ; O ++ ) { var S = s . indexOf ( g [ O ] )
S !== - 1 && ( k === - 1 || S < k ) && ( k = S ) } k === - 1 && ( k = s . length ) , this . host = s . slice ( 0 , k ) , s = s . slice ( k ) , this . parseHost ( ) , this . hostname = this . hostname || ""
2016-09-21 07:30:24 +02:00
var R = "[" === this . hostname [ 0 ] && "]" === this . hostname [ this . hostname . length - 1 ]
2017-03-09 23:47:09 +01:00
if ( ! R ) for ( var I = this . hostname . split ( /\./ ) , O = 0 , A = I . length ; O < A ; O ++ ) { var D = I [ O ]
if ( D && ! D . match ( b ) ) { for ( var M = "" , F = 0 , N = D . length ; F < N ; F ++ ) M += D . charCodeAt ( F ) > 127 ? "x" : D [ F ]
if ( ! M . match ( b ) ) { var L = I . slice ( 0 , O ) , U = I . slice ( O + 1 ) , B = D . match ( _ )
2017-02-28 04:01:13 +01:00
B && ( L . push ( B [ 1 ] ) , U . unshift ( B [ 2 ] ) ) , U . length && ( s = "/" + U . join ( "." ) + s ) , this . hostname = L . join ( "." )
2017-03-09 23:47:09 +01:00
break } } } this . hostname . length > v ? this . hostname = "" : this . hostname = this . hostname . toLowerCase ( ) , R || ( this . hostname = l . toASCII ( this . hostname ) )
2016-11-24 00:00:46 +01:00
var H = this . port ? ":" + this . port : "" , $ = this . hostname || ""
2017-03-09 23:47:09 +01:00
this . host = $ + H , this . href += this . host , R && ( this . hostname = this . hostname . substr ( 1 , this . hostname . length - 2 ) , "/" !== s [ 0 ] && ( s = "/" + s ) ) } if ( ! w [ h ] ) for ( var O = 0 , A = m . length ; O < A ; O ++ ) { var q = m [ O ]
2017-01-13 05:05:55 +01:00
if ( s . indexOf ( q ) !== - 1 ) { var V = encodeURIComponent ( q )
V === q && ( V = escape ( q ) ) , s = s . split ( q ) . join ( V ) } } var G = s . indexOf ( "#" )
2016-09-21 07:30:24 +02:00
G !== - 1 && ( this . hash = s . substr ( G ) , s = s . slice ( 0 , G ) )
2016-10-10 10:05:32 +02:00
var z = s . indexOf ( "?" )
2017-02-28 04:01:13 +01:00
if ( z !== - 1 ? ( this . search = s . substr ( z ) , this . query = s . substr ( z + 1 ) , t && ( this . query = P . parse ( this . query ) ) , s = s . slice ( 0 , z ) ) : t && ( this . search = "" , this . query = { } ) , s && ( this . pathname = s ) , T [ h ] && this . hostname && ! this . pathname && ( this . pathname = "/" ) ,
this . pathname || this . search ) { var H = this . pathname || "" , X = this . search || ""
this . path = H + X } return this . href = this . format ( ) , this } , r . prototype . format = function ( ) { var e = this . auth || ""
2016-09-21 07:30:24 +02:00
e && ( e = encodeURIComponent ( e ) , e = e . replace ( /%3A/i , ":" ) , e += "@" )
2017-02-28 04:01:13 +01:00
var t = this . protocol || "" , n = this . pathname || "" , r = this . hash || "" , i = ! 1 , o = ""
this . host ? i = e + this . host : this . hostname && ( i = e + ( this . hostname . indexOf ( ":" ) === - 1 ? this . hostname : "[" + this . hostname + "]" ) , this . port && ( i += ":" + this . port ) ) , this . query && u . isObject ( this . query ) && Object . keys ( this . query ) . length && ( o = P . stringify ( this . query ) )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
var a = this . search || o && "?" + o || ""
return t && ":" !== t . substr ( - 1 ) && ( t += ":" ) , this . slashes || ( ! t || T [ t ] ) && i !== ! 1 ? ( i = "//" + ( i || "" ) , n && "/" !== n . charAt ( 0 ) && ( n = "/" + n ) ) : i || ( i = "" ) , r && "#" !== r . charAt ( 0 ) && ( r = "#" + r ) , a && "?" !== a . charAt ( 0 ) && ( a = "?" + a ) , n = n . replace ( /[?#]/g , function ( e ) {
return encodeURIComponent ( e ) } ) , a = a . replace ( "#" , "%23" ) , t + i + n + a + r } , r . prototype . resolve = function ( e ) { return this . resolveObject ( i ( e , ! 1 , ! 0 ) ) . format ( ) } , r . prototype . resolveObject = function ( e ) { if ( u . isString ( e ) ) {
var t = new r
t . parse ( e , ! 1 , ! 0 ) , e = t } for ( var n = new r , i = Object . keys ( this ) , o = 0 ; o < i . length ; o ++ ) { var a = i [ o ]
n [ a ] = this [ a ] } if ( n . hash = e . hash , "" === e . href ) return n . href = n . format ( ) , n
2017-01-26 05:20:08 +01:00
if ( e . slashes && ! e . protocol ) { for ( var s = Object . keys ( e ) , l = 0 ; l < s . length ; l ++ ) { var c = s [ l ]
"protocol" !== c && ( n [ c ] = e [ c ] ) } return T [ n . protocol ] && n . hostname && ! n . pathname && ( n . path = n . pathname = "/" ) , n . href = n . format ( ) , n } if ( e . protocol && e . protocol !== n . protocol ) { if ( ! T [ e . protocol ] ) { for ( var d = Object . keys ( e ) , f = 0 ; f < d . length ; f ++ ) {
var p = d [ f ]
2016-09-21 07:30:24 +02:00
n [ p ] = e [ p ] } return n . href = n . format ( ) , n } if ( n . protocol = e . protocol , e . host || C [ e . protocol ] ) n . pathname = e . pathname
else { for ( var h = ( e . pathname || "" ) . split ( "/" ) ; h . length && ! ( e . host = h . shift ( ) ) ; ) ; e . host || ( e . host = "" ) , e . hostname || ( e . hostname = "" ) , "" !== h [ 0 ] && h . unshift ( "" ) , h . length < 2 && h . unshift ( "" ) , n . pathname = h . join ( "/" ) } if ( n . search = e . search ,
n . query = e . query , n . host = e . host || "" , n . auth = e . auth , n . hostname = e . hostname || e . host , n . port = e . port , n . pathname || n . search ) { var m = n . pathname || "" , g = n . search || ""
2017-03-09 23:47:09 +01:00
n . path = m + g } return n . slashes = n . slashes || e . slashes , n . href = n . format ( ) , n } var y = n . pathname && "/" === n . pathname . charAt ( 0 ) , v = e . host || e . pathname && "/" === e . pathname . charAt ( 0 ) , b = v || y || n . host && e . pathname , _ = b , w = n . pathname && n . pathname . split ( "/" ) || [ ] , h = e . pathname && e . pathname . split ( "/" ) || [ ] , P = n . protocol && ! T [ n . protocol ]
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
if ( P && ( n . hostname = "" , n . port = null , n . host && ( "" === w [ 0 ] ? w [ 0 ] = n . host : w . unshift ( n . host ) ) , n . host = "" , e . protocol && ( e . hostname = null , e . port = null , e . host && ( "" === h [ 0 ] ? h [ 0 ] = e . host : h . unshift ( e . host ) ) , e . host = null ) , b = b && ( "" === h [ 0 ] || "" === w [ 0 ] ) ) ,
v ) n . host = e . host || "" === e . host ? e . host : n . host , n . hostname = e . hostname || "" === e . hostname ? e . hostname : n . hostname , n . search = e . search , n . query = e . query , w = h
2016-12-12 03:25:18 +01:00
else if ( h . length ) w || ( w = [ ] ) , w . pop ( ) , w = w . concat ( h ) , n . search = e . search , n . query = e . query
2017-02-28 04:01:13 +01:00
else if ( ! u . isNullOrUndefined ( e . search ) ) { if ( P ) { n . hostname = n . host = w . shift ( )
var E = ! ! ( n . host && n . host . indexOf ( "@" ) > 0 ) && n . host . split ( "@" )
E && ( n . auth = E . shift ( ) , n . host = n . hostname = E . shift ( ) ) } return n . search = e . search , n . query = e . query , u . isNull ( n . pathname ) && u . isNull ( n . search ) || ( n . path = ( n . pathname ? n . pathname : "" ) + ( n . search ? n . search : "" ) ) , n . href = n . format ( ) ,
2016-12-12 03:25:18 +01:00
n } if ( ! w . length ) return n . pathname = null , n . search ? n . path = "/" + n . search : n . path = null , n . href = n . format ( ) , n
2017-03-09 23:47:09 +01:00
for ( var k = w . slice ( - 1 ) [ 0 ] , O = ( n . host || e . host || w . length > 1 ) && ( "." === k || ".." === k ) || "" === k , S = 0 , j = w . length ; j >= 0 ; j -- ) k = w [ j ] , "." === k ? w . splice ( j , 1 ) : ".." === k ? ( w . splice ( j , 1 ) , S ++ ) : S && ( w . splice ( j , 1 ) , S -- )
if ( ! b && ! _ ) for ( ; S -- ; S ) w . unshift ( ".." )
! b || "" === w [ 0 ] || w [ 0 ] && "/" === w [ 0 ] . charAt ( 0 ) || w . unshift ( "" ) , O && "/" !== w . join ( "/" ) . substr ( - 1 ) && w . push ( "" )
2016-12-12 01:52:42 +01:00
var x = "" === w [ 0 ] || w [ 0 ] && "/" === w [ 0 ] . charAt ( 0 )
2017-02-28 04:01:13 +01:00
if ( P ) { n . hostname = n . host = x ? "" : w . length ? w . shift ( ) : ""
var E = ! ! ( n . host && n . host . indexOf ( "@" ) > 0 ) && n . host . split ( "@" )
2017-03-09 23:47:09 +01:00
E && ( n . auth = E . shift ( ) , n . host = n . hostname = E . shift ( ) ) } return b = b || n . host && w . length , b && ! x && w . unshift ( "" ) , w . length ? n . pathname = w . join ( "/" ) : ( n . pathname = null , n . path = null ) , u . isNull ( n . pathname ) && u . isNull ( n . search ) || ( n . path = ( n . pathname ? n . pathname : "" ) + ( n . search ? n . search : "" ) ) ,
2017-02-28 04:01:13 +01:00
n . auth = e . auth || n . auth , n . slashes = n . slashes || e . slashes , n . href = n . format ( ) , n } , r . prototype . parseHost = function ( ) { var e = this . host , t = d . exec ( e )
t && ( t = t [ 0 ] , ":" !== t && ( this . port = t . substr ( 1 ) ) , e = e . substr ( 0 , e . length - t . length ) ) , e && ( this . hostname = e ) } } , function ( e , t , n ) { var r ; ( function ( e , i ) { ! function ( o ) { function a ( e ) { throw RangeError ( D [ e ] ) } function s ( e , t ) {
for ( var n = e . length , r = [ ] ; n -- ; ) r [ n ] = t ( e [ n ] )
return r } function l ( e , t ) { var n = e . split ( "@" ) , r = ""
n . length > 1 && ( r = n [ 0 ] + "@" , e = n [ 1 ] ) , e = e . replace ( A , "." )
var i = e . split ( "." ) , o = s ( i , t ) . join ( "." )
return r + o } function u ( e ) { for ( var t = [ ] , n = 0 , r = e . length , i , o ; n < r ; ) i = e . charCodeAt ( n ++ ) , i >= 55296 && i <= 56319 && n < r ? ( o = e . charCodeAt ( n ++ ) , 56320 == ( 64512 & o ) ? t . push ( ( ( 1023 & i ) << 10 ) + ( 1023 & o ) + 65536 ) : ( t . push ( i ) , n -- ) ) : t . push ( i )
2016-09-21 07:30:24 +02:00
2017-01-26 05:20:08 +01:00
return t } function c ( e ) { return s ( e , function ( e ) { var t = ""
return e > 65535 && ( e -= 65536 , t += N ( e >>> 10 & 1023 | 55296 ) , e = 56320 | 1023 & e ) , t += N ( e ) } ) . join ( "" ) } function d ( e ) { return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : T } function f ( e , t ) { return e + 22 + 75 * ( e < 26 ) - ( ( 0 != t ) << 5 ) } function p ( e , t , n ) {
2017-02-28 04:01:13 +01:00
var r = 0
2017-03-09 23:47:09 +01:00
for ( e = n ? F ( e / O ) : e >> 1 , e += F ( e / t ) ; e > M * E >> 1 ; r += T ) e = F ( e / M )
return F ( r + ( M + 1 ) * e / ( e + k ) ) } function h ( e ) { var t = [ ] , n = e . length , r , i = 0 , o = j , s = S , l , u , f , h , m , g , y , v , b
2017-02-28 04:01:13 +01:00
for ( l = e . lastIndexOf ( x ) , l < 0 && ( l = 0 ) , u = 0 ; u < l ; ++ u ) e . charCodeAt ( u ) >= 128 && a ( "not-basic" ) , t . push ( e . charCodeAt ( u ) )
2017-03-09 23:47:09 +01:00
for ( f = l > 0 ? l + 1 : 0 ; f < n ; ) { for ( h = i , m = 1 , g = T ; f >= n && a ( "invalid-input" ) , y = d ( e . charCodeAt ( f ++ ) ) , ( y >= T || y > F ( ( C - i ) / m ) ) && a ( "overflow" ) , i += y * m , v = g <= s ? P : g >= s + E ? E : g - s , ! ( y < v ) ; g += T ) b = T - v , m > F ( C / b ) && a ( "overflow" ) , m *= b
r = t . length + 1 , s = p ( i - h , r , 0 == h ) , F ( i / r ) > C - o && a ( "overflow" ) , o += F ( i / r ) , i %= r , t . splice ( i ++ , 0 , o ) } return c ( t ) } function m ( e ) { var t , n , r , i , o , s , l , c , d , h , m , g = [ ] , y , v , b , _
2017-02-28 04:01:13 +01:00
for ( e = u ( e ) , y = e . length , t = j , n = 0 , o = S , s = 0 ; s < y ; ++ s ) m = e [ s ] , m < 128 && g . push ( N ( m ) )
for ( r = i = g . length , i && g . push ( x ) ; r < y ; ) { for ( l = C , s = 0 ; s < y ; ++ s ) m = e [ s ] , m >= t && m < l && ( l = m )
2017-03-09 23:47:09 +01:00
for ( v = r + 1 , l - t > F ( ( C - n ) / v ) && a ( "overflow" ) , n += ( l - t ) * v , t = l , s = 0 ; s < y ; ++ s ) if ( m = e [ s ] , m < t && ++ n > C && a ( "overflow" ) , m == t ) { for ( c = n , d = T ; h = d <= o ? P : d >= o + E ? E : d - o , ! ( c < h ) ; d += T ) _ = c - h , b = T - h , g . push ( N ( f ( h + _ % b , 0 ) ) ) , c = F ( _ / b )
g . push ( N ( f ( c , 0 ) ) ) , o = p ( n , v , r == i ) , n = 0 , ++ r } ++ n , ++ t } return g . join ( "" ) } function g ( e ) { return l ( e , function ( e ) { return R . test ( e ) ? h ( e . slice ( 4 ) . toLowerCase ( ) ) : e } ) } function y ( e ) { return l ( e , function ( e ) { return I . test ( e ) ? "xn--" + m ( e ) : e
2017-02-28 04:01:13 +01:00
2017-03-09 23:47:09 +01:00
} ) } var v = "object" == typeof t && t && ! t . nodeType && t , b = "object" == typeof e && e && ! e . nodeType && e , _ = "object" == typeof i && i
2017-02-28 04:01:13 +01:00
_ . global !== _ && _ . window !== _ && _ . self !== _ || ( o = _ )
2017-03-09 23:47:09 +01:00
var w , C = 2147483647 , T = 36 , P = 1 , E = 26 , k = 38 , O = 700 , S = 72 , j = 128 , x = "-" , R = /^xn--/ , I = /[^\x20-\x7E]/ , A = /[\x2E\u3002\uFF0E\uFF61]/g , D = { overflow : "Overflow: input needs wider integers to process" , "not-basic" : "Illegal input >= 0x80 (not a basic code point)" ,
"invalid-input" : "Invalid input" } , M = T - P , F = Math . floor , N = String . fromCharCode , L
2017-02-28 04:01:13 +01:00
w = { version : "1.3.2" , ucs2 : { decode : u , encode : c } , decode : h , encode : m , toASCII : y , toUnicode : g } , r = function ( ) { return w } . call ( t , n , t , e ) , ! ( void 0 !== r && ( e . exports = r ) ) } ( this ) } ) . call ( t , n ( 15 ) ( e ) , function ( ) { return this } ( ) )
2016-09-21 07:30:24 +02:00
} , function ( e , t ) { "use strict"
e . exports = { isString : function ( e ) { return "string" == typeof e } , isObject : function ( e ) { return "object" == typeof e && null !== e } , isNull : function ( e ) { return null === e } , isNullOrUndefined : function ( e ) { return null == e } } } , function ( e , t , n ) {
"use strict"
2017-02-19 23:34:18 +01:00
t . decode = t . parse = n ( 164 ) , t . encode = t . stringify = n ( 165 ) } , function ( e , t ) { "use strict"
2017-02-28 04:01:13 +01:00
function n ( e , t ) { return Object . prototype . hasOwnProperty . call ( e , t ) } e . exports = function ( e , t , r , i ) { t = t || "&" , r = r || "="
var o = { }
if ( "string" != typeof e || 0 === e . length ) return o
var a = /\+/g
2016-09-21 07:30:24 +02:00
e = e . split ( t )
var s = 1e3
2017-02-28 04:01:13 +01:00
i && "number" == typeof i . maxKeys && ( s = i . maxKeys )
2016-09-21 07:30:24 +02:00
var l = e . length
s > 0 && l > s && ( l = s )
2017-02-28 04:01:13 +01:00
for ( var u = 0 ; u < l ; ++ u ) { var c = e [ u ] . replace ( a , "%20" ) , d = c . indexOf ( r ) , f , p , h , m
d >= 0 ? ( f = c . substr ( 0 , d ) , p = c . substr ( d + 1 ) ) : ( f = c , p = "" ) , h = decodeURIComponent ( f ) , m = decodeURIComponent ( p ) , n ( o , h ) ? Array . isArray ( o [ h ] ) ? o [ h ] . push ( m ) : o [ h ] = [ o [ h ] , m ] : o [ h ] = m } return o } } , function ( e , t ) { "use strict"
2016-09-21 07:30:24 +02:00
var n = function ( e ) { switch ( typeof e ) { case "string" : return e
case "boolean" : return e ? "true" : "false"
case "number" : return isFinite ( e ) ? e : ""
default : return "" } }
2017-02-28 04:01:13 +01:00
e . exports = function ( e , t , r , i ) { return t = t || "&" , r = r || "=" , null === e && ( e = void 0 ) , "object" == typeof e ? Object . keys ( e ) . map ( function ( i ) { var o = encodeURIComponent ( n ( i ) ) + r
return Array . isArray ( e [ i ] ) ? e [ i ] . map ( function ( e ) { return o + encodeURIComponent ( n ( e ) ) } ) . join ( t ) : o + encodeURIComponent ( n ( e [ i ] ) ) } ) . join ( t ) : i ? encodeURIComponent ( n ( i ) ) + r + encodeURIComponent ( n ( e ) ) : "" } } , function ( e , t , n ) {
2016-10-05 03:30:19 +02:00
"use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) , a = ( 0 , o . default ) ( window ) , s = ( 0 , o . default ) ( "html" ) , l = ( 0 , o . default ) ( "head" ) , u = { urlParseRE : /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/ ,
parseUrl : function e ( t ) { if ( "object" === o . default . type ( t ) ) return t
var n = u . urlParseRE . exec ( t || "" ) || [ ]
return { href : n [ 0 ] || "" , hrefNoHash : n [ 1 ] || "" , hrefNoSearch : n [ 2 ] || "" , domain : n [ 3 ] || "" , protocol : n [ 4 ] || "" , doubleSlash : n [ 5 ] || "" , authority : n [ 6 ] || "" , username : n [ 8 ] || "" , password : n [ 9 ] || "" , host : n [ 10 ] || "" , hostname : n [ 11 ] || "" ,
port : n [ 12 ] || "" , pathname : n [ 13 ] || "" , directory : n [ 14 ] || "" , filename : n [ 15 ] || "" , search : n [ 16 ] || "" , hash : n [ 17 ] || "" } } , makePathAbsolute : function e ( t , n ) { if ( t && "/" === t . charAt ( 0 ) ) return t
t = t || "" , n = n ? n . replace ( /^\/|(\/[^\/]*|[^\/]+)$/g , "" ) : ""
for ( var r = n ? n . split ( "/" ) : [ ] , i = t . split ( "/" ) , o = 0 ; o < i . length ; o ++ ) { var a = i [ o ]
switch ( a ) { case "." : break
case ".." : r . length && r . pop ( )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
default : r . push ( a ) } } return "/" + r . join ( "/" ) } , isSameDomain : function e ( t , n ) { return u . parseUrl ( t ) . domain === u . parseUrl ( n ) . domain } , isRelativeUrl : function e ( t ) { return "" === u . parseUrl ( t ) . protocol } , isAbsoluteUrl : function e ( t ) {
return "" !== u . parseUrl ( t ) . protocol } , makeUrlAbsolute : function e ( t , n ) { if ( ! u . isRelativeUrl ( t ) ) return t
var r = u . parseUrl ( t ) , i = u . parseUrl ( n ) , o = r . protocol || i . protocol , a = r . protocol ? r . doubleSlash : r . doubleSlash || i . doubleSlash , s = r . authority || i . authority , l = "" !== r . pathname , c = u . makePathAbsolute ( r . pathname || i . filename , i . pathname ) , d = r . search || ! l && i . search || "" , f = r . hash
return o + a + s + c + d + f } , addSearchParams : function e ( t , n ) { var r = u . parseUrl ( t ) , n = "string" == typeof n ? u . convertSearchToArray ( n ) : n , i = o . default . extend ( u . convertSearchToArray ( r . search ) , n )
return r . hrefNoSearch + "?" + o . default . param ( i ) + ( r . hash || "" ) } , getSearchParams : function e ( t ) { var n = u . parseUrl ( t )
return u . convertSearchToArray ( n . search ) } , convertSearchToArray : function e ( t ) { var n , r , i , o = { }
for ( t = t . replace ( /^\?/ , "" ) , n = t ? t . split ( "&" ) : [ ] , r = 0 ; r < n . length ; r ++ ) i = n [ r ] . split ( "=" ) , o [ decodeURIComponent ( i [ 0 ] ) ] = decodeURIComponent ( i [ 1 ] )
return o } , convertUrlToDataUrl : function e ( t ) { var n = u . parseUrl ( t )
return u . isEmbeddedPage ( n ) ? n . hash . split ( dialogHashKey ) [ 0 ] . replace ( /^#/ , "" ) : u . isSameDomain ( n , document ) ? n . hrefNoHash . replace ( document . domain , "" ) : t } , get : function e ( t ) { return void 0 === t && ( t = location . hash ) ,
u . stripHash ( t ) . replace ( /[^\/]*\.[^\/*]+$/ , "" ) } , getFilePath : function e ( t ) { var n = "&" + o . default . mobile . subPageUrlKey
return t && t . split ( n ) [ 0 ] . split ( dialogHashKey ) [ 0 ] } , set : function e ( t ) { location . hash = t } , isPath : function e ( t ) { return /\// . test ( t ) } , clean : function e ( t ) { return t . replace ( document . domain , "" ) } , stripHash : function e ( t ) {
return t . replace ( /^#/ , "" ) } , cleanHash : function e ( t ) { return u . stripHash ( t . replace ( /\?.*$/ , "" ) . replace ( dialogHashKey , "" ) ) } , isExternal : function e ( t ) { var n = u . parseUrl ( t )
return ! ( ! n . protocol || n . domain === document . domain ) } , hasProtocol : function e ( t ) { return /^(:?\w+:)/ . test ( t ) } }
o . default . path = u } , function ( e , t , n ) { ( function ( e ) { "use strict"
function t ( e ) { return e && e . _ _esModule ? e : { default : e } } var r = n ( 1 ) , i = t ( r )
n ( 169 ) , i . default . widget ( "ssui.ssdialog" , i . default . ui . dialog , { options : { iframeUrl : "" , reloadOnOpen : ! 0 , dialogExtraClass : "" , modal : ! 0 , bgiframe : ! 0 , autoOpen : ! 1 , autoPosition : ! 0 , minWidth : 500 , maxWidth : 800 , minHeight : 300 ,
maxHeight : 700 , widthRatio : . 8 , heightRatio : . 8 , resizable : ! 1 } , _create : function e ( ) { i . default . ui . dialog . prototype . _create . call ( this )
var t = this , n = ( 0 , i . default ) ( '<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>' )
n . bind ( "load" , function ( e ) { "about:blank" != ( 0 , i . default ) ( this ) . attr ( "src" ) && ( n . addClass ( "loaded" ) . show ( ) , t . _resizeIframe ( ) , t . uiDialog . removeClass ( "loading" ) ) } ) . hide ( ) , this . options . dialogExtraClass && this . uiDialog . addClass ( this . options . dialogExtraClass ) ,
this . element . append ( n ) , this . options . iframeUrl && this . element . css ( "overflow" , "hidden" ) } , open : function e ( ) { i . default . ui . dialog . prototype . open . call ( this )
var t = this , n = this . element . children ( "iframe" )
! this . options . iframeUrl || n . hasClass ( "loaded" ) && ! this . options . reloadOnOpen || ( n . hide ( ) , n . attr ( "src" , this . options . iframeUrl ) , this . uiDialog . addClass ( "loading" ) ) , ( 0 , i . default ) ( window ) . bind ( "resize.ssdialog" , function ( ) {
t . _resizeIframe ( ) } ) } , close : function e ( ) { i . default . ui . dialog . prototype . close . call ( this ) , this . uiDialog . unbind ( "resize.ssdialog" ) , ( 0 , i . default ) ( window ) . unbind ( "resize.ssdialog" ) } , _resizeIframe : function t ( ) {
var n = { } , r , o , a = this . element . children ( "iframe" )
this . options . widthRatio && ( r = ( 0 , i . default ) ( window ) . width ( ) * this . options . widthRatio , this . options . minWidth && r < this . options . minWidth ? n . width = this . options . minWidth : this . options . maxWidth && r > this . options . maxWidth ? n . width = this . options . maxWidth : n . width = r ) ,
this . options . heightRatio && ( o = ( 0 , i . default ) ( window ) . height ( ) * this . options . heightRatio , this . options . minHeight && o < this . options . minHeight ? n . height = this . options . minHeight : this . options . maxHeight && o > this . options . maxHeight ? n . height = this . options . maxHeight : n . height = o ) ,
e . isEmptyObject ( n ) || ( this . _setOptions ( n ) , a . attr ( "width" , n . width - parseFloat ( this . element . css ( "paddingLeft" ) ) - parseFloat ( this . element . css ( "paddingRight" ) ) ) , a . attr ( "height" , n . height - parseFloat ( this . element . css ( "paddingTop" ) ) - parseFloat ( this . element . css ( "paddingBottom" ) ) ) ,
this . options . autoPosition && this . _setOption ( "position" , this . options . position ) ) } } ) , i . default . widget ( "ssui.titlebar" , { _create : function e ( ) { this . originalTitle = this . element . attr ( "title" )
var t = this , n = this . options , r = n . title || this . originalTitle || " " , o = i . default . ui . dialog . getTitleId ( this . element )
2016-09-21 07:30:24 +02:00
this . element . parent ( ) . addClass ( "ui-dialog" )
2017-03-09 23:47:09 +01:00
var a = this . element . addClass ( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
if ( n . closeButton ) var s = ( 0 , i . default ) ( '<a href="#"/>' ) . addClass ( "ui-dialog-titlebar-close ui-corner-all" ) . attr ( "role" , "button" ) . hover ( function ( ) { s . addClass ( "ui-state-hover" ) } , function ( ) { s . removeClass ( "ui-state-hover" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} ) . focus ( function ( ) { s . addClass ( "ui-state-focus" ) } ) . blur ( function ( ) { s . removeClass ( "ui-state-focus" ) } ) . mousedown ( function ( e ) { e . stopPropagation ( ) } ) . appendTo ( a ) , l = ( this . uiDialogTitlebarCloseText = ( 0 , i . default ) ( "<span/>" ) ) . addClass ( "ui-icon ui-icon-closethick" ) . text ( n . closeText ) . appendTo ( s )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
var u = ( 0 , i . default ) ( "<span/>" ) . addClass ( "ui-dialog-title" ) . attr ( "id" , o ) . html ( r ) . prependTo ( a )
a . find ( "*" ) . add ( a ) . disableSelection ( ) } , destroy : function e ( ) { this . element . unbind ( ".dialog" ) . removeData ( "dialog" ) . removeClass ( "ui-dialog-content ui-widget-content" ) . hide ( ) . appendTo ( "body" ) , this . originalTitle && this . element . attr ( "title" , this . originalTitle )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , i . default . extend ( i . default . ssui . titlebar , { version : "0.0.1" , options : { title : "" , closeButton : ! 1 , closeText : "close" } , uuid : 0 , getTitleId : function e ( t ) { return "ui-dialog-title-" + ( t . attr ( "id" ) || ++ this . uuid ) } } )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} ) . call ( t , n ( 168 ) ) } , , , function ( module , exports , _ _webpack _require _ _ ) { ( function ( jQuery ) { "use strict"
function _interopRequireDefault ( e ) { return e && e . _ _esModule ? e : { default : e } } var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e
2016-09-21 07:30:24 +02:00
} , _jQuery = _ _webpack _require _ _ ( 1 ) , _jQuery2 = _interopRequireDefault ( _jQuery )
2017-02-19 23:34:18 +01:00
_ _webpack _require _ _ ( 167 )
2016-09-21 07:30:24 +02:00
var windowWidth , windowHeight
2017-03-09 23:47:09 +01:00
_jQuery2 . default . noConflict ( ) , window . ss = window . ss || { } , window . ss . debounce = function ( e , t , n ) { var r , i , o , a = function t ( ) { r = null , n || e . apply ( i , o ) }
2017-02-28 04:01:13 +01:00
return function ( ) { var s = n && ! r
2017-03-09 23:47:09 +01:00
i = this , o = arguments , clearTimeout ( r ) , r = setTimeout ( a , t ) , s && e . apply ( i , o ) } } , ( 0 , _jQuery2 . default ) ( window ) . bind ( "resize.leftandmain" , function ( e ) { ( 0 , _jQuery2 . default ) ( ".cms-container" ) . trigger ( "windowresize" ) } ) ,
_jQuery2 . default . entwine . warningLevel = _jQuery2 . default . entwine . WARN _LEVEL _BESTPRACTISE , _jQuery2 . default . entwine ( "ss" , function ( $ ) { $ ( window ) . on ( "message" , function ( e ) { var t , n = e . originalEvent , r = "object" === _typeof ( n . data ) ? n . data : JSON . parse ( n . data )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
if ( $ . path . parseUrl ( window . location . href ) . domain === $ . path . parseUrl ( n . origin ) . domain ) switch ( t = $ ( "undefined" == typeof r . target ? window : r . target ) , r . type ) { case "event" : t . trigger ( r . event , r . data )
2016-09-21 07:30:24 +02:00
break
2017-02-28 04:01:13 +01:00
case "callback" : t [ r . callback ] . call ( t , r . data ) } } )
2017-03-09 23:47:09 +01:00
var positionLoadingSpinner = function e ( ) { var t = 120 , n = $ ( ".ss-loading-screen .loading-animation" ) , r = ( $ ( window ) . height ( ) - n . height ( ) ) / 2
n . css ( "top" , r + t ) , n . show ( ) } , applyChosen = function e ( t ) { t . is ( ":visible" ) ? t . addClass ( "has-chosen" ) . chosen ( { allow _single _deselect : ! 0 , disable _search _threshold : 20 , display _disabled _options : ! 0 , width : "100%" } ) : setTimeout ( function ( ) {
t . show ( ) , e ( t ) } , 500 ) } , isSameUrl = function e ( t , n ) { var r = $ ( "base" ) . attr ( "href" )
t = $ . path . isAbsoluteUrl ( t ) ? t : $ . path . makeUrlAbsolute ( t , r ) , n = $ . path . isAbsoluteUrl ( n ) ? n : $ . path . makeUrlAbsolute ( n , r )
var i = $ . path . parseUrl ( t ) , o = $ . path . parseUrl ( n )
return i . pathname . replace ( /\/*$/ , "" ) == o . pathname . replace ( /\/*$/ , "" ) && i . search == o . search } , ajaxCompleteEvent = window . ss . debounce ( function ( ) { $ ( window ) . trigger ( "ajaxComplete" ) } , 1e3 , ! 0 )
2017-02-28 04:01:13 +01:00
$ ( window ) . bind ( "resize" , positionLoadingSpinner ) . trigger ( "resize" ) , $ ( document ) . ajaxComplete ( function ( e , t , n ) { var r = document . URL , i = t . getResponseHeader ( "X-ControllerURL" ) , o = n . url , a = null !== t . getResponseHeader ( "X-Status" ) ? t . getResponseHeader ( "X-Status" ) : t . statusText , s = t . status < 200 || t . status > 399 ? "bad" : "good" , l = [ "OK" , "success" , "HTTP/2.0 200" ]
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return null === i || isSameUrl ( r , i ) && isSameUrl ( o , i ) || window . ss . router . show ( i , { id : ( new Date ) . getTime ( ) + String ( Math . random ( ) ) . replace ( /\D/g , "" ) , pjax : t . getResponseHeader ( "X-Pjax" ) ? t . getResponseHeader ( "X-Pjax" ) : n . headers [ "X-Pjax" ]
} ) , t . getResponseHeader ( "X-Reauthenticate" ) ? void $ ( ".cms-container" ) . showLoginDialog ( ) : ( 0 !== t . status && a && $ . inArray ( a , l ) === - 1 && statusMessage ( decodeURIComponent ( a ) , s ) , void ajaxCompleteEvent ( this ) ) } ) , $ ( ".cms-container" ) . entwine ( {
2017-03-09 23:47:09 +01:00
StateChangeXHR : null , FragmentXHR : { } , StateChangeCount : 0 , LayoutOptions : { minContentWidth : 940 , minPreviewWidth : 400 , mode : "content" } , onadd : function e ( ) { return $ . browser . msie && parseInt ( $ . browser . version , 10 ) < 8 ? ( $ ( ".ss-loading-screen" ) . append ( '<p class="ss-loading-incompat-warning"><span class="notice">Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.</span></p>' ) . css ( "z-index" , $ ( ".ss-loading-screen" ) . css ( "z-index" ) + 1 ) ,
2016-09-21 07:30:24 +02:00
$ ( ".loading-animation" ) . remove ( ) , void this . _super ( ) ) : ( this . redraw ( ) , $ ( ".ss-loading-screen" ) . hide ( ) , $ ( "body" ) . removeClass ( "loading" ) , $ ( window ) . unbind ( "resize" , positionLoadingSpinner ) , this . restoreTabState ( ) ,
2017-03-09 23:47:09 +01:00
void this . _super ( ) ) } , onwindowresize : function e ( ) { this . redraw ( ) } , "from .cms-panel" : { ontoggle : function e ( ) { this . redraw ( ) } } , "from .cms-container" : { onaftersubmitform : function e ( ) { this . redraw ( ) } } , updateLayoutOptions : function e ( t ) {
var n = this . getLayoutOptions ( ) , r = ! 1
for ( var i in t ) n [ i ] !== t [ i ] && ( n [ i ] = t [ i ] , r = ! 0 )
r && this . redraw ( ) } , clearViewMode : function e ( ) { this . removeClass ( "cms-container--split-mode" ) , this . removeClass ( "cms-container--preview-mode" ) , this . removeClass ( "cms-container--content-mode" ) } , splitViewMode : function e ( ) {
this . updateLayoutOptions ( { mode : "split" } ) } , contentViewMode : function e ( ) { this . updateLayoutOptions ( { mode : "content" } ) } , previewMode : function e ( ) { this . updateLayoutOptions ( { mode : "preview" } ) } , RedrawSuppression : ! 1 ,
redraw : function e ( ) { if ( ! this . getRedrawSuppression ( ) ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) )
var t = this . setProperMode ( )
t || ( this . find ( ".cms-panel-layout" ) . redraw ( ) , this . find ( ".cms-content-fields[data-layout-type]" ) . redraw ( ) , this . find ( ".cms-edit-form[data-layout-type]" ) . redraw ( ) , this . find ( ".cms-preview" ) . redraw ( ) , this . find ( ".cms-content" ) . redraw ( ) )
} } , setProperMode : function e ( ) { var t = this . getLayoutOptions ( ) , n = t . mode
2016-10-10 10:05:32 +02:00
this . clearViewMode ( )
2017-03-09 23:47:09 +01:00
var r = this . find ( ".cms-content" ) , i = this . find ( ".cms-preview" )
if ( r . css ( { "min-width" : 0 } ) , i . css ( { "min-width" : 0 } ) , r . width ( ) + i . width ( ) >= t . minContentWidth + t . minPreviewWidth ) r . css ( { "min-width" : t . minContentWidth } ) , i . css ( { "min-width" : t . minPreviewWidth } ) , i . trigger ( "enable" )
else if ( i . trigger ( "disable" ) , "split" == n ) return i . trigger ( "forcecontent" ) , ! 0
return this . addClass ( "cms-container--" + n + "-mode" ) , ! 1 } , checkCanNavigate : function e ( t ) { var n = this . _findFragments ( t || [ "Content" ] ) , r = n . find ( ":data(changetracker)" ) . add ( n . filter ( ":data(changetracker)" ) ) , i = ! 0
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return ! r . length || ( r . each ( function ( ) { $ ( this ) . confirmUnsavedChanges ( ) || ( i = ! 1 ) } ) , i ) } , loadPanel : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : "" , r = arguments . length > 2 && void 0 !== arguments [ 2 ] ? arguments [ 2 ] : { } , i = arguments [ 3 ] , o = arguments . length > 4 && void 0 !== arguments [ 4 ] ? arguments [ 4 ] : document . URL
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
this . checkCanNavigate ( r . pjax ? r . pjax . split ( "," ) : [ "Content" ] ) && ( this . saveTabState ( ) , r . _ _forceReferer = o , i && ( r . _ _forceReload = 1 + Math . random ( ) ) , window . ss . router . show ( t , r ) ) } , reloadCurrentPanel : function e ( ) { this . loadPanel ( document . URL , null , null , ! 0 )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , submitForm : function e ( t , n , r , i ) { var o = this
n || ( n = this . find ( ".btn-toolbar :submit[name=action_save]" ) ) , n || ( n = this . find ( ".btn-toolbar :submit:first" ) ) , t . trigger ( "beforesubmitform" ) , this . trigger ( "submitform" , { form : t , button : n } ) , $ ( n ) . addClass ( "btn--loading loading" ) ,
$ ( n ) . is ( "button" ) && ( $ ( n ) . data ( "original-text" , $ ( n ) . text ( ) ) , $ ( n ) . text ( "" ) , $ ( n ) . append ( $ ( '<div class="btn__loading-icon"><span class="btn__circle btn__circle--1" /><span class="btn__circle btn__circle--2" /><span class="btn__circle btn__circle--3" /></div>' ) ) ,
$ ( n ) . css ( $ ( n ) . outerWidth ( ) + "px" ) )
var a = t . validate ( ) , s = function e ( ) { $ ( n ) . removeClass ( "btn--loading loading" ) , $ ( n ) . find ( ".btn__loading-icon" ) . remove ( ) , $ ( n ) . css ( "width" , "auto" ) , $ ( n ) . text ( $ ( n ) . data ( "original-text" ) ) }
"undefined" == typeof a || a || ( statusMessage ( "Validation failed." , "bad" ) , s ( ) )
var l = t . serializeArray ( )
return l . push ( { name : $ ( n ) . attr ( "name" ) , value : "1" } ) , l . push ( { name : "BackURL" , value : document . URL . replace ( /\/$/ , "" ) } ) , this . saveTabState ( ) , jQuery . ajax ( jQuery . extend ( { headers : { "X-Pjax" : "CurrentForm,Breadcrumbs"
} , url : t . attr ( "action" ) , data : l , type : "POST" , complete : function e ( ) { s ( ) } , success : function e ( n , i , a ) { s ( ) , t . removeClass ( "changed" ) , r && r ( n , i , a )
var u = o . handleAjaxResponse ( n , i , a )
u && u . filter ( "form" ) . trigger ( "aftersubmitform" , { status : i , xhr : a , formData : l } ) } } , i ) ) , ! 1 } , LastState : null , PauseState : ! 1 , handleStateChange : function e ( t ) { var n = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : window . history . state
2016-09-21 07:30:24 +02:00
if ( ! this . getPauseState ( ) ) { this . getStateChangeXHR ( ) && this . getStateChangeXHR ( ) . abort ( )
2017-03-09 23:47:09 +01:00
var r = this , i = n . pjax || "Content" , o = { } , a = i . split ( "," ) , s = this . _findFragments ( a )
if ( this . setStateChangeCount ( this . getStateChangeCount ( ) + 1 ) , ! this . checkCanNavigate ( ) ) { var l = this . getLastState ( )
return this . setPauseState ( ! 0 ) , l && l . path ? window . ss . router . show ( l . path ) : window . ss . router . back ( ) , void this . setPauseState ( ! 1 ) } if ( this . setLastState ( n ) , s . length < a . length && ( i = "Content" , a = [ "Content" ] , s = this . _findFragments ( a ) ) ,
this . trigger ( "beforestatechange" , { state : n , element : s } ) , o [ "X-Pjax" ] = i , "undefined" != typeof n . _ _forceReferer ) { var u = n . _ _forceReferer
try { u = decodeURI ( u ) } catch ( e ) { } finally { o [ "X-Backurl" ] = encodeURI ( u ) } } s . addClass ( "loading" )
var c = $ . ajax ( { headers : o , url : n . path || document . URL } ) . done ( function ( e , t , i ) { var o = r . handleAjaxResponse ( e , t , i , n )
r . trigger ( "afterstatechange" , { data : e , status : t , xhr : i , element : o , state : n } ) } ) . always ( function ( ) { r . setStateChangeXHR ( null ) , s . removeClass ( "loading" ) } )
return this . setStateChangeXHR ( c ) , c } } , loadFragment : function e ( t , n ) { var r = this , i , o = { } , a = $ ( "base" ) . attr ( "href" ) , s = this . getFragmentXHR ( )
return "undefined" != typeof s [ n ] && null !== s [ n ] && ( s [ n ] . abort ( ) , s [ n ] = null ) , t = $ . path . isAbsoluteUrl ( t ) ? t : $ . path . makeUrlAbsolute ( t , a ) , o [ "X-Pjax" ] = n , i = $ . ajax ( { headers : o , url : t , success : function e ( t , n , i ) { var o = r . handleAjaxResponse ( t , n , i , null )
r . trigger ( "afterloadfragment" , { data : t , status : n , xhr : i , elements : o } ) } , error : function e ( t , n , i ) { r . trigger ( "loadfragmenterror" , { xhr : t , status : n , error : i } ) } , complete : function e ( ) { var t = r . getFragmentXHR ( )
"undefined" != typeof t [ n ] && null !== t [ n ] && ( t [ n ] = null ) } } ) , s [ n ] = i , i } , handleAjaxResponse : function e ( t , n , r , i ) { var o = this , a , s , l , u , c
if ( r . getResponseHeader ( "X-Reload" ) && r . getResponseHeader ( "X-ControllerURL" ) ) { var d = $ ( "base" ) . attr ( "href" ) , f = r . getResponseHeader ( "X-ControllerURL" ) , a = $ . path . isAbsoluteUrl ( f ) ? f : $ . path . makeUrlAbsolute ( f , d )
return void ( document . location . href = a ) } if ( t ) { var p = r . getResponseHeader ( "X-Title" )
p && ( document . title = decodeURIComponent ( p . replace ( /\+/g , " " ) ) )
var h = { } , m
r . getResponseHeader ( "Content-Type" ) . match ( /^((text)|(application))\/json[ \t]*;?/i ) ? h = t : ( u = document . createDocumentFragment ( ) , jQuery . clean ( [ t ] , document , u , [ ] ) , c = $ ( jQuery . merge ( [ ] , u . childNodes ) ) , l = "Content" ,
c . is ( "form" ) && ! c . is ( "[data-pjax-fragment~=Content]" ) && ( l = "CurrentForm" ) , h [ l ] = c ) , this . setRedrawSuppression ( ! 0 )
try { $ . each ( h , function ( e , t ) { var n = $ ( "[data-pjax-fragment]" ) . filter ( function ( ) { return $ . inArray ( e , $ ( this ) . data ( "pjaxFragment" ) . split ( " " ) ) != - 1 } ) , r = $ ( t )
if ( m ? m . add ( r ) : m = r , r . find ( ".cms-container" ) . length ) throw 'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops'
2017-02-28 04:01:13 +01:00
var i = n . attr ( "style" ) , o = n . parent ( ) , a = [ "east" , "west" , "center" , "north" , "south" , "column-hidden" ] , s = n . attr ( "class" ) , l = [ ]
s && ( l = $ . grep ( s . split ( " " ) , function ( e ) { return $ . inArray ( e , a ) >= 0 } ) ) , r . removeClass ( a . join ( " " ) ) . addClass ( l . join ( " " ) ) , i && r . attr ( "style" , i )
var u = r . find ( "style" ) . detach ( )
u . length && $ ( document ) . find ( "head" ) . append ( u ) , n . replaceWith ( r ) } )
2017-03-09 23:47:09 +01:00
var g = m . filter ( "form" )
g . hasClass ( "cms-tabset" ) && g . removeClass ( "cms-tabset" ) . addClass ( "cms-tabset" ) } finally { this . setRedrawSuppression ( ! 1 ) } return this . redraw ( ) , this . restoreTabState ( i && "undefined" != typeof i . tabState ? i . tabState : null ) ,
m } } , _findFragments : function e ( t ) { return $ ( "[data-pjax-fragment]" ) . filter ( function ( ) { var e , n = $ ( this ) . data ( "pjaxFragment" ) . split ( " " )
for ( e in t ) if ( $ . inArray ( t [ e ] , n ) != - 1 ) return ! 0
return ! 1 } ) } , refresh : function e ( ) { $ ( window ) . trigger ( "statechange" ) , $ ( this ) . redraw ( ) } , saveTabState : function e ( ) { if ( "undefined" != typeof window . sessionStorage && null !== window . sessionStorage ) { var t = [ ] , n = this . _tabStateUrl ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
if ( this . find ( ".cms-tabset,.ss-tabset" ) . each ( function ( e , n ) { var r = $ ( n ) . attr ( "id" )
r && $ ( n ) . data ( "tabs" ) && ( $ ( n ) . data ( "ignoreTabState" ) || $ ( n ) . getIgnoreTabState ( ) || t . push ( { id : r , selected : $ ( n ) . tabs ( "option" , "selected" ) } ) ) } ) , t ) { var r = "tabs-" + n
try { window . sessionStorage . setItem ( r , JSON . stringify ( t ) ) } catch ( e ) { if ( e . code === DOMException . QUOTA _EXCEEDED _ERR && 0 === window . sessionStorage . length ) return
throw e } } } } , restoreTabState : function e ( t ) { var n = this , r = this . _tabStateUrl ( ) , i = "undefined" != typeof window . sessionStorage && window . sessionStorage , o = i ? window . sessionStorage . getItem ( "tabs-" + r ) : null , a = ! ! o && JSON . parse ( o )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
this . find ( ".cms-tabset, .ss-tabset" ) . each ( function ( ) { var e , r , i = $ ( this ) , o = i . attr ( "id" ) , s = i . children ( "ul" ) . children ( "li.ss-tabs-force-active" )
i . data ( "tabs" ) && ( i . tabs ( "refresh" ) , s . length ? e = s . first ( ) . index ( ) : t && t [ o ] ? ( r = i . find ( t [ o ] . tabSelector ) , r . length && ( e = r . index ( ) ) ) : a && $ . each ( a , function ( t , n ) { o == n . id && ( e = n . selected ) } ) , null !== e && ( i . tabs ( "option" , "active" , e ) ,
n . trigger ( "tabstaterestored" ) ) ) } ) } , clearTabState : function e ( t ) { if ( "undefined" != typeof window . sessionStorage ) { var n = window . sessionStorage
if ( t ) n . removeItem ( "tabs-" + t )
else for ( var r = 0 ; r < n . length ; r ++ ) n . key ( r ) . match ( /^tabs-/ ) && n . removeItem ( n . key ( r ) ) } } , clearCurrentTabState : function e ( ) { this . clearTabState ( this . _tabStateUrl ( ) ) } , _tabStateUrl : function e ( ) { return window . location . href . replace ( /\?.*/ , "" ) . replace ( /#.*/ , "" ) . replace ( $ ( "base" ) . attr ( "href" ) , "" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , showLoginDialog : function e ( ) { var t = $ ( "body" ) . data ( "member-tempid" ) , n = $ ( ".leftandmain-logindialog" ) , r = "CMSSecurity/login"
n . length && n . remove ( ) , r = $ . path . addSearchParams ( r , { tempid : t , BackURL : window . location . href } ) , n = $ ( '<div class="leftandmain-logindialog"></div>' ) , n . attr ( "id" , ( new Date ) . getTime ( ) ) , n . data ( "url" , r ) , $ ( "body" ) . append ( n )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , $ ( ".leftandmain-logindialog" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) , this . ssdialog ( { iframeUrl : this . data ( "url" ) , dialogClass : "leftandmain-logindialog-dialog" , autoOpen : ! 0 , minWidth : 500 , maxWidth : 500 ,
minHeight : 370 , maxHeight : 400 , closeOnEscape : ! 1 , open : function e ( ) { $ ( ".ui-widget-overlay" ) . addClass ( "leftandmain-logindialog-overlay" ) } , close : function e ( ) { $ ( ".ui-widget-overlay" ) . removeClass ( "leftandmain-logindialog-overlay" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) } , onunmatch : function e ( ) { this . _super ( ) } , open : function e ( ) { this . ssdialog ( "open" ) } , close : function e ( ) { this . ssdialog ( "close" ) } , toggle : function e ( t ) { this . is ( ":visible" ) ? this . close ( ) : this . open ( ) } , reauthenticate : function e ( t ) {
"undefined" != typeof t . SecurityID && $ ( ":input[name=SecurityID]" ) . val ( t . SecurityID ) , "undefined" != typeof t . TempID && $ ( "body" ) . data ( "member-tempid" , t . TempID ) , this . close ( ) } } ) , $ ( "form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading" ) . entwine ( {
onmatch : function e ( ) { this . append ( '<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>' ) , this . _super ( ) } , onunmatch : function e ( ) { this . find ( ".cms-content-loading-overlay,.cms-content-loading-spinner" ) . remove ( ) ,
this . _super ( ) } } ) , $ ( ".cms .cms-panel-link" ) . entwine ( { onclick : function e ( t ) { if ( $ ( this ) . hasClass ( "external-link" ) ) return void t . stopPropagation ( )
var n = this . attr ( "href" ) , r = n && ! n . match ( /^#/ ) ? n : this . data ( "href" ) , i = { pjax : this . data ( "pjaxTarget" ) }
$ ( ".cms-container" ) . loadPanel ( r , null , i ) , t . preventDefault ( ) } } ) , $ ( ".cms .ss-ui-button-ajax" ) . entwine ( { onclick : function onclick ( e ) { $ ( this ) . removeClass ( "ui-button-text-only" ) , $ ( this ) . addClass ( "ss-ui-button-loading ui-button-text-icons" )
2016-09-21 07:30:24 +02:00
var loading = $ ( this ) . find ( ".ss-ui-loading-icon" )
loading . length < 1 && ( loading = $ ( "<span></span>" ) . addClass ( "ss-ui-loading-icon ui-button-icon-primary ui-icon" ) , $ ( this ) . prepend ( loading ) ) , loading . show ( )
var href = this . attr ( "href" ) , url = href ? href : this . data ( "href" )
jQuery . ajax ( { url : url , complete : function complete ( xmlhttp , status ) { var msg = xmlhttp . getResponseHeader ( "X-Status" ) ? xmlhttp . getResponseHeader ( "X-Status" ) : xmlhttp . responseText
try { "undefined" != typeof msg && null !== msg && eval ( msg ) } catch ( e ) { } loading . hide ( ) , $ ( ".cms-container" ) . refresh ( ) , $ ( this ) . removeClass ( "ss-ui-button-loading ui-button-text-icons" ) , $ ( this ) . addClass ( "ui-button-text-only" )
2017-03-09 23:47:09 +01:00
} , dataType : "html" } ) , e . preventDefault ( ) } } ) , $ ( ".cms .ss-ui-dialog-link" ) . entwine ( { UUID : null , onmatch : function e ( ) { this . _super ( ) , this . setUUID ( ( new Date ) . getTime ( ) ) } , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( ) {
2016-09-21 07:30:24 +02:00
this . _super ( )
2017-03-09 23:47:09 +01:00
var t = this , n = "ss-ui-dialog-" + this . getUUID ( ) , r = $ ( "#" + n )
r . length || ( r = $ ( '<div class="ss-ui-dialog" id="' + n + '" />' ) , $ ( "body" ) . append ( r ) )
var i = this . data ( "popupclass" ) ? this . data ( "popupclass" ) : ""
return r . ssdialog ( { iframeUrl : this . attr ( "href" ) , autoOpen : ! 0 , dialogExtraClass : i } ) , ! 1 } } ) , $ ( ".cms .field.date input.text" ) . entwine ( { onmatch : function e ( ) { var t = $ ( this ) . parents ( ".field.date:first" ) , n = t . data ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return n . showcalendar ? ( n . showOn = "button" , n . locale && $ . datepicker . regional [ n . locale ] && ( n = $ . extend ( n , $ . datepicker . regional [ n . locale ] , { } ) ) , this . prop ( "disabled" ) || this . prop ( "readonly" ) || $ ( this ) . datepicker ( n ) ,
void this . _super ( ) ) : void this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } } ) , $ ( ".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown" ) . entwine ( { onmatch : function e ( ) {
2016-09-21 07:30:24 +02:00
return this . is ( ".no-chosen" ) ? void this . _super ( ) : ( this . data ( "placeholder" ) || this . data ( "placeholder" , " " ) , this . removeClass ( "has-chosen" ) . chosen ( "destroy" ) , this . siblings ( ".chosen-container" ) . remove ( ) , applyChosen ( this ) ,
2017-03-09 23:47:09 +01:00
void this . _super ( ) ) } , onunmatch : function e ( ) { this . _super ( ) } } ) , $ ( ".cms-panel-layout" ) . entwine ( { redraw : function e ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) ) } } ) , $ ( ".cms .grid-field" ) . entwine ( {
showDetailView : function e ( t ) { var n = window . location . search . replace ( /^\?/ , "" )
n && ( t = $ . path . addSearchParams ( t , n ) ) , $ ( ".cms-container" ) . loadPanel ( t ) } } ) , $ ( ".cms-search-form" ) . entwine ( { onsubmit : function e ( t ) { var n , r
n = this . find ( ":input:not(:submit)" ) . filter ( function ( ) { var e = $ . grep ( $ ( this ) . fieldValue ( ) , function ( e ) { return e } )
return e . length } ) , r = this . attr ( "action" ) , n . length && ( r = $ . path . addSearchParams ( r , n . serialize ( ) . replace ( "+" , "%20" ) ) )
var i = this . closest ( ".cms-container" )
return i . find ( ".cms-edit-form" ) . tabs ( "select" , 0 ) , i . loadPanel ( r , "" , { } , ! 0 ) , ! 1 } } ) , $ ( ".cms-search-form button[type=reset], .cms-search-form input[type=reset]" ) . entwine ( { onclick : function e ( t ) { t . preventDefault ( )
var n = $ ( this ) . parents ( "form" )
n . clearForm ( ) , n . find ( ".dropdown select" ) . prop ( "selectedIndex" , 0 ) . trigger ( "chosen:updated" ) , n . submit ( ) } } ) , window . _panelDeferredCache = { } , $ ( ".cms-panel-deferred" ) . entwine ( { onadd : function e ( ) { this . _super ( ) ,
this . redraw ( ) } , onremove : function e ( ) { window . debug && console . log ( "saving" , this . data ( "url" ) , this ) , this . data ( "deferredNoCache" ) || ( window . _panelDeferredCache [ this . data ( "url" ) ] = this . html ( ) ) , this . _super ( ) } , redraw : function e ( ) {
2016-09-21 07:30:24 +02:00
window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) )
2017-03-09 23:47:09 +01:00
var t = this , n = this . data ( "url" )
if ( ! n ) throw 'Elements of class .cms-panel-deferred need a "data-url" attribute'
this . _super ( ) , this . children ( ) . length || ( this . data ( "deferredNoCache" ) || "undefined" == typeof window . _panelDeferredCache [ n ] ? ( this . addClass ( "loading" ) , $ . ajax ( { url : n , complete : function e ( ) { t . removeClass ( "loading" )
} , success : function e ( n , r , i ) { t . html ( n ) } } ) ) : this . html ( window . _panelDeferredCache [ n ] ) ) } } ) , $ ( ".cms-tabset" ) . entwine ( { onadd : function e ( ) { this . redrawTabs ( ) , this . _super ( ) } , onremove : function e ( ) { this . data ( "tabs" ) && this . tabs ( "destroy" ) ,
this . _super ( ) } , redrawTabs : function e ( ) { this . rewriteHashlinks ( )
var t = this . attr ( "id" ) , n = this . find ( "ul:first .ui-tabs-active" )
this . data ( "tabs" ) || this . tabs ( { active : n . index ( ) != - 1 ? n . index ( ) : 0 , beforeLoad : function e ( t , n ) { return ! 1 } , beforeActivate : function e ( t , n ) { var r = n . oldTab . find ( ".cms-panel-link" )
if ( r && 1 === r . length ) return ! 1 } , activate : function e ( t , n ) { var r = $ ( this ) . closest ( "form" ) . find ( ".btn-toolbar" )
$ ( n . newTab ) . closest ( "li" ) . hasClass ( "readonly" ) ? r . fadeOut ( ) : r . show ( ) } } ) , this . trigger ( "afterredrawtabs" ) } , rewriteHashlinks : function e ( ) { $ ( this ) . find ( "ul a" ) . each ( function ( ) { if ( $ ( this ) . attr ( "href" ) ) { var e = $ ( this ) . attr ( "href" ) . match ( /#.*/ )
e && $ ( this ) . attr ( "href" , document . location . href . replace ( /#.*/ , "" ) + e [ 0 ] ) } } ) } } ) , $ ( "#filters-button" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) , this . data ( "collapsed" , ! 0 ) , this . data ( "animating" , ! 1 ) } , onunmatch : function e ( ) {
this . _super ( ) } , showHide : function e ( ) { var t = this , n = $ ( ".cms-content-filters" ) . first ( ) , r = this . data ( "collapsed" )
r ? ( this . addClass ( "active" ) , n . css ( "display" , "block" ) ) : ( this . removeClass ( "active" ) , n . css ( "display" , "" ) ) , t . data ( "collapsed" , ! r ) } , onclick : function e ( ) { this . showHide ( ) } } ) } )
var statusMessage = function e ( t , n ) { t = jQuery ( "<div/>" ) . text ( t ) . html ( ) , jQuery . noticeAdd ( { text : t , type : n , stayTime : 5e3 , inEffect : { left : "0" , opacity : "show" } } ) } } ) . call ( exports , _ _webpack _require _ _ ( 168 ) ) } , function ( e , t , n ) {
2016-09-21 07:30:24 +02:00
"use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".ss-tabset.ss-ui-action-tabset" ) . entwine ( { IgnoreTabState : ! 0 , onadd : function e ( ) { this . _super ( ) , this . tabs ( { collapsible : ! 0 , active : ! 1 } ) } , onremove : function t ( ) { var n = e ( ".cms-container" ) . find ( "iframe" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
n . each ( function ( t , n ) { try { e ( n ) . contents ( ) . off ( "click.ss-ui-action-tabset" ) } catch ( e ) { console . warn ( "Unable to access iframe, possible https mis-match" ) } } ) , e ( document ) . off ( "click.ss-ui-action-tabset" ) , this . _super ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , ontabsbeforeactivate : function e ( t , n ) { this . riseUp ( t , n ) } , onclick : function e ( t , n ) { this . attachCloseHandler ( t , n ) } , attachCloseHandler : function t ( n , r ) { var i = this , o = e ( ".cms-container" ) . find ( "iframe" ) , a
a = function t ( n ) { var r , o
r = e ( n . target ) . closest ( ".ss-ui-action-tabset .ui-tabs-panel" ) , e ( n . target ) . closest ( i ) . length || r . length || ( i . tabs ( "option" , "active" , ! 1 ) , o = e ( ".cms-container" ) . find ( "iframe" ) , o . each ( function ( t , n ) { e ( n ) . contents ( ) . off ( "click.ss-ui-action-tabset" , a )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} ) , e ( document ) . off ( "click.ss-ui-action-tabset" , a ) ) } , e ( document ) . on ( "click.ss-ui-action-tabset" , a ) , o . length > 0 && o . each ( function ( t , n ) { e ( n ) . contents ( ) . on ( "click.ss-ui-action-tabset" , a ) } ) } , riseUp : function t ( n , r ) {
var i , o , a , s , l , u , c , d , f
return i = e ( this ) . find ( ".ui-tabs-panel" ) . outerHeight ( ) , o = e ( this ) . find ( ".ui-tabs-nav" ) . outerHeight ( ) , a = e ( window ) . height ( ) + e ( document ) . scrollTop ( ) - o , s = e ( this ) . find ( ".ui-tabs-nav" ) . offset ( ) . top , l = r . newPanel ,
u = r . newTab , s + i >= a && s - i > 0 ? ( this . addClass ( "rise-up" ) , null !== u . position ( ) && ( c = - l . outerHeight ( ) , d = l . parents ( ".toolbar--south" ) , d && ( f = u . offset ( ) . top - d . offset ( ) . top , c -= f ) , e ( l ) . css ( "top" , c + "px" ) ) ) : ( this . removeClass ( "rise-up" ) ,
null !== u . position ( ) && e ( l ) . css ( "bottom" , "100%" ) ) , ! 1 } } ) , e ( ".cms-content-actions .ss-tabset.ss-ui-action-tabset" ) . entwine ( { ontabsbeforeactivate : function t ( n , r ) { this . _super ( n , r ) , e ( r . newPanel ) . length > 0 && e ( r . newPanel ) . css ( "left" , r . newTab . position ( ) . left + "px" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , e ( ".cms-actions-row.ss-tabset.ss-ui-action-tabset" ) . entwine ( { ontabsbeforeactivate : function t ( n , r ) { this . _super ( n , r ) , e ( this ) . closest ( ".ss-ui-action-tabset" ) . removeClass ( "tabset-open tabset-open-last" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , e ( ".cms-content-fields .ss-tabset.ss-ui-action-tabset" ) . entwine ( { ontabsbeforeactivate : function t ( n , r ) { this . _super ( n , r ) , e ( r . newPanel ) . length > 0 && ( e ( r . newTab ) . hasClass ( "last" ) ? ( e ( r . newPanel ) . css ( { left : "auto" ,
right : "0px" } ) , e ( r . newPanel ) . parent ( ) . addClass ( "tabset-open-last" ) ) : ( e ( r . newPanel ) . css ( "left" , r . newTab . position ( ) . left + "px" ) , e ( r . newTab ) . hasClass ( "first" ) && ( e ( r . newPanel ) . css ( "left" , "0px" ) , e ( r . newPanel ) . parent ( ) . addClass ( "tabset-open" ) ) ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , e ( ".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset" ) . entwine ( { "from .ui-tabs-nav li" : { onhover : function t ( n ) { e ( n . target ) . parent ( ) . find ( "li .active" ) . removeClass ( "active" ) , e ( n . target ) . find ( "a" ) . addClass ( "active" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , ontabsbeforeactivate : function t ( n , r ) { this . _super ( n , r ) , e ( r . newPanel ) . css ( { left : "auto" , right : "auto" } ) , e ( r . newPanel ) . length > 0 && e ( r . newPanel ) . parent ( ) . addClass ( "tabset-open" ) } } ) } ) } , function ( e , t , n ) { "use strict"
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e . entwine . warningLevel = e . entwine . WARN _LEVEL _BESTPRACTISE , e ( ".cms-panel" ) . entwine ( { WidthExpanded : null , WidthCollapsed : null , canSetCookie : function t ( ) { return void 0 !== e . cookie && void 0 !== this . attr ( "id" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , getPersistedCollapsedState : function t ( ) { var n , r
return this . canSetCookie ( ) && ( r = e . cookie ( "cms-panel-collapsed-" + this . attr ( "id" ) ) , void 0 !== r && null !== r && ( n = "true" === r ) ) , n } , setPersistedCollapsedState : function t ( n ) { this . canSetCookie ( ) && e . cookie ( "cms-panel-collapsed-" + this . attr ( "id" ) , n , {
path : "/" , expires : 31 } ) } , clearPersistedCollapsedState : function t ( ) { this . canSetCookie ( ) && e . cookie ( "cms-panel-collapsed-" + this . attr ( "id" ) , "" , { path : "/" , expires : - 1 } ) } , getInitialCollapsedState : function e ( ) { var t = this . getPersistedCollapsedState ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return void 0 === t && ( t = this . hasClass ( "collapsed" ) ) , t } , onadd : function t ( ) { var n , r
2016-09-21 07:30:24 +02:00
if ( ! this . find ( ".cms-panel-content" ) . length ) throw new Exception ( 'Content panel for ".cms-panel" not found' )
2017-03-09 23:47:09 +01:00
this . find ( ".cms-panel-toggle" ) . length || ( r = e ( "<div class='toolbar toolbar--south cms-panel-toggle'></div>" ) . append ( '<a class="toggle-expand" href="#" data-toggle="tooltip" title="' + i18n . _t ( "LeftAndMain.EXPANDPANEL" , "Expand Panel" ) + '"><span>»</span></a>' ) . append ( '<a class="toggle-collapse" href="#" data-toggle="tooltip" title="' + i18n . _t ( "LeftAndMain.COLLAPSEPANEL" , "Collapse Panel" ) + '"><span>«</span></a>' ) ,
this . append ( r ) ) , this . setWidthExpanded ( this . find ( ".cms-panel-content" ) . innerWidth ( ) ) , n = this . find ( ".cms-panel-content-collapsed" ) , this . setWidthCollapsed ( n . length ? n . innerWidth ( ) : this . find ( ".toggle-expand" ) . innerWidth ( ) ) ,
this . togglePanel ( ! this . getInitialCollapsedState ( ) , ! 0 , ! 1 ) , this . _super ( ) } , togglePanel : function e ( t , n , r ) { var i , o
n || ( this . trigger ( "beforetoggle.sspanel" , t ) , this . trigger ( t ? "beforeexpand" : "beforecollapse" ) ) , this . toggleClass ( "collapsed" , ! t ) , i = t ? this . getWidthExpanded ( ) : this . getWidthCollapsed ( ) , this . width ( i ) , o = this . find ( ".cms-panel-content-collapsed" ) ,
o . length && ( this . find ( ".cms-panel-content" ) [ t ? "show" : "hide" ] ( ) , this . find ( ".cms-panel-content-collapsed" ) [ t ? "hide" : "show" ] ( ) ) , r !== ! 1 && this . setPersistedCollapsedState ( ! t ) , this . trigger ( "toggle" , t ) , this . trigger ( t ? "expand" : "collapse" )
} , expandPanel : function e ( t ) { ( t || this . hasClass ( "collapsed" ) ) && this . togglePanel ( ! 0 ) } , collapsePanel : function e ( t ) { ! t && this . hasClass ( "collapsed" ) || this . togglePanel ( ! 1 ) } } ) , e ( ".cms-panel.collapsed .cms-panel-toggle" ) . entwine ( {
onclick : function e ( t ) { this . expandPanel ( ) , t . preventDefault ( ) } } ) , e ( ".cms-panel *" ) . entwine ( { getPanel : function e ( ) { return this . parents ( ".cms-panel:first" ) } } ) , e ( ".cms-panel .toggle-expand" ) . entwine ( { onclick : function e ( t ) {
t . preventDefault ( ) , t . stopPropagation ( ) , this . getPanel ( ) . expandPanel ( ) , this . _super ( t ) } } ) , e ( ".cms-panel .toggle-collapse" ) . entwine ( { onclick : function e ( t ) { t . preventDefault ( ) , t . stopPropagation ( ) , this . getPanel ( ) . collapsePanel ( ) ,
this . _super ( t ) } } ) , e ( ".cms-content-tools.collapsed" ) . entwine ( { onclick : function e ( t ) { this . expandPanel ( ) , this . _super ( t ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss.tree" , function ( e ) { e ( ".cms-tree" ) . entwine ( { Hints : null , IsUpdatingTree : ! 1 , IsLoaded : ! 1 , onadd : function t ( ) { if ( this . _super ( ) , ! e . isNumeric ( this . data ( "jstree_instance_id" ) ) ) { var n = this . attr ( "data-hints" )
n && this . setHints ( e . parseJSON ( n ) )
var r = this
this . jstree ( this . getTreeConfig ( ) ) . bind ( "loaded.jstree" , function ( t , n ) { r . setIsLoaded ( ! 0 ) , n . inst . _set _settings ( { html _data : { ajax : { url : r . data ( "urlTree" ) , data : function t ( n ) { var i = r . data ( "searchparams" ) || [ ]
return i = e . grep ( i , function ( e , t ) { return "ID" != e . name && "value" != e . name } ) , i . push ( { name : "ID" , value : e ( n ) . data ( "id" ) ? e ( n ) . data ( "id" ) : 0 } ) , i . push ( { name : "ajax" , value : 1 } ) , i } } } } ) , r . updateFromEditForm ( ) , r . css ( "visibility" , "visible" ) ,
n . inst . hide _checkboxes ( ) } ) . bind ( "before.jstree" , function ( t , n ) { if ( "start_drag" == n . func && ( ! r . hasClass ( "draggable" ) || r . hasClass ( "multiselect" ) ) ) return t . stopImmediatePropagation ( ) , ! 1
if ( e . inArray ( n . func , [ "check_node" , "uncheck_node" ] ) ) { var i = e ( n . args [ 0 ] ) . parents ( "li:first" ) , o = i . find ( "li:not(.disabled)" )
if ( i . hasClass ( "disabled" ) && 0 == o ) return t . stopImmediatePropagation ( ) , ! 1 } } ) . bind ( "move_node.jstree" , function ( t , n ) { if ( ! r . getIsUpdatingTree ( ) ) { var i = n . rslt . o , o = n . rslt . np , a = n . inst . _get _parent ( i ) , s = e ( o ) . data ( "id" ) || 0 , l = e ( i ) . data ( "id" ) , u = e . map ( e ( i ) . siblings ( ) . andSelf ( ) , function ( t ) {
2016-09-21 07:30:24 +02:00
return e ( t ) . data ( "id" ) } )
2017-03-09 23:47:09 +01:00
e . ajax ( { url : e . path . addSearchParams ( r . data ( "urlSavetreenode" ) , r . data ( "extraParams" ) ) , type : "POST" , data : { ID : l , ParentID : s , SiblingIDs : u } , success : function t ( ) { e ( ".cms-edit-form :input[name=ID]" ) . val ( ) == l && e ( ".cms-edit-form :input[name=ParentID]" ) . val ( s ) ,
r . updateNodesFromServer ( [ l ] ) } , statusCode : { 403 : function t ( ) { e . jstree . rollback ( n . rlbk ) } } } ) } } ) . bind ( "select_node.jstree check_node.jstree uncheck_node.jstree" , function ( t , n ) { e ( document ) . triggerHandler ( t , n )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} ) } } , onremove : function e ( ) { this . jstree ( "destroy" ) , this . _super ( ) } , "from .cms-container" : { onafterstatechange : function e ( t ) { this . updateFromEditForm ( ) } } , "from .cms-container form" : { onaftersubmitform : function t ( n ) {
var r = e ( ".cms-edit-form :input[name=ID]" ) . val ( )
this . updateNodesFromServer ( [ r ] ) } } , getTreeConfig : function t ( ) { var n = this
return { core : { initially _open : [ "record-0" ] , animation : 0 , html _titles : ! 0 } , html _data : { } , ui : { select _limit : 1 , initially _select : [ this . find ( ".current" ) . attr ( "id" ) ] } , crrm : { move : { check _move : function t ( r ) { var i = e ( r . o ) , o = e ( r . np ) , a = r . ot . get _container ( ) [ 0 ] == r . np [ 0 ] , s = i . getClassname ( ) , l = o . getClassname ( ) , u = n . getHints ( ) , c = [ ] , d = l ? l : "Root" , f = u && "undefined" != typeof u [ d ] ? u [ d ] : null
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
f && i . attr ( "class" ) . match ( /VirtualPage-([^\s]*)/ ) && ( s = RegExp . $1 ) , f && ( c = "undefined" != typeof f . disallowedChildren ? f . disallowedChildren : [ ] )
var p = ! ( 0 === i . data ( "id" ) || i . hasClass ( "status-archived" ) || a && "inside" != r . p || o . hasClass ( "nochildren" ) || c . length && e . inArray ( s , c ) != - 1 )
2017-01-10 23:49:28 +01:00
return p } } } , dnd : { drop _target : ! 1 , drag _target : ! 1 } , checkbox : { two _state : ! 0 } , themes : { theme : "apple" , url : e ( "body" ) . data ( "frameworkpath" ) + "/admin/thirdparty/jstree/themes/apple/style.css" } , plugins : [ "html_data" , "ui" , "dnd" , "crrm" , "themes" , "checkbox" ]
2017-03-09 23:47:09 +01:00
} } , search : function e ( t , n ) { t ? this . data ( "searchparams" , t ) : this . removeData ( "searchparams" ) , this . jstree ( "refresh" , - 1 , n ) } , getNodeByID : function e ( t ) { return this . find ( "*[data-id=" + t + "]" ) } , createNode : function t ( n , r , i ) {
var o = this , a = void 0 !== r . ParentID && o . getNodeByID ( r . ParentID ) , s = e ( n ) , l = { data : "" }
s . hasClass ( "jstree-open" ) ? l . state = "open" : s . hasClass ( "jstree-closed" ) && ( l . state = "closed" ) , this . jstree ( "create_node" , a . length ? a : - 1 , "last" , l , function ( e ) { for ( var t = e . attr ( "class" ) , n = 0 ; n < s [ 0 ] . attributes . length ; n ++ ) {
var r = s [ 0 ] . attributes [ n ]
e . attr ( r . name , r . value ) } e . addClass ( t ) . html ( s . html ( ) ) , i ( e ) } ) } , updateNode : function t ( n , r , i ) { var o = this , a = e ( r ) , s = ! ! i . NextID && this . getNodeByID ( i . NextID ) , l = ! ! i . PrevID && this . getNodeByID ( i . PrevID ) , u = ! ! i . ParentID && this . getNodeByID ( i . ParentID )
e . each ( [ "id" , "style" , "class" , "data-pagetype" ] , function ( e , t ) { n . attr ( t , a . attr ( t ) ) } )
var c = n . children ( "ul" ) . detach ( )
n . html ( a . html ( ) ) . append ( c ) , s && s . length ? this . jstree ( "move_node" , n , s , "before" ) : l && l . length ? this . jstree ( "move_node" , n , l , "after" ) : this . jstree ( "move_node" , n , u . length ? u : - 1 ) } , updateFromEditForm : function t ( ) { var n , r = e ( ".cms-edit-form :input[name=ID]" ) . val ( )
r ? ( n = this . getNodeByID ( r ) , n . length ? ( this . jstree ( "deselect_all" ) , this . jstree ( "select_node" , n ) ) : this . updateNodesFromServer ( [ r ] ) ) : this . jstree ( "deselect_all" ) } , updateNodesFromServer : function t ( n ) { if ( ! this . getIsUpdatingTree ( ) && this . getIsLoaded ( ) ) {
var r = this , i , o = ! 1
this . setIsUpdatingTree ( ! 0 ) , r . jstree ( "save_selected" )
var a = function e ( t ) { r . getNodeByID ( t . data ( "id" ) ) . not ( t ) . remove ( ) , r . jstree ( "deselect_all" ) , r . jstree ( "select_node" , t ) }
r . jstree ( "open_node" , this . getNodeByID ( 0 ) ) , r . jstree ( "save_opened" ) , r . jstree ( "save_selected" ) , e . ajax ( { url : e . path . addSearchParams ( this . data ( "urlUpdatetreenodes" ) , "ids=" + n . join ( "," ) ) , dataType : "json" , success : function t ( n , i ) {
e . each ( n , function ( e , t ) { var n = r . getNodeByID ( e )
return t ? void ( n . length ? ( r . updateNode ( n , t . html , t ) , setTimeout ( function ( ) { a ( n ) } , 500 ) ) : ( o = ! 0 , t . ParentID && ! r . find ( "li[data-id=" + t . ParentID + "]" ) . length ? r . jstree ( "load_node" , - 1 , function ( ) { newNode = r . find ( "li[data-id=" + e + "]" ) ,
a ( newNode ) } ) : r . createNode ( t . html , t , function ( e ) { a ( e ) } ) ) ) : void r . jstree ( "delete_node" , n ) } ) , o || ( r . jstree ( "deselect_all" ) , r . jstree ( "reselect" ) , r . jstree ( "reopen" ) ) } , complete : function e ( ) { r . setIsUpdatingTree ( ! 1 )
} } ) } } } ) , e ( ".cms-tree.multiple" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) , this . jstree ( "show_checkboxes" ) } , onunmatch : function e ( ) { this . _super ( ) , this . jstree ( "uncheck_all" ) , this . jstree ( "hide_checkboxes" )
} , getSelectedIDs : function t ( ) { return e ( this ) . jstree ( "get_checked" ) . not ( ".disabled" ) . map ( function ( ) { return e ( this ) . data ( "id" ) } ) . get ( ) } } ) , e ( ".cms-tree li" ) . entwine ( { setEnabled : function e ( t ) { this . toggleClass ( "disabled" , ! t )
} , getClassname : function e ( ) { var t = this . attr ( "class" ) . match ( /class-([^\s]*)/i )
return t ? t [ 1 ] : "" } , getID : function e ( ) { return this . data ( "id" ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".cms-content" ) . entwine ( { onadd : function e ( ) { var t = this
this . find ( ".cms-tabset" ) . redrawTabs ( ) , this . _super ( ) } , redraw : function e ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) ) , this . add ( this . find ( ".cms-tabset" ) ) . redrawTabs ( ) , this . find ( ".cms-content-header" ) . redraw ( ) ,
this . find ( ".cms-content-actions" ) . redraw ( ) } } ) , e ( ".cms-content .cms-tree" ) . entwine ( { onadd : function t ( ) { var n = this
this . _super ( ) , this . bind ( "select_node.jstree" , function ( t , r ) { var i = r . rslt . obj , o = n . find ( ":input[name=ID]" ) . val ( ) , a = r . args [ 2 ] , s = e ( ".cms-container" )
2017-02-28 04:01:13 +01:00
if ( ! a ) return ! 1
if ( e ( i ) . hasClass ( "disabled" ) ) return ! 1
if ( e ( i ) . data ( "id" ) != o ) { var l = e ( i ) . find ( "a:first" ) . attr ( "href" )
2017-03-09 23:47:09 +01:00
l && "#" != l ? ( l = l . split ( "?" ) [ 0 ] , n . jstree ( "deselect_all" ) , n . jstree ( "uncheck_all" ) , e . path . isExternal ( e ( i ) . find ( "a:first" ) ) && ( l = l = e . path . makeUrlAbsolute ( l , e ( "base" ) . attr ( "href" ) ) ) , document . location . search && ( l = e . path . addSearchParams ( l , document . location . search . replace ( /^\?/ , "" ) ) ) ,
s . loadPanel ( l ) ) : n . removeForm ( ) } } ) } } ) , e ( ".cms-content .cms-content-fields" ) . entwine ( { redraw : function e ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) ) } } ) , e ( ".cms-content .cms-content-header, .cms-content .cms-content-actions" ) . entwine ( {
redraw : function e ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) ) , this . height ( "auto" ) , this . height ( this . innerHeight ( ) - this . css ( "padding-top" ) - this . css ( "padding-bottom" ) ) } } ) } ) } , function ( e , t , n ) {
2016-09-21 07:30:24 +02:00
( function ( e ) { "use strict"
2017-03-09 23:47:09 +01:00
function t ( e ) { return e && e . _ _esModule ? e : { default : e } } var r = n ( 1 ) , i = t ( r ) , o = n ( 114 ) , a = t ( o )
window . onbeforeunload = function ( e ) { var t = ( 0 , i . default ) ( ".cms-edit-form" )
if ( t . trigger ( "beforesubmitform" ) , t . is ( ".changed" ) && ! t . is ( ".discardchanges" ) ) return a . default . _t ( "LeftAndMain.CONFIRMUNSAVEDSHORT" ) } , i . default . entwine ( "ss" , function ( e ) { e ( ".cms-edit-form" ) . entwine ( { PlaceholderHtml : "" ,
ChangeTrackerOptions : { ignoreFieldSelector : ".no-change-track, .ss-upload :input, .cms-navigator :input" } , ValidationErrorShown : ! 1 , onadd : function e ( ) { var t = this
2016-09-21 07:30:24 +02:00
this . attr ( "autocomplete" , "off" ) , this . _setupChangeTracker ( )
2017-03-09 23:47:09 +01:00
for ( var n in { action : ! 0 , method : ! 0 , enctype : ! 0 , name : ! 0 } ) { var r = this . find ( ":input[name=_form_" + n + "]" )
r && ( this . attr ( n , r . val ( ) ) , r . remove ( ) ) } this . setValidationErrorShown ( ! 1 ) , this . _super ( ) } , "from .cms-tabset" : { onafterredrawtabs : function t ( ) { if ( this . hasClass ( "validationerror" ) ) { var n = this . find ( ".message.validation, .message.required" ) . first ( ) . closest ( ".tab" )
2016-09-21 07:30:24 +02:00
e ( ".cms-container" ) . clearCurrentTabState ( )
2017-03-09 23:47:09 +01:00
var r = n . closest ( ".ss-tabset" )
r . length || ( r = n . closest ( ".cms-tabset" ) ) , r . length ? r . tabs ( "option" , "active" , n . index ( ".tab" ) ) : this . getValidationErrorShown ( ) || ( this . setValidationErrorShown ( ! 0 ) , s ( ss . i18n . _t ( "ModelAdmin.VALIDATIONERROR" , "Validation Error" ) ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } } , onremove : function e ( ) { this . changetracker ( "destroy" ) , this . _super ( ) } , onmatch : function e ( ) { this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , redraw : function e ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) ) ,
this . add ( this . find ( ".cms-tabset" ) ) . redrawTabs ( ) , this . find ( ".cms-content-header" ) . redraw ( ) } , _setupChangeTracker : function e ( ) { this . changetracker ( this . getChangeTrackerOptions ( ) ) } , confirmUnsavedChanges : function e ( ) {
2016-09-21 07:30:24 +02:00
if ( this . trigger ( "beforesubmitform" ) , ! this . is ( ".changed" ) || this . is ( ".discardchanges" ) ) return ! 0
2017-02-27 00:22:49 +01:00
if ( this . find ( ".btn-toolbar :submit.btn--loading.loading" ) . length > 0 ) return ! 0
2017-03-09 23:47:09 +01:00
var t = confirm ( a . default . _t ( "LeftAndMain.CONFIRMUNSAVED" ) )
return t && this . addClass ( "discardchanges" ) , t } , onsubmit : function e ( t , n ) { if ( "_blank" != this . prop ( "target" ) ) return n && this . closest ( ".cms-container" ) . submitForm ( this , n ) , ! 1 } , validate : function e ( ) { var t = ! 0
return this . trigger ( "validate" , { isValid : t } ) , t } , "from .htmleditor" : { oneditorinit : function t ( n ) { var r = this , i = e ( n . target ) . closest ( ".field.htmleditor" ) , o = i . find ( "textarea.htmleditor" ) . getEditor ( ) . getInstance ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
o . onClick . add ( function ( e ) { r . saveFieldFocus ( i . attr ( "id" ) ) } ) } } , "from .cms-edit-form :input:not(:submit)" : { onclick : function t ( n ) { this . saveFieldFocus ( e ( n . target ) . attr ( "id" ) ) } , onfocus : function t ( n ) { this . saveFieldFocus ( e ( n . target ) . attr ( "id" ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , "from .cms-edit-form .treedropdown *" : { onfocusin : function t ( n ) { var r = e ( n . target ) . closest ( ".field.treedropdown" )
this . saveFieldFocus ( r . attr ( "id" ) ) } } , "from .cms-edit-form .dropdown .chosen-container a" : { onfocusin : function t ( n ) { var r = e ( n . target ) . closest ( ".field.dropdown" )
this . saveFieldFocus ( r . attr ( "id" ) ) } } , "from .cms-container" : { ontabstaterestored : function e ( t ) { this . restoreFieldFocus ( ) } } , saveFieldFocus : function t ( n ) { if ( "undefined" != typeof window . sessionStorage && null !== window . sessionStorage ) {
var r = e ( this ) . attr ( "id" ) , i = [ ]
if ( i . push ( { id : r , selected : n } ) , i ) try { window . sessionStorage . setItem ( r , JSON . stringify ( i ) ) } catch ( e ) { if ( e . code === DOMException . QUOTA _EXCEEDED _ERR && 0 === window . sessionStorage . length ) return
throw e } } } , restoreFieldFocus : function t ( ) { if ( "undefined" != typeof window . sessionStorage && null !== window . sessionStorage ) { var n = this , r = "undefined" != typeof window . sessionStorage && window . sessionStorage , i = r ? window . sessionStorage . getItem ( this . attr ( "id" ) ) : null , o = ! ! i && JSON . parse ( i ) , a , s = 0 !== this . find ( ".ss-tabset" ) . length , l , u , c , d
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
if ( r && o . length > 0 ) { if ( e . each ( o , function ( t , r ) { n . is ( "#" + r . id ) && ( a = e ( "#" + r . selected ) ) } ) , e ( a ) . length < 1 ) return void this . focusFirstInput ( )
if ( l = e ( a ) . closest ( ".ss-tabset" ) . find ( ".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor" ) . attr ( "id" ) , u = "tab-" + e ( a ) . closest ( ".ss-tabset .ui-tabs-panel" ) . attr ( "id" ) , s && u !== l ) return
c = e ( a ) . closest ( ".togglecomposite" ) , c . length > 0 && c . accordion ( "activate" , c . find ( ".ui-accordion-header" ) ) , d = e ( a ) . position ( ) . top , e ( a ) . is ( ":visible" ) || ( a = "#" + e ( a ) . closest ( ".field" ) . attr ( "id" ) , d = e ( a ) . position ( ) . top ) ,
e ( a ) . focus ( ) , d > e ( window ) . height ( ) / 2 && n . find ( ".cms-content-fields" ) . scrollTop ( d ) } else this . focusFirstInput ( ) } } , focusFirstInput : function e ( ) { this . find ( ':input:not(:submit)[data-skip-autofocus!="true"]' ) . filter ( ":visible:first" ) . focus ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , e ( ".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action" ) . entwine ( { onclick : function e ( t ) { return this . is ( ":disabled" ) ? ( t . preventDefault ( ) , ! 1 ) : this . _super ( t ) === ! 1 || t . defaultPrevented || t . isDefaultPrevented ( ) ? void 0 : ( this . parents ( "form" ) . trigger ( "submit" , [ this ] ) ,
t . preventDefault ( ) , ! 1 ) } } ) , e ( ".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel" ) . entwine ( { onclick : function e ( t ) { window . history . length > 1 ? window . history . back ( ) : this . parents ( "form" ) . trigger ( "submit" , [ this ] ) ,
t . preventDefault ( ) } } ) , e ( ".cms-edit-form .ss-tabset" ) . entwine ( { onmatch : function e ( ) { if ( ! this . hasClass ( "ss-ui-action-tabset" ) ) { var t = this . find ( "> ul:first" )
1 == t . children ( "li" ) . length && t . hide ( ) . parent ( ) . addClass ( "ss-tabset-tabshidden" ) } this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } } ) } )
var s = function t ( n ) { e . noticeAdd ( { text : n , type : "error" , stayTime : 5e3 , inEffect : { left : "0" , opacity : "show" } } ) } } ) . call ( t , n ( 168 ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".cms-panel.cms-menu" ) . entwine ( { togglePanel : function t ( n , r , i ) { e ( ".cms-menu-list" ) . children ( "li" ) . each ( function ( ) { n ? e ( this ) . children ( "ul" ) . each ( function ( ) { e ( this ) . removeClass ( "collapsed-flyout" ) ,
2016-09-21 07:30:24 +02:00
e ( this ) . data ( "collapse" ) && ( e ( this ) . removeData ( "collapse" ) , e ( this ) . addClass ( "collapse" ) ) } ) : e ( this ) . children ( "ul" ) . each ( function ( ) { e ( this ) . addClass ( "collapsed-flyout" ) , e ( this ) . hasClass ( "collapse" ) , e ( this ) . removeClass ( "collapse" ) ,
2017-03-09 23:47:09 +01:00
e ( this ) . data ( "collapse" , ! 0 ) } ) } ) , this . toggleFlyoutState ( n ) , this . _super ( n , r , i ) } , toggleFlyoutState : function t ( n ) { if ( n ) e ( ".collapsed" ) . find ( "li" ) . show ( ) , e ( ".cms-menu-list" ) . find ( ".child-flyout-indicator" ) . hide ( )
2016-09-21 07:30:24 +02:00
else { e ( ".collapsed-flyout" ) . find ( "li" ) . each ( function ( ) { e ( this ) . hide ( ) } )
2017-03-09 23:47:09 +01:00
var r = e ( ".cms-menu-list ul.collapsed-flyout" ) . parent ( )
0 === r . children ( ".child-flyout-indicator" ) . length && r . append ( '<span class="child-flyout-indicator"></span>' ) . fadeIn ( ) , r . children ( ".child-flyout-indicator" ) . fadeIn ( ) } } , siteTreePresent : function t ( ) { return e ( "#cms-content-tools-CMSMain" ) . length > 0
} , getPersistedStickyState : function t ( ) { var n , r
return void 0 !== e . cookie && ( r = e . cookie ( "cms-menu-sticky" ) , void 0 !== r && null !== r && ( n = "true" === r ) ) , n } , setPersistedStickyState : function t ( n ) { void 0 !== e . cookie && e . cookie ( "cms-menu-sticky" , n , { path : "/" , expires : 31
} ) } , getEvaluatedCollapsedState : function t ( ) { var n , r = this . getPersistedCollapsedState ( ) , i = e ( ".cms-menu" ) . getPersistedStickyState ( ) , o = this . siteTreePresent ( )
return n = void 0 === r ? o : r !== o && i ? r : o } , onadd : function t ( ) { var n = this
setTimeout ( function ( ) { n . togglePanel ( ! n . getEvaluatedCollapsedState ( ) , ! 1 , ! 1 ) } , 0 ) , e ( window ) . on ( "ajaxComplete" , function ( e ) { setTimeout ( function ( ) { n . togglePanel ( ! n . getEvaluatedCollapsedState ( ) , ! 1 , ! 1 ) } , 0 ) } ) , this . _super ( )
} } ) , e ( ".cms-menu-list" ) . entwine ( { onmatch : function e ( ) { var t = this
this . find ( "li.current" ) . select ( ) , this . updateItems ( ) , this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , updateMenuFromResponse : function e ( t ) { var n = t . getResponseHeader ( "X-Controller" )
if ( n ) { var r = this . find ( "li#Menu-" + n . replace ( /\\/g , "-" ) . replace ( /[^a-zA-Z0-9\-_:.]+/ , "" ) )
r . hasClass ( "current" ) || r . select ( ) } this . updateItems ( ) } , "from .cms-container" : { onafterstatechange : function e ( t , n ) { this . updateMenuFromResponse ( n . xhr ) } , onaftersubmitform : function e ( t , n ) { this . updateMenuFromResponse ( n . xhr )
} } , "from .cms-edit-form" : { onrelodeditform : function e ( t , n ) { this . updateMenuFromResponse ( n . xmlhttp ) } } , getContainingPanel : function e ( ) { return this . closest ( ".cms-panel" ) } , fromContainingPanel : { ontoggle : function t ( n ) {
this . toggleClass ( "collapsed" , e ( n . target ) . hasClass ( "collapsed" ) ) , e ( ".cms-container" ) . trigger ( "windowresize" ) , this . hasClass ( "collapsed" ) && this . find ( "li.children.opened" ) . removeClass ( "opened" ) , this . hasClass ( "collapsed" ) || e ( ".toggle-children.opened" ) . closest ( "li" ) . addClass ( "opened" )
} } , updateItems : function t ( ) { var n = this . find ( "#Menu-CMSMain" )
n [ n . is ( ".current" ) ? "show" : "hide" ] ( )
var r = e ( ".cms-content input[name=ID]" ) . val ( )
r && this . find ( "li" ) . each ( function ( ) { e . isFunction ( e ( this ) . setRecordID ) && e ( this ) . setRecordID ( r ) } ) } } ) , e ( ".cms-menu-list li" ) . entwine ( { toggleFlyout : function t ( n ) { var r = e ( this )
if ( r . children ( "ul" ) . first ( ) . hasClass ( "collapsed-flyout" ) ) if ( n ) { if ( ! r . children ( "ul" ) . first ( ) . children ( "li" ) . first ( ) . hasClass ( "clone" ) ) { var i = r . clone ( )
i . addClass ( "clone" ) . css ( { } ) , i . children ( "ul" ) . first ( ) . remove ( ) , i . find ( "span" ) . not ( ".text" ) . remove ( ) , i . find ( "a" ) . first ( ) . unbind ( "click" ) , r . children ( "ul" ) . prepend ( i ) } e ( ".collapsed-flyout" ) . show ( ) , r . addClass ( "opened" ) ,
r . children ( "ul" ) . find ( "li" ) . fadeIn ( "fast" ) } else i && i . remove ( ) , e ( ".collapsed-flyout" ) . hide ( ) , r . removeClass ( "opened" ) , r . find ( "toggle-children" ) . removeClass ( "opened" ) , r . children ( "ul" ) . find ( "li" ) . hide ( ) } } ) ,
e ( ".cms-menu-list li" ) . hoverIntent ( function ( ) { e ( this ) . toggleFlyout ( ! 0 ) } , function ( ) { e ( this ) . toggleFlyout ( ! 1 ) } ) , e ( ".cms-menu-list .toggle" ) . entwine ( { onclick : function t ( n ) { n . preventDefault ( ) , e ( this ) . toogleFlyout ( ! 0 )
} } ) , e ( ".cms-menu-list li" ) . entwine ( { onmatch : function e ( ) { this . find ( "ul" ) . length && this . find ( "a:first" ) . append ( '<span class="toggle-children"><span class="toggle-children-icon"></span></span>' ) , this . _super ( )
} , onunmatch : function e ( ) { this . _super ( ) } , toggle : function e ( ) { this [ this . hasClass ( "opened" ) ? "close" : "open" ] ( ) } , open : function e ( ) { var t = this . getMenuItem ( )
t && t . open ( ) , this . find ( "li.clone" ) && this . find ( "li.clone" ) . remove ( ) , this . addClass ( "opened" ) . find ( "ul" ) . show ( ) , this . find ( ".toggle-children" ) . addClass ( "opened" ) } , close : function e ( ) { this . removeClass ( "opened" ) . find ( "ul" ) . hide ( ) ,
this . find ( ".toggle-children" ) . removeClass ( "opened" ) } , select : function e ( ) { var t = this . getMenuItem ( )
if ( this . addClass ( "current" ) . open ( ) , this . siblings ( ) . removeClass ( "current" ) . close ( ) , this . siblings ( ) . find ( "li" ) . removeClass ( "current" ) , t ) { var n = t . siblings ( )
t . addClass ( "current" ) , n . removeClass ( "current" ) . close ( ) , n . find ( "li" ) . removeClass ( "current" ) . close ( ) } this . getMenu ( ) . updateItems ( ) , this . trigger ( "select" ) } } ) , e ( ".cms-menu-list *" ) . entwine ( { getMenu : function e ( ) {
return this . parents ( ".cms-menu-list:first" ) } } ) , e ( ".cms-menu-list li *" ) . entwine ( { getMenuItem : function e ( ) { return this . parents ( "li:first" ) } } ) , e ( ".cms-menu-list li a" ) . entwine ( { onclick : function t ( n ) { var r = e . path . isExternal ( this . attr ( "href" ) )
if ( ! ( n . which > 1 || r ) && "_blank" != this . attr ( "target" ) ) { n . preventDefault ( )
var i = this . getMenuItem ( ) , o = this . attr ( "href" )
r || ( o = e ( "base" ) . attr ( "href" ) + o )
var a = i . find ( "li" )
a . length ? a . first ( ) . find ( "a" ) . click ( ) : document . location . href = o , i . select ( ) } } } ) , e ( ".cms-menu-list li .toggle-children" ) . entwine ( { onclick : function e ( t ) { var n = this . closest ( "li" )
return n . toggle ( ) , ! 1 } } ) , e ( ".cms .profile-link" ) . entwine ( { onclick : function t ( ) { return e ( ".cms-container" ) . loadPanel ( this . attr ( "href" ) ) , e ( ".cms-menu-list li" ) . removeClass ( "current" ) . close ( ) , ! 1 } } ) , e ( ".cms-menu .sticky-toggle" ) . entwine ( {
onadd : function t ( ) { var n = ! ! e ( ".cms-menu" ) . getPersistedStickyState ( )
this . toggleCSS ( n ) , this . toggleIndicator ( n ) , this . _super ( ) } , toggleCSS : function e ( t ) { this [ t ? "addClass" : "removeClass" ] ( "active" ) } , toggleIndicator : function e ( t ) { this . next ( ".sticky-status-indicator" ) . text ( t ? "fixed" : "auto" )
} , onclick : function e ( ) { var t = this . closest ( ".cms-menu" ) , n = t . getPersistedCollapsedState ( ) , r = t . getPersistedStickyState ( ) , i = void 0 === r ? ! this . hasClass ( "active" ) : ! r
void 0 === n ? t . setPersistedCollapsedState ( t . hasClass ( "collapsed" ) ) : void 0 !== n && i === ! 1 && t . clearPersistedCollapsedState ( ) , t . setPersistedStickyState ( i ) , this . toggleCSS ( i ) , this . toggleIndicator ( i ) , this . _super ( )
2016-09-21 07:30:24 +02:00
} } ) } ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) , a = n ( 114 ) , s = r ( a )
o . default . entwine ( "ss.preview" , function ( e ) { e ( ".cms-preview" ) . entwine ( { AllowedStates : [ "StageLink" , "LiveLink" , "ArchiveLink" ] , CurrentStateName : null , CurrentSizeName : "auto" , IsPreviewEnabled : ! 1 , DefaultMode : "split" ,
2016-09-21 07:30:24 +02:00
Sizes : { auto : { width : "100%" , height : "100%" } , mobile : { width : "335px" , height : "568px" } , mobileLandscape : { width : "583px" , height : "320px" } , tablet : { width : "783px" , height : "1024px" } , tabletLandscape : { width : "1039px" , height : "768px"
2017-02-28 04:01:13 +01:00
} , desktop : { width : "1024px" , height : "800px" } } , changeState : function t ( n , r ) { var i = this , o = this . _getNavigatorStates ( )
2017-03-09 23:47:09 +01:00
return r !== ! 1 && e . each ( o , function ( e , t ) { i . saveState ( "state" , n ) } ) , this . setCurrentStateName ( n ) , this . _loadCurrentState ( ) , this . redraw ( ) , this } , changeMode : function t ( n , r ) { var i = e ( ".cms-container" ) . entwine ( ".ss" )
2016-10-10 10:05:32 +02:00
2017-03-09 23:47:09 +01:00
if ( "split" == n ) i . splitViewMode ( ) , this . setIsPreviewEnabled ( ! 0 ) , this . _loadCurrentState ( )
else if ( "content" == n ) i . contentViewMode ( ) , this . setIsPreviewEnabled ( ! 1 )
else { if ( "preview" != n ) throw "Invalid mode: " + n
i . previewMode ( ) , this . setIsPreviewEnabled ( ! 0 ) , this . _loadCurrentState ( ) } return r !== ! 1 && this . saveState ( "mode" , n ) , this . redraw ( ) , this } , changeSize : function e ( t ) { var n = this . getSizes ( )
return this . setCurrentSizeName ( t ) , this . removeClass ( "auto desktop tablet mobile" ) . addClass ( t ) , this . saveState ( "size" , t ) , this . redraw ( ) , this } , redraw : function t ( ) { window . debug && console . log ( "redraw" , this . attr ( "class" ) , this . get ( 0 ) )
2016-11-08 05:08:05 +01:00
2017-03-09 23:47:09 +01:00
var n = this . getCurrentStateName ( )
n && this . find ( ".cms-preview-states" ) . changeVisibleState ( n )
var r = e ( ".cms-container" ) . entwine ( ".ss" ) . getLayoutOptions ( )
r && e ( ".preview-mode-selector" ) . changeVisibleMode ( r . mode )
var i = this . getCurrentSizeName ( )
return i && this . find ( ".preview-size-selector" ) . changeVisibleSize ( this . getCurrentSizeName ( ) ) , this } , saveState : function e ( t , n ) { this . _supportsLocalStorage ( ) && window . localStorage . setItem ( "cms-preview-state-" + t , n )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , loadState : function e ( t ) { if ( this . _supportsLocalStorage ( ) ) return window . localStorage . getItem ( "cms-preview-state-" + t ) } , disablePreview : function e ( ) { return this . setPendingURL ( null ) , this . _loadUrl ( "about:blank" ) ,
this . _block ( ) , this . changeMode ( "content" , ! 1 ) , this . setIsPreviewEnabled ( ! 1 ) , this } , enablePreview : function t ( ) { return this . getIsPreviewEnabled ( ) || ( this . setIsPreviewEnabled ( ! 0 ) , e . browser . msie && e . browser . version . slice ( 0 , 3 ) <= 7 ? this . changeMode ( "content" ) : this . changeMode ( this . getDefaultMode ( ) , ! 1 ) ) ,
this } , getOrAppendFontFixStyleElement : function t ( ) { var n = e ( "#FontFixStyleElement" )
return n . length || ( n = e ( '<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>' ) . appendTo ( "head" ) ) , n } , onadd : function t ( ) { var n = this , r = this . find ( "iframe" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
r . addClass ( "center" ) , r . bind ( "load" , function ( ) { n . _adjustIframeForPreview ( ) , n . _loadCurrentPage ( ) , e ( this ) . removeClass ( "loading" ) } ) , e . browser . msie && 8 === parseInt ( e . browser . version , 10 ) && r . bind ( "readystatechange" , function ( e ) {
"interactive" == r [ 0 ] . readyState && ( n . getOrAppendFontFixStyleElement ( ) . removeAttr ( "disabled" ) , setTimeout ( function ( ) { n . getOrAppendFontFixStyleElement ( ) . attr ( "disabled" , "disabled" ) } , 0 ) ) } ) , this . _unblock ( ) , this . disablePreview ( ) ,
this . _super ( ) } , _supportsLocalStorage : function e ( ) { var t = new Date , n , r
try { return ( n = window . localStorage ) . setItem ( t , t ) , r = n . getItem ( t ) == t , n . removeItem ( t ) , r && n } catch ( e ) { console . warn ( "localStorge is not available due to current browser / system settings." ) } } , onforcecontent : function e ( ) {
this . changeMode ( "content" , ! 1 ) } , onenable : function t ( ) { var n = e ( ".preview-mode-selector" )
n . removeClass ( "split-disabled" ) , n . find ( ".disabled-tooltip" ) . hide ( ) } , ondisable : function t ( ) { var n = e ( ".preview-mode-selector" )
n . addClass ( "split-disabled" ) , n . find ( ".disabled-tooltip" ) . show ( ) } , _block : function e ( ) { return this . find ( ".preview-note" ) . show ( ) , this . find ( ".cms-preview-overlay" ) . show ( ) , this } , _unblock : function e ( ) { return this . find ( ".preview-note" ) . hide ( ) ,
this . find ( ".cms-preview-overlay" ) . hide ( ) , this } , _initialiseFromContent : function t ( ) { var n , r
return e ( ".cms-previewable" ) . length ? ( n = this . loadState ( "mode" ) , r = this . loadState ( "size" ) , this . _moveNavigator ( ) , n && "content" == n || ( this . enablePreview ( ) , this . _loadCurrentState ( ) ) , this . redraw ( ) , n && this . changeMode ( n ) ,
r && this . changeSize ( r ) ) : this . disablePreview ( ) , this } , "from .cms-container" : { onafterstatechange : function e ( t , n ) { n . xhr . getResponseHeader ( "X-ControllerURL" ) || this . _initialiseFromContent ( ) } } , PendingURL : null ,
oncolumnvisibilitychanged : function e ( ) { var t = this . getPendingURL ( )
t && ! this . is ( ".column-hidden" ) && ( this . setPendingURL ( null ) , this . _loadUrl ( t ) , this . _unblock ( ) ) } , "from .cms-container .cms-edit-form" : { onaftersubmitform : function e ( ) { this . _initialiseFromContent ( ) } } , _loadUrl : function e ( t ) {
return this . find ( "iframe" ) . addClass ( "loading" ) . attr ( "src" , t ) , this } , _getNavigatorStates : function t ( ) { var n = e . map ( this . getAllowedStates ( ) , function ( t ) { var n = e ( ".cms-preview-states .state-name[data-name=" + t + "]" )
2016-09-21 07:30:24 +02:00
return n . length ? { name : t , url : n . attr ( "href" ) , active : n . hasClass ( "active" ) } : null } )
2017-03-09 23:47:09 +01:00
return n } , _loadCurrentState : function t ( ) { if ( ! this . getIsPreviewEnabled ( ) ) return this
var n = this . _getNavigatorStates ( ) , r = this . getCurrentStateName ( ) , i = null
n && ( i = e . grep ( n , function ( e , t ) { return r === e . name || ! r && e . active } ) )
var o = null
return i [ 0 ] ? o = i [ 0 ] . url : n . length ? ( this . setCurrentStateName ( n [ 0 ] . name ) , o = n [ 0 ] . url ) : this . setCurrentStateName ( null ) , o && ( o += ( o . indexOf ( "?" ) === - 1 ? "?" : "&" ) + "CMSPreview=1" ) , this . is ( ".column-hidden" ) ? ( this . setPendingURL ( o ) ,
this . _loadUrl ( "about:blank" ) , this . _block ( ) ) : ( this . setPendingURL ( null ) , o ? ( this . _loadUrl ( o ) , this . _unblock ( ) ) : this . _block ( ) ) , this } , _moveNavigator : function t ( ) { var n = e ( ".cms-preview .cms-preview-controls" ) , r = e ( ".cms-edit-form .cms-navigator" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
r . length && n . length ? n . html ( e ( ".cms-edit-form .cms-navigator" ) . detach ( ) ) : this . _block ( ) } , _loadCurrentPage : function t ( ) { if ( this . getIsPreviewEnabled ( ) ) { var n , r = e ( ".cms-container" )
try { n = this . find ( "iframe" ) [ 0 ] . contentDocument } catch ( e ) { console . warn ( "Unable to access iframe, possible https mis-match" ) } if ( n ) { var i = e ( n ) . find ( "meta[name=x-page-id]" ) . attr ( "content" ) , o = e ( n ) . find ( "meta[name=x-cms-edit-link]" ) . attr ( "content" ) , a = e ( ".cms-content" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
i && a . find ( ":input[name=ID]" ) . val ( ) != i && e ( ".cms-container" ) . entwine ( ".ss" ) . loadPanel ( o ) } } } , _adjustIframeForPreview : function e ( ) { var t = this . find ( "iframe" ) [ 0 ] , n
if ( t ) { try { n = t . contentDocument } catch ( e ) { console . warn ( "Unable to access iframe, possible https mis-match" ) } if ( n ) { for ( var r = n . getElementsByTagName ( "A" ) , i = 0 ; i < r . length ; i ++ ) { var o = r [ i ] . getAttribute ( "href" )
o && o . match ( /^http:\/\// ) && r [ i ] . setAttribute ( "target" , "_blank" ) } var a = n . getElementById ( "SilverStripeNavigator" )
2017-02-28 04:01:13 +01:00
a && ( a . style . display = "none" )
2017-03-09 23:47:09 +01:00
var s = n . getElementById ( "SilverStripeNavigatorMessage" )
s && ( s . style . display = "none" ) , this . trigger ( "afterIframeAdjustedForPreview" , [ n ] ) } } } } ) , e ( ".cms-edit-form" ) . entwine ( { onadd : function t ( ) { this . _super ( ) , e ( ".cms-preview" ) . _initialiseFromContent ( ) } } ) , e ( ".cms-preview-states" ) . entwine ( {
changeVisibleState : function e ( t ) { this . find ( '[data-name="' + t + '"]' ) . addClass ( "active" ) . siblings ( ) . removeClass ( "active" ) } } ) , e ( ".cms-preview-states .state-name" ) . entwine ( { onclick : function t ( n ) { if ( 1 == n . which ) {
var r = e ( this ) . attr ( "data-name" )
this . addClass ( "active" ) . siblings ( ) . removeClass ( "active" ) , e ( ".cms-preview" ) . changeState ( r ) , n . preventDefault ( ) } } } ) , e ( ".preview-mode-selector" ) . entwine ( { changeVisibleMode : function e ( t ) { this . find ( "select" ) . val ( t ) . trigger ( "chosen:updated" ) . _addIcon ( )
} } ) , e ( ".preview-mode-selector select" ) . entwine ( { onchange : function t ( n ) { this . _super ( n ) , n . preventDefault ( )
var r = e ( this ) . val ( )
e ( ".cms-preview" ) . changeMode ( r ) } } ) , e ( ".cms-container--content-mode" ) . entwine ( { onmatch : function t ( ) { e ( ".cms-preview .result-selected" ) . hasClass ( "font-icon-columns" ) && statusMessage ( s . default . _t ( "LeftAndMain.DISABLESPLITVIEW" , "Screen too small to show site preview in split mode" ) , "error" ) ,
this . _super ( ) } } ) , e ( ".preview-size-selector" ) . entwine ( { changeVisibleSize : function e ( t ) { this . find ( "select" ) . val ( t ) . trigger ( "chosen:updated" ) . _addIcon ( ) } } ) , e ( ".preview-size-selector select" ) . entwine ( { onchange : function t ( n ) {
n . preventDefault ( )
var r = e ( this ) . val ( )
e ( ".cms-preview" ) . changeSize ( r ) } } ) , e ( ".preview-selector select.preview-dropdown" ) . entwine ( { "onchosen:ready" : function e ( ) { this . _super ( ) , this . _addIcon ( ) } , _addIcon : function e ( ) { var t = this . find ( ":selected" ) , n = t . attr ( "data-icon" ) , r = this . parent ( ) . find ( ".chosen-container a.chosen-single" ) , i = r . attr ( "data-icon" )
return "undefined" != typeof i && r . removeClass ( i ) , r . addClass ( n ) , r . attr ( "data-icon" , n ) , this } } ) , e ( ".preview-mode-selector .chosen-drop li:last-child" ) . entwine ( { onmatch : function t ( ) { e ( ".preview-mode-selector" ) . hasClass ( "split-disabled" ) ? this . parent ( ) . append ( '<div class="disabled-tooltip"></div>' ) : this . parent ( ) . append ( '<div class="disabled-tooltip" style="display: none;"></div>' )
} } ) , e ( ".preview-device-outer" ) . entwine ( { onclick : function e ( ) { this . parent ( ".preview__device" ) . toggleClass ( "rotate" ) } } ) } ) } , function ( e , t , n ) { ( function ( e ) { "use strict"
function t ( e ) { return e && e . _ _esModule ? e : { default : e } } var r = n ( 1 ) , i = t ( r ) , o = n ( 114 ) , a = t ( o )
i . default . entwine ( "ss.tree" , function ( t ) { t ( "#Form_BatchActionsForm" ) . entwine ( { Actions : [ ] , getTree : function e ( ) { return t ( ".cms-tree" ) } , fromTree : { oncheck _node : function e ( t , n ) { this . serializeFromTree ( ) } , onuncheck _node : function e ( t , n ) {
this . serializeFromTree ( ) } } , onmatch : function e ( ) { var t = this
t . getTree ( ) . bind ( "load_node.jstree" , function ( e , n ) { t . refreshSelected ( ) } ) } , onunmatch : function e ( ) { var t = this
t . getTree ( ) . unbind ( "load_node.jstree" ) } , registerDefault : function e ( ) { this . register ( "publish" , function ( e ) { var t = confirm ( a . default . inject ( a . default . _t ( "CMSMAIN.BATCH_PUBLISH_PROMPT" , "You have {num} page(s) selected.\n\nDo you really want to publish?" ) , {
2016-09-21 07:30:24 +02:00
num : e . length } ) )
2017-03-09 23:47:09 +01:00
return ! ! t && e } ) , this . register ( "unpublish" , function ( e ) { var t = confirm ( a . default . inject ( a . default . _t ( "CMSMAIN.BATCH_UNPUBLISH_PROMPT" , "You have {num} page(s) selected.\n\nDo you really want to unpublish" ) , {
2016-09-21 07:30:24 +02:00
num : e . length } ) )
2017-03-09 23:47:09 +01:00
return ! ! t && e } ) , this . register ( "delete" , function ( e ) { var t = confirm ( a . default . inject ( a . default . _t ( "CMSMAIN.BATCH_DELETE_PROMPT" , "You have {num} page(s) selected.\n\nAre you sure you want to delete these pages?\n\nThese pages and all of their children pages will be deleted and sent to the archive." ) , {
2016-09-21 07:30:24 +02:00
num : e . length } ) )
2017-03-09 23:47:09 +01:00
return ! ! t && e } ) , this . register ( "restore" , function ( e ) { var t = confirm ( a . default . inject ( a . default . _t ( "CMSMAIN.BATCH_RESTORE_PROMPT" , "You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored." ) , {
2016-09-21 07:30:24 +02:00
num : e . length } ) )
2017-03-09 23:47:09 +01:00
return ! ! t && e } ) } , onadd : function e ( ) { this . registerDefault ( ) , this . _super ( ) } , register : function e ( t , n ) { this . trigger ( "register" , { type : t , callback : n } )
var r = this . getActions ( )
r [ t ] = n , this . setActions ( r ) } , unregister : function e ( t ) { this . trigger ( "unregister" , { type : t } )
2016-09-21 07:30:24 +02:00
var n = this . getActions ( )
2017-03-09 23:47:09 +01:00
n [ t ] && delete n [ t ] , this . setActions ( n ) } , refreshSelected : function n ( r ) { var i = this , o = this . getTree ( ) , a = this . getIDs ( ) , s = [ ] , l = t ( ".cms-content-batchactions-button" ) , u = this . find ( ":input[name=Action]" ) . val ( )
null == r && ( r = o )
for ( var c in a ) t ( t ( o ) . getNodeByID ( c ) ) . addClass ( "selected" ) . attr ( "selected" , "selected" )
if ( ! u || u == - 1 || ! l . hasClass ( "active" ) ) return void t ( r ) . find ( "li" ) . each ( function ( ) { t ( this ) . setEnabled ( ! 0 ) } )
t ( r ) . find ( "li" ) . each ( function ( ) { s . push ( t ( this ) . data ( "id" ) ) , t ( this ) . addClass ( "treeloading" ) . setEnabled ( ! 1 ) } )
var d = t . path . parseUrl ( u ) , f = d . hrefNoSearch + "/applicablepages/"
f = t . path . addSearchParams ( f , d . search ) , f = t . path . addSearchParams ( f , { csvIDs : s . join ( "," ) } ) , e . getJSON ( f , function ( n ) { e ( r ) . find ( "li" ) . each ( function ( ) { t ( this ) . removeClass ( "treeloading" )
2016-09-21 07:30:24 +02:00
var e = t ( this ) . data ( "id" )
2017-03-09 23:47:09 +01:00
0 == e || t . inArray ( e , n ) >= 0 ? t ( this ) . setEnabled ( ! 0 ) : ( t ( this ) . removeClass ( "selected" ) . setEnabled ( ! 1 ) , t ( this ) . prop ( "selected" , ! 1 ) ) } ) , i . serializeFromTree ( ) } ) } , serializeFromTree : function e ( ) { var t = this . getTree ( ) , n = t . getSelectedIDs ( )
return this . setIDs ( n ) , ! 0 } , setIDs : function e ( t ) { this . find ( ":input[name=csvIDs]" ) . val ( t ? t . join ( "," ) : null ) } , getIDs : function e ( ) { var t = this . find ( ":input[name=csvIDs]" ) . val ( )
return t ? t . split ( "," ) : [ ] } , onsubmit : function n ( r ) { var i = this , o = this . getIDs ( ) , s = this . getTree ( ) , l = this . getActions ( )
if ( ! o || ! o . length ) return alert ( a . default . _t ( "CMSMAIN.SELECTONEPAGE" , "Please select at least one page" ) ) , r . preventDefault ( ) , ! 1
var u = this . find ( ":input[name=Action]" ) . val ( )
if ( ! u ) return r . preventDefault ( ) , ! 1
var c = u . split ( "/" ) . filter ( function ( e ) { return ! ! e } ) . pop ( )
if ( l [ c ] && ( o = l [ c ] . apply ( this , [ o ] ) ) , ! o || ! o . length ) return r . preventDefault ( ) , ! 1
this . setIDs ( o ) , s . find ( "li" ) . removeClass ( "failed" )
var d = this . find ( ":submit:first" )
return d . addClass ( "loading" ) , e . ajax ( { url : u , type : "POST" , data : this . serializeArray ( ) , complete : function e ( t , n ) { d . removeClass ( "loading" ) , s . jstree ( "refresh" , - 1 ) , i . setIDs ( [ ] ) , i . find ( ":input[name=Action]" ) . val ( "" ) . change ( )
var r = t . getResponseHeader ( "X-Status" )
r && statusMessage ( decodeURIComponent ( r ) , "success" == n ? "good" : "bad" ) } , success : function e ( n , r ) { var i , o
if ( n . modified ) { var a = [ ]
for ( i in n . modified ) o = s . getNodeByID ( i ) , s . jstree ( "set_text" , o , n . modified [ i ] . TreeTitle ) , a . push ( o )
t ( a ) . effect ( "highlight" ) } if ( n . deleted ) for ( i in n . deleted ) o = s . getNodeByID ( i ) , o . length && s . jstree ( "delete_node" , o )
if ( n . error ) for ( i in n . error ) o = s . getNodeByID ( i ) , t ( o ) . addClass ( "failed" ) } , dataType : "json" } ) , r . preventDefault ( ) , ! 1 } } ) , t ( ".cms-content-batchactions-button" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) , this . updateTree ( )
} , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( t ) { this . updateTree ( ) } , updateTree : function e ( ) { var n = t ( ".cms-tree" ) , r = t ( "#Form_BatchActionsForm" )
this . _super ( ) , this . data ( "active" ) ? ( n . addClass ( "multiple" ) , n . removeClass ( "draggable" ) , r . serializeFromTree ( ) ) : ( n . removeClass ( "multiple" ) , n . addClass ( "draggable" ) ) , t ( "#Form_BatchActionsForm" ) . refreshSelected ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) , t ( "#Form_BatchActionsForm select[name=Action]" ) . entwine ( { onchange : function e ( n ) { var r = t ( n . target . form ) , i = r . find ( ":submit" ) , o = t ( n . target ) . val ( )
t ( "#Form_BatchActionsForm" ) . refreshSelected ( ) , this . trigger ( "chosen:updated" ) , this . _super ( n ) } } ) } ) } ) . call ( t , n ( 168 ) ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".cms .field.cms-description-tooltip" ) . entwine ( { onmatch : function e ( ) { this . _super ( )
var t = this . find ( ".description" ) , n , r
t . length && ( this . attr ( "title" , t . text ( ) ) . tooltip ( { content : t . html ( ) } ) , t . remove ( ) ) } } ) , e ( ".cms .field.cms-description-tooltip :input" ) . entwine ( { onfocusin : function e ( t ) { this . closest ( ".field" ) . tooltip ( "open" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , onfocusout : function e ( t ) { this . closest ( ".field" ) . tooltip ( "close" ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".cms-description-toggle" ) . entwine ( { onadd : function e ( ) { var t = ! 1 , n = this . prop ( "id" ) . substr ( 0 , this . prop ( "id" ) . indexOf ( "_Holder" ) ) , r = this . find ( ".cms-description-trigger" ) , i = this . find ( ".description" )
this . hasClass ( "description-toggle-enabled" ) || ( 0 === r . length && ( r = this . find ( ".middleColumn" ) . first ( ) . after ( '<label class="right" for="' + n + '"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>' ) . next ( ) ) ,
this . addClass ( "description-toggle-enabled" ) , r . on ( "click" , function ( ) { i [ t ? "hide" : "show" ] ( ) , t = ! t } ) , i . hide ( ) ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".TreeDropdownField" ) . entwine ( { "from .cms-container form" : { onaftersubmitform : function e ( t ) { this . find ( ".tree-holder" ) . empty ( ) , this . _super ( ) } } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) , a = n ( 5 ) , s = r ( a ) , l = n ( 183 ) , u = r ( l ) , c = n ( 106 ) , d = n ( 184 ) , f = r ( d )
o . default . entwine ( "ss" , function ( e ) { e ( ".cms-content-actions .add-to-campaign-action,#add-to-campaign__action" ) . entwine ( { onclick : function t ( ) { var n = e ( "#add-to-campaign__dialog-wrapper" )
return n . length || ( n = e ( '<div id="add-to-campaign__dialog-wrapper" />' ) , e ( "body" ) . append ( n ) ) , n . open ( ) , ! 1 } } ) , e ( "#add-to-campaign__dialog-wrapper" ) . entwine ( { onunmatch : function e ( ) { this . _clearModal ( ) } , open : function e ( ) {
this . _renderModal ( ! 0 ) } , close : function e ( ) { this . _renderModal ( ! 1 ) } , _renderModal : function t ( n ) { var r = this , i = function e ( ) { return r . close ( ) } , o = function e ( ) { return r . _handleSubmitModal . apply ( r , arguments ) } , a = e ( "form.cms-edit-form :input[name=ID]" ) . val ( ) , l = window . ss . store , d = "SilverStripe\\CMS\\Controllers\\CMSPageEditController" , p = l . getState ( ) . config . sections [ d ] , h = p . form . AddToCampaignForm . schemaUrl + "/" + a
u . default . render ( s . default . createElement ( c . Provider , { store : l } , s . default . createElement ( f . default , { show : n , handleSubmit : o , handleHide : i , schemaUrl : h , bodyClassName : "modal__dialog" , responseClassBad : "modal__response modal__response--error" ,
responseClassGood : "modal__response modal__response--good" } ) ) , this [ 0 ] ) } , _clearModal : function e ( ) { u . default . unmountComponentAtNode ( this [ 0 ] ) } , _handleSubmitModal : function e ( t , n , r ) { return r ( ) } } ) } ) } , , function ( e , t ) {
2016-11-22 03:18:26 +01:00
e . exports = FormBuilderModal } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
n ( 170 ) , n ( 186 )
var a = function e ( t ) { var n = ( 0 , o . default ) ( ( 0 , o . default ) ( this ) . contents ( ) ) . find ( ".message" )
if ( n && n . html ( ) ) { var r = ( 0 , o . default ) ( window . parent . document ) . find ( "#Form_EditForm_Members" ) . get ( 0 )
r && r . refresh ( )
var i = ( 0 , o . default ) ( window . parent . document ) . find ( ".cms-tree" ) . get ( 0 )
i && i . reload ( ) } } ; ( 0 , o . default ) ( "#MemberImportFormIframe, #GroupImportFormIframe" ) . entwine ( { onadd : function e ( ) { this . _super ( ) , ( 0 , o . default ) ( this ) . bind ( "load" , a ) } } ) , o . default . entwine ( "ss" , function ( e ) { e ( ".permissioncheckboxset .checkbox[value=ADMIN]" ) . entwine ( {
onmatch : function e ( ) { this . toggleCheckboxes ( ) , this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( t ) { this . toggleCheckboxes ( ) } , toggleCheckboxes : function t ( ) { var n = this , r = this . parents ( ".field:eq(0)" ) . find ( ".checkbox" ) . not ( this )
this . is ( ":checked" ) ? r . each ( function ( ) { e ( this ) . data ( "SecurityAdmin.oldChecked" , e ( this ) . is ( ":checked" ) ) , e ( this ) . data ( "SecurityAdmin.oldDisabled" , e ( this ) . is ( ":disabled" ) ) , e ( this ) . prop ( "disabled" , ! 0 ) , e ( this ) . prop ( "checked" , ! 0 )
} ) : r . each ( function ( ) { e ( this ) . prop ( "checked" , e ( this ) . data ( "SecurityAdmin.oldChecked" ) ) , e ( this ) . prop ( "disabled" , e ( this ) . data ( "SecurityAdmin.oldDisabled" ) ) } ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".permissioncheckboxset .valADMIN input" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( t ) { this . toggleCheckboxes ( )
} , toggleCheckboxes : function t ( ) { var n = e ( this ) . parents ( ".field:eq(0)" ) . find ( ".checkbox" ) . not ( this )
e ( this ) . is ( ":checked" ) ? n . each ( function ( ) { e ( this ) . data ( "SecurityAdmin.oldChecked" , e ( this ) . attr ( "checked" ) ) , e ( this ) . data ( "SecurityAdmin.oldDisabled" , e ( this ) . attr ( "disabled" ) ) , e ( this ) . attr ( "disabled" , "disabled" ) ,
e ( this ) . attr ( "checked" , "checked" ) } ) : n . each ( function ( ) { var t = e ( this ) . data ( "SecurityAdmin.oldChecked" ) , n = e ( this ) . data ( "SecurityAdmin.oldDisabled" )
null !== t && e ( this ) . attr ( "checked" , t ) , null !== n && e ( this ) . attr ( "disabled" , n ) } ) } } ) , e ( ".permissioncheckboxset .valCMS_ACCESS_LeftAndMain input" ) . entwine ( { getCheckboxesExceptThisOne : function t ( ) { return e ( this ) . parents ( ".field:eq(0)" ) . find ( "li" ) . filter ( function ( t ) {
2016-09-21 07:30:24 +02:00
var n = e ( this ) . attr ( "class" )
2017-03-09 23:47:09 +01:00
return ! ! n && n . match ( /CMS_ACCESS_/ ) } ) . find ( ".checkbox" ) . not ( this ) } , onmatch : function e ( ) { this . toggleCheckboxes ( ) , this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( t ) { this . toggleCheckboxes ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , toggleCheckboxes : function t ( ) { var n = this . getCheckboxesExceptThisOne ( )
e ( this ) . is ( ":checked" ) ? n . each ( function ( ) { e ( this ) . data ( "PermissionCheckboxSetField.oldChecked" , e ( this ) . is ( ":checked" ) ) , e ( this ) . data ( "PermissionCheckboxSetField.oldDisabled" , e ( this ) . is ( ":disabled" ) ) , e ( this ) . prop ( "disabled" , "disabled" ) ,
e ( this ) . prop ( "checked" , "checked" ) } ) : n . each ( function ( ) { e ( this ) . prop ( "checked" , e ( this ) . data ( "PermissionCheckboxSetField.oldChecked" ) ) , e ( this ) . prop ( "disabled" , e ( this ) . data ( "PermissionCheckboxSetField.oldDisabled" ) )
2016-09-21 07:30:24 +02:00
} ) } } ) } ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
n ( 170 ) , o . default . entwine ( "ss" , function ( e ) { e ( ".cms-content-tools #Form_SearchForm" ) . entwine ( { onsubmit : function e ( t ) { this . trigger ( "beforeSubmit" ) } } ) , e ( ".importSpec" ) . entwine ( { onmatch : function t ( ) { this . find ( "div.details" ) . hide ( ) ,
this . find ( "a.detailsLink" ) . click ( function ( ) { return e ( "#" + e ( this ) . attr ( "href" ) . replace ( /.*#/ , "" ) ) . slideToggle ( ) , ! 1 } ) , this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) ; ( 0 , o . default ) ( document ) . on ( "click" , ".confirmedpassword .showOnClick a" , function ( ) { var e = ( 0 , o . default ) ( ".showOnClickContainer" , ( 0 , o . default ) ( this ) . parent ( ) )
2016-09-21 07:30:24 +02:00
2016-09-23 18:15:59 +02:00
return e . toggle ( "fast" , function ( ) { e . find ( 'input[type="hidden"]' ) . val ( e . is ( ":visible" ) ? 1 : 0 ) } ) , ! 1 } ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) ; ( 0 , o . default ) ( document ) . ready ( function ( ) { ( 0 , o . default ) ( "ul.SelectionGroup input.selector, ul.selection-group input.selector" ) . live ( "click" , function ( ) {
var e = ( 0 , o . default ) ( this ) . closest ( "li" )
2016-09-21 07:30:24 +02:00
e . addClass ( "selected" )
var t = e . prevAll ( "li.selected" )
t . length && t . removeClass ( "selected" )
var n = e . nextAll ( "li.selected" )
2017-03-09 23:47:09 +01:00
n . length && n . removeClass ( "selected" ) , ( 0 , o . default ) ( this ) . focus ( ) } ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
n ( 169 ) , o . default . fn . extend ( { ssDatepicker : function e ( t ) { return ( 0 , o . default ) ( this ) . each ( function ( ) { if ( ! ( ( 0 , o . default ) ( this ) . prop ( "disabled" ) || ( 0 , o . default ) ( this ) . prop ( "readonly" ) || ( 0 , o . default ) ( this ) . hasClass ( "hasDatepicker" ) ) ) {
( 0 , o . default ) ( this ) . siblings ( "button" ) . addClass ( "ui-icon ui-icon-calendar" )
var e = o . default . extend ( { } , t || { } , ( 0 , o . default ) ( this ) . data ( ) , ( 0 , o . default ) ( this ) . data ( "jqueryuiconfig" ) )
e . showcalendar && ( e . locale && o . default . datepicker . regional [ e . locale ] && ( e = o . default . extend ( { } , o . default . datepicker . regional [ e . locale ] , e ) ) , ( 0 , o . default ) ( this ) . datepicker ( e ) ) } } ) } } ) , ( 0 , o . default ) ( document ) . on ( "click" , ".field.date input.text,input.text.date" , function ( ) {
( 0 , o . default ) ( this ) . ssDatepicker ( ) , ( 0 , o . default ) ( this ) . data ( "datepicker" ) && ( 0 , o . default ) ( this ) . datepicker ( "show" ) } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
n ( 169 ) , o . default . entwine ( "ss" , function ( e ) { e ( ".ss-toggle" ) . entwine ( { onadd : function e ( ) { this . _super ( ) , this . accordion ( { heightStyle : "content" , collapsible : ! 0 , active : ! this . hasClass ( "ss-toggle-start-closed" ) && 0
} ) } , onremove : function e ( ) { this . data ( "accordion" ) && this . accordion ( "destroy" ) , this . _super ( ) } , getTabSet : function e ( ) { return this . closest ( ".ss-tabset" ) } , fromTabSet : { ontabsshow : function e ( ) { this . accordion ( "resize" )
2016-09-21 07:30:24 +02:00
2016-11-22 03:18:26 +01:00
} } } ) } ) } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
o . default . entwine ( "ss" , function ( e ) { e ( ".memberdatetimeoptionset" ) . entwine ( { onmatch : function e ( ) { this . find ( ".toggle-content" ) . hide ( ) , this . _super ( ) } } ) , e ( ".memberdatetimeoptionset .toggle" ) . entwine ( { onclick : function t ( n ) {
n . preventDefault ( )
var r = e ( this ) . closest ( ".form__field-description" ) . parent ( ) . find ( ".toggle-content" )
r . is ( ":visible" ) ? r . hide ( ) : r . show ( ) } } ) } ) } , function ( e , t , n ) { ( function ( e ) { "use strict"
function t ( e ) { return e && e . _ _esModule ? e : { default : e } } var r = n ( 1 ) , i = t ( r ) , o = n ( 114 ) , a = t ( o )
n ( 194 ) , n ( 195 ) , i . default . entwine ( "ss" , function ( t ) { var n , r
t ( window ) . bind ( "resize.treedropdownfield" , function ( ) { var e = function e ( ) { t ( ".TreeDropdownField" ) . closePanel ( ) }
2017-02-28 04:01:13 +01:00
if ( t . browser . msie && parseInt ( t . browser . version , 10 ) < 9 ) { var i = t ( window ) . width ( ) , o = t ( window ) . height ( )
i == n && o == r || ( n = i , r = o , e ( ) ) } else e ( ) } )
2017-03-09 23:47:09 +01:00
var i = { openlink : a . default . _t ( "TreeDropdownField.OpenLink" ) , fieldTitle : "(" + a . default . _t ( "TreeDropdownField.FieldTitle" ) + ")" , searchFieldTitle : "(" + a . default . _t ( "TreeDropdownField.SearchFieldTitle" ) + ")" } , o = function e ( n ) {
t ( n . target ) . parents ( ".TreeDropdownField" ) . length || t ( ".TreeDropdownField" ) . closePanel ( ) }
t ( ".TreeDropdownField" ) . entwine ( { CurrentXhr : null , onadd : function e ( ) { this . append ( '<span class="treedropdownfield-title"></span><div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div><div class="treedropdownfield-panel"><div class="tree-holder"></div></div>' )
var t = i . openLink
t && this . find ( "treedropdownfield-toggle-panel-link a" ) . attr ( "title" , t ) , this . data ( "title" ) && this . setTitle ( this . data ( "title" ) ) , this . getPanel ( ) . hide ( ) , this . _super ( ) } , getPanel : function e ( ) { return this . find ( ".treedropdownfield-panel" )
} , openPanel : function e ( ) { t ( ".TreeDropdownField" ) . closePanel ( ) , t ( "body" ) . bind ( "click" , o )
var n = this . getPanel ( ) , r = this . find ( ".tree-holder" )
n . css ( "width" , this . width ( ) ) , n . show ( )
var i = this . find ( ".treedropdownfield-toggle-panel-link" )
i . addClass ( "treedropdownfield-open-tree" ) , this . addClass ( "treedropdownfield-open-tree" ) , i . find ( "a" ) . removeClass ( "ui-icon-triangle-1-s" ) . addClass ( "ui-icon-triangle-1-n" ) , r . is ( ":empty" ) && ! n . hasClass ( "loading" ) ? this . loadTree ( null , this . _riseUp ) : this . _riseUp ( ) ,
this . trigger ( "panelshow" ) } , _riseUp : function e ( ) { var n = this , r = this . getPanel ( ) , i = this . find ( ".treedropdownfield-toggle-panel-link" ) , o = i . innerHeight ( ) , a , s , l
i . length > 0 && ( l = t ( window ) . height ( ) + t ( document ) . scrollTop ( ) - i . innerHeight ( ) , s = i . offset ( ) . top , a = r . innerHeight ( ) , s + a > l && s - a > 0 ? ( n . addClass ( "treedropdownfield-with-rise" ) , o = - r . outerHeight ( ) ) : n . removeClass ( "treedropdownfield-with-rise" ) ) ,
r . css ( { top : o + "px" } ) } , closePanel : function t ( ) { e ( "body" ) . unbind ( "click" , o )
var n = this . find ( ".treedropdownfield-toggle-panel-link" )
n . removeClass ( "treedropdownfield-open-tree" ) , this . removeClass ( "treedropdownfield-open-tree treedropdownfield-with-rise" ) , n . find ( "a" ) . removeClass ( "ui-icon-triangle-1-n" ) . addClass ( "ui-icon-triangle-1-s" ) ,
this . getPanel ( ) . hide ( ) , this . trigger ( "panelhide" ) } , togglePanel : function e ( ) { this [ this . getPanel ( ) . is ( ":visible" ) ? "closePanel" : "openPanel" ] ( ) } , setTitle : function e ( t ) { t = t || this . data ( "title" ) || i . fieldTitle ,
this . find ( ".treedropdownfield-title" ) . html ( t ) , this . data ( "title" , t ) } , getTitle : function e ( ) { return this . find ( ".treedropdownfield-title" ) . text ( ) } , updateTitle : function e ( ) { var t = this , n = t . find ( ".tree-holder" ) , r = this . getValue ( ) , i = function e ( ) {
var r = t . getValue ( )
if ( r ) { var i = n . find ( '*[data-id="' + r + '"]' ) , o = i . children ( "a" ) . find ( "span.jstree_pageicon" ) ? i . children ( "a" ) . find ( "span.item" ) . html ( ) : null
o || ( o = i . length > 0 ? n . jstree ( "get_text" , i [ 0 ] ) : null ) , o && ( t . setTitle ( o ) , t . data ( "title" , o ) ) , i && n . jstree ( "select_node" , i ) } else t . setTitle ( t . data ( "empty-title" ) ) , t . removeData ( "title" ) }
n . is ( ":empty" ) && r ? this . loadTree ( { forceValue : r } , i ) : i ( ) } , setValue : function e ( n ) { this . data ( "metadata" , t . extend ( this . data ( "metadata" ) , { id : n } ) ) , this . find ( ":input:hidden" ) . val ( n ) . trigger ( "valueupdated" ) . trigger ( "change" )
} , getValue : function e ( ) { return this . find ( ":input:hidden" ) . val ( ) } , loadTree : function e ( n , r ) { var i = this , o = this . getPanel ( ) , a = t ( o ) . find ( ".tree-holder" ) , n = n ? t . extend ( { } , this . getRequestParams ( ) , n ) : this . getRequestParams ( ) , s
this . getCurrentXhr ( ) && this . getCurrentXhr ( ) . abort ( ) , o . addClass ( "loading" ) , s = t . ajax ( { url : this . data ( "urlTree" ) , data : n , complete : function e ( t , n ) { o . removeClass ( "loading" ) } , success : function e ( n , o , s ) { a . html ( n )
var l = ! 0
a . jstree ( "destroy" ) . bind ( "loaded.jstree" , function ( e , t ) { var n = i . getValue ( ) , o = a . find ( '*[data-id="' + n + '"]' ) , s = t . inst . get _selected ( )
n && o != s && t . inst . select _node ( o ) , l = ! 1 , r && r . apply ( i ) } ) . jstree ( i . getTreeConfig ( ) ) . bind ( "select_node.jstree" , function ( e , n ) { var r = n . rslt . obj , o = t ( r ) . data ( "id" )
l || i . getValue ( ) != o ? ( i . data ( "metadata" , t . extend ( { id : o } , t ( r ) . getMetaData ( ) ) ) , i . setTitle ( n . inst . get _text ( r ) ) , i . setValue ( o ) ) : ( i . data ( "metadata" , null ) , i . setTitle ( null ) , i . setValue ( null ) , n . inst . deselect _node ( r ) ) ,
l || i . closePanel ( ) , l = ! 1 } ) , i . setCurrentXhr ( null ) } } ) , this . setCurrentXhr ( s ) } , getTreeConfig : function e ( ) { var n = this
return { core : { html _titles : ! 0 , animation : 0 } , html _data : { data : this . getPanel ( ) . find ( ".tree-holder" ) . html ( ) , ajax : { url : function e ( r ) { var e = t . path . parseUrl ( n . data ( "urlTree" ) ) . hrefNoSearch
return e + "/" + ( t ( r ) . data ( "id" ) ? t ( r ) . data ( "id" ) : 0 ) } , data : function e ( r ) { var i = t . query . load ( n . data ( "urlTree" ) ) . keys , o = n . getRequestParams ( )
return o = t . extend ( { } , i , o , { ajax : 1 } ) } } } , ui : { select _limit : 1 , initially _select : [ this . getPanel ( ) . find ( ".current" ) . attr ( "id" ) ] } , themes : { theme : "apple" } , types : { types : { default : { check _node : function e ( t ) { return ! t . hasClass ( "disabled" )
} , uncheck _node : function e ( t ) { return ! t . hasClass ( "disabled" ) } , select _node : function e ( t ) { return ! t . hasClass ( "disabled" ) } , deselect _node : function e ( t ) { return ! t . hasClass ( "disabled" ) } } } } , plugins : [ "html_data" , "ui" , "themes" , "types" ]
} } , getRequestParams : function e ( ) { return { } } } ) , t ( ".TreeDropdownField .tree-holder li" ) . entwine ( { getMetaData : function e ( ) { var t = this . attr ( "class" ) . match ( /class-([^\s]*)/i ) , n = t ? t [ 1 ] : ""
return { ClassName : n } } } ) , t ( ".TreeDropdownField *" ) . entwine ( { getField : function e ( ) { return this . parents ( ".TreeDropdownField:first" ) } } ) , t ( ".TreeDropdownField" ) . entwine ( { onclick : function e ( t ) { return this . togglePanel ( ) ,
! 1 } } ) , t ( ".TreeDropdownField .treedropdownfield-panel" ) . entwine ( { onclick : function e ( t ) { return ! 1 } } ) , t ( ".TreeDropdownField.searchable" ) . entwine ( { onadd : function e ( ) { this . _super ( )
var n = a . default . _t ( "TreeDropdownField.ENTERTOSEARCH" )
this . find ( ".treedropdownfield-panel" ) . prepend ( t ( '<input type="text" class="search treedropdownfield-search" data-skip-autofocus="true" placeholder="' + n + '" value="" />' ) ) } , search : function e ( t , n ) { this . openPanel ( ) ,
this . loadTree ( { search : t } , n ) } , cancelSearch : function e ( ) { this . closePanel ( ) , this . loadTree ( ) } } ) , t ( ".TreeDropdownField.searchable input.search" ) . entwine ( { onkeydown : function e ( t ) { var n = this . getField ( )
return 13 == t . keyCode ? ( n . search ( this . val ( ) ) , ! 1 ) : void ( 27 == t . keyCode && n . cancelSearch ( ) ) } } ) , t ( ".TreeDropdownField.multiple" ) . entwine ( { getTreeConfig : function e ( ) { var t = this . _super ( )
return t . checkbox = { override _ui : ! 0 , two _state : ! 0 } , t . plugins . push ( "checkbox" ) , t . ui . select _limit = - 1 , t } , loadTree : function e ( n , r ) { var i = this , o = this . getPanel ( ) , a = t ( o ) . find ( ".tree-holder" ) , n = n ? t . extend ( { } , this . getRequestParams ( ) , n ) : this . getRequestParams ( ) , s
this . getCurrentXhr ( ) && this . getCurrentXhr ( ) . abort ( ) , o . addClass ( "loading" ) , s = t . ajax ( { url : this . data ( "urlTree" ) , data : n , complete : function e ( t , n ) { o . removeClass ( "loading" ) } , success : function e ( n , o , s ) { a . html ( n )
var l = ! 0
i . setCurrentXhr ( null ) , a . jstree ( "destroy" ) . bind ( "loaded.jstree" , function ( e , n ) { t . each ( i . getValue ( ) , function ( e , t ) { n . inst . check _node ( a . find ( "*[data-id=" + t + "]" ) ) } ) , l = ! 1 , r && r . apply ( i ) } ) . jstree ( i . getTreeConfig ( ) ) . bind ( "uncheck_node.jstree check_node.jstree" , function ( e , n ) {
var r = n . inst . get _checked ( null , ! 0 )
i . setValue ( t . map ( r , function ( e , n ) { return t ( e ) . data ( "id" ) } ) ) , i . setTitle ( t . map ( r , function ( e , t ) { return n . inst . get _text ( e ) } ) ) , i . data ( "metadata" , t . map ( r , function ( e , n ) { return { id : t ( e ) . data ( "id" ) , metadata : t ( e ) . getMetaData ( )
} } ) ) } ) } } ) , this . setCurrentXhr ( s ) } , getValue : function e ( ) { var t = this . _super ( )
return t . split ( / *, */ ) } , setValue : function e ( n ) { this . _super ( t . isArray ( n ) ? n . join ( "," ) : n ) } , setTitle : function e ( n ) { this . _super ( t . isArray ( n ) ? n . join ( ", " ) : n ) } , updateTitle : function e ( ) { } } ) , t ( ".TreeDropdownField input[type=hidden]" ) . entwine ( {
onadd : function e ( ) { this . _super ( ) , this . bind ( "change.TreeDropdownField" , function ( ) { t ( this ) . getField ( ) . updateTitle ( ) } ) } , onremove : function e ( ) { this . _super ( ) , this . unbind ( ".TreeDropdownField" ) } } ) } ) } ) . call ( t , n ( 168 ) )
2016-09-21 07:30:24 +02:00
} , , , function ( module , exports , _ _webpack _require _ _ ) { "use strict"
2017-03-09 23:47:09 +01:00
function _interopRequireDefault ( e ) { return e && e . _ _esModule ? e : { default : e } } var _extends = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , _jQuery = _ _webpack _require _ _ ( 1 ) , _jQuery2 = _interopRequireDefault ( _jQuery ) , _i18n = _ _webpack _require _ _ ( 114 ) , _i18n2 = _interopRequireDefault ( _i18n ) , _react = _ _webpack _require _ _ ( 5 ) , _react2 = _interopRequireDefault ( _react ) , _reactDom = _ _webpack _require _ _ ( 183 ) , _reactDom2 = _interopRequireDefault ( _reactDom ) , _reactApollo = _ _webpack _require _ _ ( 197 ) , ss = "undefined" != typeof window . ss ? window . ss : { }
2016-09-21 07:30:24 +02:00
ss . editorWrappers = { } , ss . editorWrappers . tinyMCE = function ( ) { var editorID
2017-03-09 23:47:09 +01:00
return { init : function e ( t ) { editorID = t , this . create ( ) } , destroy : function e ( ) { tinymce . EditorManager . execCommand ( "mceRemoveEditor" , ! 1 , editorID ) } , getInstance : function e ( ) { return tinymce . EditorManager . get ( editorID )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , onopen : function e ( ) { } , onclose : function e ( ) { } , getConfig : function e ( ) { var t = "#" + editorID , n = ( 0 , _jQuery2 . default ) ( t ) . data ( "config" ) , r = this
return n . selector = t , n . setup = function ( e ) { e . on ( "change" , function ( ) { r . save ( ) } ) } , n } , save : function e ( ) { var t = this . getInstance ( )
t . save ( ) , ( 0 , _jQuery2 . default ) ( t . getElement ( ) ) . trigger ( "change" ) } , create : function e ( ) { var t = this . getConfig ( )
"undefined" != typeof t . baseURL && ( tinymce . EditorManager . baseURL = t . baseURL ) , tinymce . init ( t ) } , repaint : function e ( ) { } , isDirty : function e ( ) { return this . getInstance ( ) . isDirty ( ) } , getContent : function e ( ) { return this . getInstance ( ) . getContent ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , getDOM : function e ( ) { return this . getInstance ( ) . getElement ( ) } , getContainer : function e ( ) { return this . getInstance ( ) . getContainer ( ) } , getSelectedNode : function e ( ) { return this . getInstance ( ) . selection . getNode ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , selectNode : function e ( t ) { this . getInstance ( ) . selection . select ( t ) } , setContent : function e ( t , n ) { this . getInstance ( ) . setContent ( t , n ) } , insertContent : function e ( t , n ) { this . getInstance ( ) . insertContent ( t , n ) } , replaceContent : function e ( t , n ) {
this . getInstance ( ) . execCommand ( "mceReplaceContent" , ! 1 , t , n ) } , insertLink : function e ( t , n ) { this . getInstance ( ) . execCommand ( "mceInsertLink" , ! 1 , t , n ) } , removeLink : function e ( ) { this . getInstance ( ) . execCommand ( "unlink" , ! 1 )
2016-09-21 07:30:24 +02:00
2016-11-09 23:54:33 +01:00
} , cleanLink : function cleanLink ( href , node ) { var settings = this . getConfig , cb = settings . urlconverter _callback , cu = tinyMCE . settings . convert _urls
2017-03-09 23:47:09 +01:00
return cb && ( href = eval ( cb + "(href, node, true);" ) ) , cu && href . match ( new RegExp ( "^" + tinyMCE . settings . document _base _url + "(.*)$" ) ) && ( href = RegExp . $1 ) , href . match ( /^javascript:\s*mctmp/ ) && ( href = "" ) , href } , createBookmark : function e ( ) {
return this . getInstance ( ) . selection . getBookmark ( ) } , moveToBookmark : function e ( t ) { this . getInstance ( ) . selection . moveToBookmark ( t ) , this . getInstance ( ) . focus ( ) } , blur : function e ( ) { this . getInstance ( ) . selection . collapse ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , addUndo : function e ( ) { this . getInstance ( ) . undoManager . add ( ) } } } , ss . editorWrappers . default = ss . editorWrappers . tinyMCE , _jQuery2 . default . entwine ( "ss" , function ( e ) { e ( "textarea.htmleditor" ) . entwine ( { Editor : null ,
onadd : function e ( ) { var t = this . data ( "editor" ) || "default" , n = ss . editorWrappers [ t ] ( )
this . setEditor ( n ) , n . init ( this . attr ( "id" ) ) , this . _super ( ) } , onremove : function e ( ) { this . getEditor ( ) . destroy ( ) , this . _super ( ) } , "from .cms-edit-form" : { onbeforesubmitform : function e ( ) { this . getEditor ( ) . save ( ) , this . _super ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , openLinkDialog : function e ( ) { this . openDialog ( "link" ) } , openMediaDialog : function e ( ) { this . openDialog ( "media" ) } , openDialog : function t ( n ) { if ( "media" === n && window . InsertMediaModal ) { var r = e ( "#insert-media-react__dialog-wrapper" )
2016-11-22 03:18:26 +01:00
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return r . length || ( r = e ( '<div id="insert-media-react__dialog-wrapper" />' ) , e ( "body" ) . append ( r ) ) , r . setElement ( this ) , void r . open ( ) } var i = function e ( t ) { return t . charAt ( 0 ) . toUpperCase ( ) + t . slice ( 1 ) . toLowerCase ( )
2016-11-22 03:18:26 +01:00
2017-03-09 23:47:09 +01:00
} , o = this , a = e ( "#cms-editor-dialogs" ) . data ( "url" + i ( n ) + "form" ) , s = e ( ".htmleditorfield-" + n + "dialog" )
if ( ! a ) { if ( "media" === n ) throw new Error ( "Install silverstripe/asset-admin to use media dialog" )
throw new Error ( "Dialog named " + n + " is not available." ) } s . length ? ( s . getForm ( ) . setElement ( this ) , s . html ( "" ) , s . addClass ( "loading" ) , s . open ( ) ) : ( s = e ( '<div class="htmleditorfield-dialog htmleditorfield-' + n + 'dialog loading">' ) ,
e ( "body" ) . append ( s ) ) , e . ajax ( { url : a , complete : function e ( ) { s . removeClass ( "loading" ) } , success : function e ( t ) { s . html ( t ) , s . getForm ( ) . setElement ( o ) , s . trigger ( "ssdialogopen" ) } } ) } } ) , e ( ".htmleditorfield-dialog" ) . entwine ( {
onadd : function t ( ) { this . is ( ".ui-dialog-content" ) || this . ssdialog ( { autoOpen : ! 0 , buttons : { insert : { text : _i18n2 . default . _t ( "HtmlEditorField.INSERT" , "Insert" ) , "data-icon" : "accept" , class : "btn action btn-primary media-insert" ,
click : function t ( ) { e ( this ) . find ( "form" ) . submit ( ) } } } } ) , this . _super ( ) } , getForm : function e ( ) { return this . find ( "form" ) } , open : function e ( ) { this . ssdialog ( "open" ) } , close : function e ( ) { this . ssdialog ( "close" ) } , toggle : function e ( t ) {
this . is ( ":visible" ) ? this . close ( ) : this . open ( ) } , onscroll : function e ( ) { this . animate ( { scrollTop : this . find ( "form" ) . height ( ) } , 500 ) } } ) , e ( "form.htmleditorfield-form" ) . entwine ( { Selection : null , Bookmark : null , Element : null ,
setSelection : function t ( n ) { return this . _super ( e ( n ) ) } , onadd : function e ( ) { var t = this . find ( ":header:first" )
this . getDialog ( ) . attr ( "title" , t . text ( ) ) , this . _super ( ) } , onremove : function e ( ) { this . setSelection ( null ) , this . setBookmark ( null ) , this . setElement ( null ) , this . _super ( ) } , getDialog : function e ( ) { return this . closest ( ".htmleditorfield-dialog" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , fromDialog : { onssdialogopen : function e ( ) { var t = this . getEditor ( )
this . setSelection ( t . getSelectedNode ( ) ) , this . setBookmark ( t . createBookmark ( ) ) , t . blur ( ) , this . find ( ':input:not(:submit)[data-skip-autofocus!="true"]' ) . filter ( ":visible:enabled" ) . eq ( 0 ) . focus ( ) , this . redraw ( ) ,
this . updateFromEditor ( ) } , onssdialogclose : function e ( ) { var t = this . getEditor ( )
t . moveToBookmark ( this . getBookmark ( ) ) , this . setSelection ( null ) , this . setBookmark ( null ) , this . resetFields ( ) } } , getEditor : function e ( ) { return this . getElement ( ) . getEditor ( ) } , modifySelection : function e ( t ) { var n = this . getEditor ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
n . moveToBookmark ( this . getBookmark ( ) ) , t . call ( this , n ) , this . setSelection ( n . getSelectedNode ( ) ) , this . setBookmark ( n . createBookmark ( ) ) , n . blur ( ) } , updateFromEditor : function e ( ) { } , redraw : function e ( ) { } , resetFields : function e ( ) {
this . find ( ".tree-holder" ) . empty ( ) } } ) , e ( "form.htmleditorfield-linkform" ) . entwine ( { onsubmit : function e ( t ) { return this . insertLink ( ) , this . getDialog ( ) . close ( ) , ! 1 } , resetFields : function e ( ) { this . _super ( ) , this [ 0 ] . reset ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , redraw : function e ( ) { this . _super ( )
var t = this . find ( ":input[name=LinkType]:checked" ) . val ( )
this . addAnchorSelector ( ) , this . resetFileField ( ) , this . find ( ".step2" ) . nextAll ( ".field" ) . not ( '.field[id$="' + t + '_Holder"]' ) . hide ( ) , this . find ( '.field[id$="LinkType_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) ,
this . find ( '.field[id$="' + t + '_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) , "internal" != t && "anchor" != t || this . find ( '.field[id$="Anchor_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) ,
"email" == t ? this . find ( '.field[id$="Subject_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) : this . find ( '.field[id$="TargetBlank_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) ,
"anchor" == t && this . find ( '.field[id$="AnchorSelector_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" ) , this . find ( '.field[id$="Description_Holder"]' ) . attr ( "style" , "display: -webkit-flex; display: flex" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , getLinkAttributes : function e ( ) { var t , n = null , r = this . find ( ":input[name=Subject]" ) . val ( ) , i = this . find ( ":input[name=Anchor]" ) . val ( )
switch ( this . find ( ":input[name=TargetBlank]" ) . is ( ":checked" ) && ( n = "_blank" ) , this . find ( ":input[name=LinkType]:checked" ) . val ( ) ) { case "internal" : t = "[sitetree_link,id=" + this . find ( ":input[name=internal]" ) . val ( ) + "]" ,
i && ( t += "#" + i )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "anchor" : t = "#" + i
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "file" : var o = this . find ( ":input[name=file]" ) . val ( )
t = o ? "[file_link,id=" + o + "]" : ""
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "email" : t = "mailto:" + this . find ( ":input[name=email]" ) . val ( ) , r && ( t += "?subject=" + encodeURIComponent ( r ) ) , n = null
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
default : t = this . find ( ":input[name=external]" ) . val ( ) , t . indexOf ( "://" ) == - 1 && ( t = "http://" + t ) } return { href : t , target : n , title : this . find ( ":input[name=Description]" ) . val ( ) } } , insertLink : function e ( ) { this . modifySelection ( function ( e ) {
e . insertLink ( this . getLinkAttributes ( ) ) } ) } , removeLink : function e ( ) { this . modifySelection ( function ( e ) { e . removeLink ( ) } ) , this . resetFileField ( ) , this . close ( ) } , resetFileField : function e ( ) { var t = this . find ( '.ss-uploadfield[id$="file_Holder"]' ) , n = t . data ( "fileupload" ) , r = t . find ( ".ss-uploadfield-item[data-fileid]" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
r . length && ( n . _trigger ( "destroy" , null , { context : r } ) , t . find ( ".ss-uploadfield-addfile" ) . removeClass ( "borderTop" ) ) } , addAnchorSelector : function t ( ) { if ( ! this . find ( ":input[name=AnchorSelector]" ) . length ) { var n = this , r = e ( '<select id="Form_EditorToolbarLinkForm_AnchorSelector" name="AnchorSelector"></select>' )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
this . find ( ":input[name=Anchor]" ) . parent ( ) . append ( r ) , this . updateAnchorSelector ( ) , r . change ( function ( t ) { n . find ( ':input[name="Anchor"]' ) . val ( e ( this ) . val ( ) ) } ) } } , getAnchors : function t ( ) { var n = this . find ( ":input[name=LinkType]:checked" ) . val ( ) , r = e . Deferred ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
switch ( n ) { case "anchor" : var i = [ ] , o = this . getEditor ( )
if ( o ) { var a = o . getContent ( ) . match ( /\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim )
if ( a && a . length ) for ( var s = 0 ; s < a . length ; s ++ ) { var l = a [ s ] . indexOf ( "id=" ) == - 1 ? 7 : 5
i . push ( a [ s ] . substr ( l ) . replace ( /"$/ , "" ) ) } } r . resolve ( i )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "internal" : var u = this . find ( ":input[name=internal]" ) . val ( )
u ? e . ajax ( { url : e . path . addSearchParams ( this . attr ( "action" ) . replace ( "LinkForm" , "getanchors" ) , { PageID : parseInt ( u ) } ) , success : function t ( n , i , o ) { r . resolve ( e . parseJSON ( n ) ) } , error : function e ( t , n ) { r . reject ( t . responseText )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) : r . resolve ( [ ] )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
default : r . reject ( _i18n2 . default . _t ( "HtmlEditorField.ANCHORSNOTSUPPORTED" , "Anchors are not supported for this link type." ) ) } return r . promise ( ) } , updateAnchorSelector : function t ( ) { var n = this , r = this . find ( ":input[name=AnchorSelector]" ) , i = this . getAnchors ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
r . empty ( ) , r . append ( e ( '<option value="" selected="1">' + _i18n2 . default . _t ( "HtmlEditorField.LOOKINGFORANCHORS" , "Looking for anchors..." ) + "</option>" ) ) , i . done ( function ( t ) { if ( r . empty ( ) , r . append ( e ( '<option value="" selected="1">' + _i18n2 . default . _t ( "HtmlEditorField.SelectAnchor" ) + "</option>" ) ) ,
t ) for ( var n = 0 ; n < t . length ; n ++ ) r . append ( e ( '<option value="' + t [ n ] + '">' + t [ n ] + "</option>" ) ) } ) . fail ( function ( t ) { r . empty ( ) , r . append ( e ( '<option value="" selected="1">' + t + "</option>" ) ) } ) , e . browser . msie && r . hide ( ) . show ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , updateFromEditor : function e ( ) { var t = /<\S[^><]*>/g , n , r = this . getCurrentLink ( )
if ( r ) for ( n in r ) { var i = this . find ( ":input[name=" + n + "]" ) , o = r [ n ]
"string" == typeof o && ( o = o . replace ( t , "" ) ) , i . is ( ":checkbox" ) ? i . prop ( "checked" , o ) . change ( ) : i . is ( ":radio" ) ? i . val ( [ o ] ) . change ( ) : i . val ( o ) . change ( ) } } , getCurrentLink : function e ( ) { var t = this . getSelection ( ) , n = "" , r = "" , i = "" , o = "insert" , a = "" , s = null
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return t . length && ( s = t . is ( "a" ) ? t : t = t . parents ( "a:first" ) ) , s && s . length && this . modifySelection ( function ( e ) { e . selectNode ( s [ 0 ] ) } ) , s . attr ( "href" ) || ( s = null ) , s && ( n = s . attr ( "href" ) , r = s . attr ( "target" ) , i = s . attr ( "title" ) ,
a = s . attr ( "class" ) , n = this . getEditor ( ) . cleanLink ( n , s ) , o = "update" ) , n . match ( /^mailto:(.*)$/ ) ? { LinkType : "email" , email : RegExp . $1 , Description : i } : n . match ( /^(assets\/.*)$/ ) || n . match ( /^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/ ) ? {
LinkType : "file" , file : RegExp . $1 , Description : i , TargetBlank : ! ! r } : n . match ( /^#(.*)$/ ) ? { LinkType : "anchor" , Anchor : RegExp . $1 , Description : i , TargetBlank : ! ! r } : n . match ( /^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i ) ? {
LinkType : "internal" , internal : RegExp . $1 , Anchor : RegExp . $2 ? RegExp . $2 . substr ( 1 ) : "" , Description : i , TargetBlank : ! ! r } : n ? { LinkType : "external" , external : n , Description : i , TargetBlank : ! ! r } : null } } ) , e ( "form.htmleditorfield-linkform input[name=LinkType]" ) . entwine ( {
onclick : function e ( t ) { this . parents ( "form:first" ) . redraw ( ) , this . _super ( ) } , onchange : function e ( ) { this . parents ( "form:first" ) . redraw ( )
var t = this . parent ( ) . find ( ":checked" ) . val ( )
"anchor" !== t && "internal" !== t || this . parents ( "form.htmleditorfield-linkform" ) . updateAnchorSelector ( ) , this . _super ( ) } } ) , e ( "form.htmleditorfield-linkform input[name=internal]" ) . entwine ( { onvalueupdated : function e ( ) {
this . parents ( "form.htmleditorfield-linkform" ) . updateAnchorSelector ( ) , this . _super ( ) } } ) , e ( "form.htmleditorfield-linkform :submit[name=action_remove]" ) . entwine ( { onclick : function e ( t ) { return this . parents ( "form:first" ) . removeLink ( ) ,
this . _super ( ) , ! 1 } } ) , e ( ".insert-media-react__dialog-wrapper .nav-link" ) . entwine ( { onclick : function e ( t ) { return t . preventDefault ( ) } } ) , e ( "#insert-media-react__dialog-wrapper" ) . entwine ( { Element : null , Data : { } ,
onunmatch : function e ( ) { this . _clearModal ( ) } , _clearModal : function e ( ) { _reactDom2 . default . unmountComponentAtNode ( this [ 0 ] ) } , open : function e ( ) { this . _renderModal ( ! 0 ) } , close : function e ( ) { this . _renderModal ( ! 1 )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , _renderModal : function e ( t ) { var n = this , r = function e ( ) { return n . close ( ) } , i = function e ( ) { return n . _handleInsert . apply ( n , arguments ) } , o = window . ss . store , a = window . ss . apolloClient , s = this . getOriginalAttributes ( ) , l = window . InsertMediaModal . default
2016-11-22 03:18:26 +01:00
2017-03-09 23:47:09 +01:00
if ( ! l ) throw new Error ( "Invalid Insert media modal component found" )
delete s . url , _reactDom2 . default . render ( _react2 . default . createElement ( _reactApollo . ApolloProvider , { store : o , client : a } , _react2 . default . createElement ( l , { title : ! 1 , show : t , onInsert : i , onHide : r , bodyClassName : "modal__dialog" ,
className : "insert-media-react__dialog-wrapper" , fileAttributes : s } ) ) , this [ 0 ] ) } , _handleInsert : function e ( t , n ) { var r = ! 1
this . setData ( _extends ( { } , t , n ) )
try { switch ( n . category ) { case "image" : r = this . insertImage ( )
2016-11-22 03:18:26 +01:00
break
2017-03-09 23:47:09 +01:00
default : r = this . insertFile ( ) } } catch ( e ) { this . statusMessage ( e , "bad" ) } return r && this . close ( ) , Promise . resolve ( ) } , getOriginalAttributes : function t ( ) { var n = this . getElement ( )
2016-11-22 03:18:26 +01:00
if ( ! n ) return { }
2017-03-09 23:47:09 +01:00
var r = n . getEditor ( ) . getSelectedNode ( )
if ( ! r ) return { }
var i = e ( r ) , o = i . parent ( ".captionImage" ) . find ( ".caption" ) , a = { url : i . attr ( "src" ) , AltText : i . attr ( "alt" ) , InsertWidth : i . attr ( "width" ) , InsertHeight : i . attr ( "height" ) , TitleTooltip : i . attr ( "title" ) , Alignment : i . attr ( "class" ) ,
Caption : o . text ( ) , ID : i . attr ( "data-id" ) }
return [ "InsertWidth" , "InsertHeight" , "ID" ] . forEach ( function ( e ) { a [ e ] = "string" == typeof a [ e ] ? parseInt ( a [ e ] , 10 ) : null } ) , a } , getAttributes : function e ( ) { var t = this . getData ( )
return { src : t . url , alt : t . AltText , width : t . InsertWidth , height : t . InsertHeight , title : t . TitleTooltip , class : t . Alignment , "data-id" : t . ID } } , getExtraData : function e ( ) { var t = this . getData ( )
return { CaptionText : t && t . Caption } } , insertFile : function e ( ) { return this . statusMessage ( _i18n2 . default . _t ( "HTMLEditorField_Toolbar.ERROR_OEMBED_REMOTE" , "Embed is only compatible with remote files" ) , "bad" ) ,
! 1 } , insertImage : function t ( ) { var n = this . getElement ( )
2016-11-22 03:18:26 +01:00
if ( ! n ) return ! 1
2017-03-09 23:47:09 +01:00
var r = n . getEditor ( )
if ( ! r ) return ! 1
var i = e ( r . getSelectedNode ( ) ) , o = this . getAttributes ( ) , a = this . getExtraData ( ) , s = i && i . is ( "img" ) ? i : null
s && s . parent ( ) . is ( ".captionImage" ) && ( s = s . parent ( ) )
var l = i && i . is ( "img" ) ? i : e ( "<img />" )
l . attr ( o )
var u = l . parent ( ".captionImage" ) , c = u . find ( ".caption" )
a . CaptionText ? ( u . length || ( u = e ( "<div></div>" ) ) , u . attr ( "class" , "captionImage " + o . class ) . css ( "width" , o . width ) , c . length || ( c = e ( '<p class="caption"></p>' ) . appendTo ( u ) ) , c . attr ( "class" , "caption " + o . class ) . text ( a . CaptionText ) ) : u = c = null
var d = u || l
return s && s . not ( d ) . length && s . replaceWith ( d ) , u && u . prepend ( l ) , s || ( r . repaint ( ) , r . insertContent ( e ( "<div />" ) . append ( d ) . html ( ) , { skip _undo : 1 } ) ) , r . addUndo ( ) , r . repaint ( ) , ! 0 } , statusMessage : function t ( n , r ) { var i = e ( "<div/>" ) . text ( n ) . html ( )
e . noticeAdd ( { text : i , type : r , stayTime : 5e3 , inEffect : { left : "0" , opacity : "show" } } ) } } ) } ) } , function ( e , t ) { e . exports = ReactApollo } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i )
n ( 169 ) , n ( 199 ) , n ( 194 ) , o . default . entwine ( "ss" , function ( e ) { e ( ".ss-tabset" ) . entwine ( { IgnoreTabState : ! 1 , onadd : function e ( ) { var t = window . location . hash
this . redrawTabs ( ) , "" !== t && this . openTabFromURL ( t ) , this . _super ( ) } , onremove : function e ( ) { this . data ( "tabs" ) && this . tabs ( "destroy" ) , this . _super ( ) } , redrawTabs : function e ( ) { this . rewriteHashlinks ( ) , this . tabs ( ) } ,
openTabFromURL : function t ( n ) { var r
e . each ( this . find ( ".ui-tabs-anchor" ) , function ( ) { if ( this . href . indexOf ( n ) !== - 1 && 1 === e ( n ) . length ) return r = e ( this ) , ! 1 } ) , void 0 !== r && e ( document ) . ready ( "ajaxComplete" , function ( ) { r . click ( ) } ) } , rewriteHashlinks : function t ( ) {
2016-09-21 07:30:24 +02:00
e ( this ) . find ( "ul a" ) . each ( function ( ) { if ( e ( this ) . attr ( "href" ) ) { var t = e ( this ) . attr ( "href" ) . match ( /#.*/ )
2017-03-09 23:47:09 +01:00
t && e ( this ) . attr ( "href" , document . location . href . replace ( /#.*/ , "" ) + t [ 0 ] ) } } ) } } ) , e ( ".ui-tabs-active .ui-tabs-anchor" ) . entwine ( { onmatch : function e ( ) { this . addClass ( "nav-link active" ) } , onunmatch : function e ( ) { this . removeClass ( "active" )
2016-09-21 07:30:24 +02:00
} } ) } ) } , , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 1 ) , o = r ( i ) , a = n ( 114 ) , s = r ( a )
n ( 169 ) , n ( 194 ) , o . default . entwine ( "ss" , function ( e ) { e ( ".grid-field" ) . entwine ( { reload : function t ( n , r ) { var i = this , o = this . closest ( "form" ) , a = this . find ( ":input:focus" ) . attr ( "name" ) , l = o . find ( ":input" ) . serializeArray ( )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
n || ( n = { } ) , n . data || ( n . data = [ ] ) , n . data = n . data . concat ( l ) , window . location . search && ( n . data = window . location . search . replace ( /^\?/ , "" ) + "&" + e . param ( n . data ) ) , o . addClass ( "loading" ) , e . ajax ( e . extend ( { } , { headers : { "X-Pjax" : "CurrentField"
2017-03-09 23:47:09 +01:00
} , type : "POST" , url : this . data ( "url" ) , dataType : "html" , success : function t ( s ) { if ( i . empty ( ) . append ( e ( s ) . children ( ) ) , a && i . find ( ':input[name="' + a + '"]' ) . focus ( ) , i . find ( ".filter-header" ) . length ) { var l
"show" == n . data [ 0 ] . filter ? ( l = '<span class="non-sortable"></span>' , i . addClass ( "show-filter" ) . find ( ".filter-header" ) . show ( ) ) : ( l = '<button type="button" title="Open search and filter" name="showFilter" class="btn btn-secondary font-icon-search btn--no-text btn--icon-large grid-field__filter-open"></button>' ,
i . removeClass ( "show-filter" ) . find ( ".filter-header" ) . hide ( ) ) , i . find ( ".sortable-header th:last" ) . html ( l ) } o . removeClass ( "loading" ) , r && r . apply ( this , arguments ) , i . trigger ( "reload" , i ) } , error : function e ( t ) { alert ( s . default . _t ( "GRIDFIELD.ERRORINTRANSACTION" ) ) ,
o . removeClass ( "loading" ) } } , n ) ) } , showDetailView : function e ( t ) { window . location . href = t } , getItems : function e ( ) { return this . find ( ".ss-gridfield-item" ) } , setState : function e ( t , n ) { var r = this . getState ( )
r [ t ] = n , this . find ( ':input[name="' + this . data ( "name" ) + '[GridState]"]' ) . val ( JSON . stringify ( r ) ) } , getState : function e ( ) { return JSON . parse ( this . find ( ':input[name="' + this . data ( "name" ) + '[GridState]"]' ) . val ( ) ) } } ) ,
e ( ".grid-field *" ) . entwine ( { getGridField : function e ( ) { return this . closest ( ".grid-field" ) } } ) , e ( ".grid-field :button[name=showFilter]" ) . entwine ( { onclick : function e ( t ) { this . closest ( ".grid-field__table" ) . find ( ".filter-header" ) . show ( ) . find ( ":input:first" ) . focus ( ) ,
this . closest ( ".grid-field" ) . addClass ( "show-filter" ) , this . parent ( ) . html ( '<span class="non-sortable"></span>' ) , t . preventDefault ( ) } } ) , e ( ".grid-field .ss-gridfield-item" ) . entwine ( { onclick : function t ( n ) { if ( e ( n . target ) . closest ( ".action" ) . length ) return this . _super ( n ) ,
2016-09-21 07:30:24 +02:00
! 1
2017-03-09 23:47:09 +01:00
var r = this . find ( ".edit-link" )
r . length && this . getGridField ( ) . showDetailView ( r . prop ( "href" ) ) } , onmouseover : function e ( ) { this . find ( ".edit-link" ) . length && this . css ( "cursor" , "pointer" ) } , onmouseout : function e ( ) { this . css ( "cursor" , "default" )
2016-12-12 01:52:42 +01:00
2017-03-09 23:47:09 +01:00
} } ) , e ( ".grid-field .action.action_import:button" ) . entwine ( { onclick : function e ( t ) { t . preventDefault ( ) , this . openmodal ( ) } , onmatch : function e ( ) { this . _super ( ) , "open" === this . data ( "state" ) && this . openmodal ( ) } , onunmatch : function e ( ) {
this . _super ( ) } , openmodal : function t ( ) { var n = e ( this . data ( "target" ) ) , r = e ( this . data ( "modal" ) )
n . length < 1 ? ( n = r , n . appendTo ( document . body ) ) : n . innerHTML = r . innerHTML
var i = e ( ".modal-backdrop" )
i . length < 1 && ( i = e ( '<div class="modal-backdrop fade"></div>' ) , i . appendTo ( document . body ) ) , n . find ( "[data-dismiss]" ) . on ( "click" , function ( ) { i . removeClass ( "in" ) , n . removeClass ( "in" ) , setTimeout ( function ( ) { i . remove ( )
2016-12-21 04:54:29 +01:00
2017-03-09 23:47:09 +01:00
} , . 2 ) } ) , setTimeout ( function ( ) { i . addClass ( "in" ) , n . addClass ( "in" ) } , 0 ) } } ) , e ( ".grid-field .action:button" ) . entwine ( { onclick : function e ( t ) { var n = "show"
return this . is ( ":disabled" ) ? void t . preventDefault ( ) : ( ! this . hasClass ( "ss-gridfield-button-close" ) && this . closest ( ".grid-field" ) . hasClass ( "show-filter" ) || ( n = "hidden" ) , this . getGridField ( ) . reload ( { data : [ { name : this . attr ( "name" ) ,
value : this . val ( ) , filter : n } ] } ) , void t . preventDefault ( ) ) } , actionurl : function t ( ) { var n = this . closest ( ":button" ) , r = this . getGridField ( ) , i = this . closest ( "form" ) , o = i . find ( ":input.gridstate" ) . serialize ( ) , a = i . find ( 'input[name="SecurityID"]' ) . val ( )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
o += "&" + encodeURIComponent ( n . attr ( "name" ) ) + "=" + encodeURIComponent ( n . val ( ) ) , a && ( o += "&SecurityID=" + encodeURIComponent ( a ) ) , window . location . search && ( o = window . location . search . replace ( /^\?/ , "" ) + "&" + o )
var s = r . data ( "url" ) . indexOf ( "?" ) == - 1 ? "?" : "&"
return e . path . makeUrlAbsolute ( r . data ( "url" ) + s + o , e ( "base" ) . attr ( "href" ) ) } } ) , e ( ".grid-field .add-existing-autocompleter" ) . entwine ( { onbuttoncreate : function e ( ) { var t = this
this . toggleDisabled ( ) , this . find ( 'input[type="text"]' ) . on ( "keyup" , function ( ) { t . toggleDisabled ( ) } ) } , onunmatch : function e ( ) { this . find ( 'input[type="text"]' ) . off ( "keyup" ) } , toggleDisabled : function e ( ) { var t = this . find ( ".ss-ui-button" ) , n = this . find ( 'input[type="text"]' ) , r = "" !== n . val ( ) , i = t . is ( ":disabled" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
; ( r && i || ! r && ! i ) && t . attr ( "disabled" , ! i ) } } ) , e ( ".grid-field .grid-field__col-compact .action.gridfield-button-delete, .cms-edit-form .btn-toolbar button.action.action-delete" ) . entwine ( { onclick : function e ( t ) {
return confirm ( s . default . _t ( "TABLEFIELD.DELETECONFIRMMESSAGE" ) ) ? void this . _super ( t ) : ( t . preventDefault ( ) , ! 1 ) } } ) , e ( ".grid-field .action.gridfield-button-print" ) . entwine ( { UUID : null , onmatch : function e ( ) { this . _super ( ) ,
this . setUUID ( ( new Date ) . getTime ( ) ) } , onunmatch : function e ( ) { this . _super ( ) } , onclick : function e ( t ) { var n = this . actionurl ( )
return window . open ( n ) , t . preventDefault ( ) , ! 1 } } ) , e ( ".ss-gridfield-print-iframe" ) . entwine ( { onmatch : function e ( ) { this . _super ( ) , this . hide ( ) . bind ( "load" , function ( ) { this . focus ( )
2016-09-21 07:30:24 +02:00
var e = this . contentWindow || this
2017-03-09 23:47:09 +01:00
e . print ( ) } ) } , onunmatch : function e ( ) { this . _super ( ) } } ) , e ( ".grid-field .action.no-ajax" ) . entwine ( { onclick : function e ( t ) { return window . location . href = this . actionurl ( ) , t . preventDefault ( ) , ! 1 } } ) , e ( ".grid-field .action-detail" ) . entwine ( {
onclick : function t ( ) { return this . getGridField ( ) . showDetailView ( e ( this ) . prop ( "href" ) ) , ! 1 } } ) , e ( ".grid-field[data-selectable]" ) . entwine ( { getSelectedItems : function e ( ) { return this . find ( ".ss-gridfield-item.ui-selected" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , getSelectedIDs : function t ( ) { return e . map ( this . getSelectedItems ( ) , function ( t ) { return e ( t ) . data ( "id" ) } ) } } ) , e ( ".grid-field[data-selectable] .ss-gridfield-items" ) . entwine ( { onadd : function e ( ) { this . _super ( ) ,
this . selectable ( ) } , onremove : function e ( ) { this . _super ( ) , this . data ( "selectable" ) && this . selectable ( "destroy" ) } } ) , e ( ".grid-field .filter-header :input" ) . entwine ( { onmatch : function e ( ) { var t = this . closest ( ".extra" ) . find ( ".ss-gridfield-button-filter" ) , n = this . closest ( ".extra" ) . find ( ".ss-gridfield-button-reset" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
this . val ( ) && ( t . addClass ( "filtered" ) , n . addClass ( "filtered" ) ) , this . _super ( ) } , onunmatch : function e ( ) { this . _super ( ) } , onkeydown : function e ( t ) { if ( ! this . closest ( ".ss-gridfield-button-reset" ) . length ) { var n = this . closest ( ".extra" ) . find ( ".ss-gridfield-button-filter" ) , r = this . closest ( ".extra" ) . find ( ".ss-gridfield-button-reset" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
if ( "13" == t . keyCode ) { var i = this . closest ( ".filter-header" ) . find ( ".ss-gridfield-button-filter" ) , o = "show"
return ! this . hasClass ( "ss-gridfield-button-close" ) && this . closest ( ".grid-field" ) . hasClass ( "show-filter" ) || ( o = "hidden" ) , this . getGridField ( ) . reload ( { data : [ { name : i . attr ( "name" ) , value : i . val ( ) , filter : o } ] } ) , ! 1
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} n . addClass ( "hover-alike" ) , r . addClass ( "hover-alike" ) } } } ) , e ( ".grid-field .relation-search" ) . entwine ( { onfocusin : function t ( n ) { this . autocomplete ( { source : function t ( n , r ) { var i = e ( this . element ) , o = e ( this . element ) . closest ( "form" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
e . ajax ( { headers : { "X-Pjax" : "Partial" } , dataType : "json" , type : "GET" , url : e ( i ) . data ( "searchUrl" ) , data : encodeURIComponent ( i . attr ( "name" ) ) + "=" + encodeURIComponent ( i . val ( ) ) , success : r , error : function e ( t ) { alert ( s . default . _t ( "GRIDFIELD.ERRORINTRANSACTION" , "An error occured while fetching data from the server\n Please try again later." ) )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ) } , select : function t ( n , r ) { var i = e ( '<input type="hidden" name="relationID" class="action_gridfield_relationfind" />' )
i . val ( r . item . id ) , e ( this ) . closest ( ".grid-field" ) . find ( ".action_gridfield_relationfind" ) . replaceWith ( i )
var o = e ( this ) . closest ( ".grid-field" ) . find ( ".action_gridfield_relationadd" )
o . removeAttr ( "disabled" ) } } ) } } ) , e ( ".grid-field .pagination-page-number input" ) . entwine ( { onkeydown : function t ( n ) { if ( 13 == n . keyCode ) { var r = parseInt ( e ( this ) . val ( ) , 10 ) , i = e ( this ) . getGridField ( )
return i . setState ( "GridFieldPaginator" , { currentPage : r } ) , i . reload ( ) , ! 1 } } } ) } ) } , function ( e , t , n ) { "use strict"
2017-02-28 04:01:13 +01:00
function r ( e ) { if ( e && e . _ _esModule ) return e
2016-09-21 07:30:24 +02:00
var t = { }
if ( null != e ) for ( var n in e ) Object . prototype . hasOwnProperty . call ( e , n ) && ( t [ n ] = e [ n ] )
2017-03-09 23:47:09 +01:00
return t . default = e , t } function i ( e ) { return e && e . _ _esModule ? e : { default : e } } function o ( ) { var e = m . default . get ( "absoluteBaseUrl" ) , t = ( 0 , I . createNetworkInterface ) ( { uri : e + "graphql/" , opts : { credentials : "same-origin"
} } ) , n = new A . default ( { shouldBatch : ! 0 , addTypename : ! 0 , dataIdFromObject : function e ( t ) { return t . id >= 0 && t . _ _typename ? t . _ _typename + ":" + t . id : null } , networkInterface : t } )
t . use ( [ { applyMiddleware : function e ( t , n ) { var r = ( 0 , D . printRequest ) ( t . request )
t . options . headers = a ( { } , t . options . headers , { "Content-Type" : "application/x-www-form-urlencoded;charset=UTF-8" } ) , t . options . body = F . default . stringify ( a ( { } , r , { variables : JSON . stringify ( r . variables ) } ) ) , n ( ) } } ] ) ,
y . default . add ( "config" , w . default ) , y . default . add ( "form" , f . reducer ) , y . default . add ( "schemas" , T . default ) , y . default . add ( "records" , E . default ) , y . default . add ( "campaign" , O . default ) , y . default . add ( "breadcrumbs" , j . default ) ,
y . default . add ( "routing" , p . routerReducer ) , y . default . add ( "apollo" , n . reducer ( ) ) , R . default . start ( )
var r = { } , i = ( 0 , u . combineReducers ) ( y . default . getAll ( ) ) , o = [ d . default , n . middleware ( ) ] , s = m . default . get ( "environment" ) , c = m . default . get ( "debugging" ) , h = u . applyMiddleware . apply ( void 0 , o ) , g = window . _ _REDUX _DEVTOOLS _EXTENSION _COMPOSE _ _ , v = window . _ _REDUX _DEVTOOLS _EXTENSION _ _ || window . devToolsExtension
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
"dev" === s && c && ( "function" == typeof g ? h = g ( u . applyMiddleware . apply ( void 0 , o ) ) : "function" == typeof v && ( h = ( 0 , u . compose ) ( u . applyMiddleware . apply ( void 0 , o ) , v ( ) ) ) )
2017-02-28 04:01:13 +01:00
var _ = h ( u . createStore ) , C = _ ( i , r )
2017-03-09 23:47:09 +01:00
C . dispatch ( b . setConfig ( m . default . getAll ( ) ) ) , window . ss = window . ss || { } , window . ss . store = C , window . ss = window . ss || { } , window . ss . apolloClient = n
var P = new l . default ( C , n )
2017-02-28 04:01:13 +01:00
P . start ( window . location . pathname ) , window . jQuery && window . jQuery ( "body" ) . addClass ( "js-react-boot" ) } var a = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-03-09 23:47:09 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , s = n ( 202 ) , l = i ( s ) , u = n ( 107 ) , c = n ( 224 ) , d = i ( c ) , f = n ( 109 ) , p = n ( 223 ) , h = n ( 149 ) , m = i ( h ) , g = n ( 225 ) , y = i ( g ) , v = n ( 226 ) , b = r ( v ) , _ = n ( 228 ) , w = i ( _ ) , C = n ( 229 ) , T = i ( C ) , P = n ( 230 ) , E = i ( P ) , k = n ( 231 ) , O = i ( k ) , S = n ( 233 ) , j = i ( S ) , x = n ( 234 ) , R = i ( x ) , I = n ( 250 ) , A = i ( I ) , D = n ( 251 ) , M = n ( 13 ) , F = i ( M ) , N = n ( 387 ) , L = i ( N ) , U = n ( 10 ) , B = i ( U )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
B . default . polyfill ( ) , window . onload = o } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var o = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , a = n ( 1 ) , s = r ( a ) , l = n ( 5 ) , u = r ( l ) , c = n ( 183 ) , d = r ( c ) , f = n ( 142 ) , p = n ( 203 ) , h = r ( p ) , m = n ( 149 ) , g = r ( m ) , y = n ( 220 ) , v = r ( y ) , b = n ( 221 ) , _ = r ( b ) , w = n ( 222 ) , C = r ( w ) , T = n ( 223 ) , P = n ( 197 ) , E = function ( ) {
2017-02-28 04:01:13 +01:00
function e ( t , n ) { i ( this , e ) , this . store = t , this . client = n
2017-03-09 23:47:09 +01:00
var r = g . default . get ( "absoluteBaseUrl" )
v . default . setAbsoluteBase ( r ) } return o ( e , [ { key : "start" , value : function e ( t ) { this . matchesLegacyRoute ( t ) ? this . initLegacyRouter ( ) : this . initReactRouter ( ) } } , { key : "matchesLegacyRoute" , value : function e ( t ) { var n = g . default . get ( "sections" ) , r = v . default . resolveURLToBase ( t ) . replace ( /\/$/ , "" )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return ! ! Object . keys ( n ) . find ( function ( e ) { var t = n [ e ] , i = v . default . resolveURLToBase ( t . url ) . replace ( /\/$/ , "" )
return ! t . reactRouter && r . match ( i ) } ) } } , { key : "initReactRouter" , value : function e ( ) { _ . default . updateRootRoute ( { component : C . default } )
var t = ( 0 , T . syncHistoryWithStore ) ( ( 0 , f . useRouterHistory ) ( h . default ) ( { basename : g . default . get ( "baseUrl" ) } ) , this . store )
d . default . render ( u . default . createElement ( P . ApolloProvider , { store : this . store , client : this . client } , u . default . createElement ( f . Router , { history : t , routes : _ . default . getRootRoute ( ) } ) ) , document . getElementsByClassName ( "cms-content" ) [ 0 ] )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "initLegacyRouter" , value : function e ( ) { var t = g . default . get ( "sections" ) , n = this . store ; ( 0 , v . default ) ( "*" , function ( e , t ) { e . store = n , t ( ) } )
var r = null
Object . keys ( t ) . forEach ( function ( e ) { var n = v . default . resolveURLToBase ( t [ e ] . url )
n = n . replace ( /\/$/ , "" ) , n += "(/*?)?" , ( 0 , v . default ) ( n , function ( e , t ) { if ( "complete" !== document . readyState || e . init ) return void t ( )
r || ( r = window . location . pathname )
var n = e . data && e . data . _ _forceReload ; ( e . path !== r || n ) && ( r = e . path . replace ( /#.*$/ , "" ) , ( 0 , s . default ) ( ".cms-container" ) . entwine ( "ss" ) . handleStateChange ( null , e . state ) ) } ) } ) , v . default . start ( ) } } ] ) , e } ( )
t . default = E } , , , , , , , , , , , , , , , , , , function ( e , t ) { e . exports = Router } , function ( e , t ) { e . exports = ReactRouteRegister } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = u . default . Children . only ( this . props . children )
2016-10-06 09:37:38 +02:00
2017-03-09 23:47:09 +01:00
return t } } ] ) , t } ( d . default )
t . default = f } , function ( e , t ) { e . exports = ReactRouterRedux } , function ( e , t ) { e . exports = ReduxThunk } , function ( e , t ) { e . exports = ReducerRegister } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e ) { return { type : a . default . SET _CONFIG , payload : { config : e } } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . setConfig = i
var o = n ( 227 ) , a = r ( o ) } , function ( e , t ) { "use strict"
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . default = { SET _CONFIG : "SET_CONFIG" } } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : { } , t = arguments [ 1 ]
switch ( t . type ) { case u . default . SET _CONFIG : return ( 0 , s . default ) ( o ( { } , e , t . payload . config ) )
2016-09-21 07:30:24 +02:00
default : return e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var o = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-03-09 23:47:09 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , a = n ( 108 ) , s = r ( a ) , l = n ( 227 ) , u = r ( l )
t . default = i } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function o ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : d , t = arguments . length > 1 && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : null
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
switch ( t . type ) { case c . default . SET _SCHEMA : return ( 0 , l . default ) ( a ( { } , e , i ( { } , t . payload . id , a ( { } , e [ t . payload . id ] , t . payload ) ) ) )
case c . default . SET _SCHEMA _STATE _OVERRIDES : return ( 0 , l . default ) ( a ( { } , e , i ( { } , t . payload . id , a ( { } , e [ t . payload . id ] , { stateOverride : t . payload . stateOverride } ) ) ) )
case c . default . SET _SCHEMA _LOADING : return ( 0 , l . default ) ( a ( { } , e , i ( { } , t . payload . id , a ( { } , e [ t . payload . id ] , { metadata : a ( { } , e [ t . payload . id ] && e [ t . payload . id ] . metadata , { loading : t . payload . loading } ) } ) ) ) )
2016-09-21 07:30:24 +02:00
default : return e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var a = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e }
2017-03-09 23:47:09 +01:00
t . default = o
var s = n ( 108 ) , l = r ( s ) , u = n ( 33 ) , c = r ( u ) , d = ( 0 , l . default ) ( { } ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function o ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : d , t = arguments [ 1 ] , n = null , r = null , o = null
switch ( t . type ) { case c . default . CREATE _RECORD : return ( 0 , l . default ) ( a ( { } , e , { } ) )
case c . default . UPDATE _RECORD : return ( 0 , l . default ) ( a ( { } , e , { } ) )
case c . default . DELETE _RECORD : return ( 0 , l . default ) ( a ( { } , e , { } ) )
case c . default . FETCH _RECORDS _REQUEST : return e
case c . default . FETCH _RECORDS _FAILURE : return e
case c . default . FETCH _RECORDS _SUCCESS : if ( r = t . payload . recordType , ! r ) throw new Error ( "Undefined record type" )
return n = t . payload . data . _embedded [ r ] || { } , n = n . reduce ( function ( e , t ) { return a ( { } , e , i ( { } , t . ID , t ) ) } , { } ) , ( 0 , l . default ) ( a ( { } , e , i ( { } , r , n ) ) )
case c . default . FETCH _RECORD _REQUEST : return e
case c . default . FETCH _RECORD _FAILURE : return e
case c . default . FETCH _RECORD _SUCCESS : if ( r = t . payload . recordType , o = t . payload . data , ! r ) throw new Error ( "Undefined record type" )
return ( 0 , l . default ) ( a ( { } , e , i ( { } , r , a ( { } , e [ r ] , i ( { } , o . ID , o ) ) ) ) )
case c . default . DELETE _RECORD _REQUEST : return e
case c . default . DELETE _RECORD _FAILURE : return e
case c . default . DELETE _RECORD _SUCCESS : return r = t . payload . recordType , n = e [ r ] , n = Object . keys ( n ) . reduce ( function ( e , r ) { return parseInt ( r , 10 ) !== parseInt ( t . payload . id , 10 ) ? a ( { } , e , i ( { } , r , n [ r ] ) ) : e } , { } ) , ( 0 , l . default ) ( a ( { } , e , i ( { } , r , n ) ) )
2016-09-21 07:30:24 +02:00
2017-01-11 04:16:32 +01:00
default : return e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var a = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , s = n ( 108 ) , l = r ( s ) , u = n ( 125 ) , c = r ( u ) , d = { }
2017-03-09 23:47:09 +01:00
t . default = o } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : c , t = arguments [ 1 ]
switch ( t . type ) { case u . default . SET _CAMPAIGN _SELECTED _CHANGESETITEM : return ( 0 , s . default ) ( o ( { } , e , { changeSetItemId : t . payload . changeSetItemId } ) )
case u . default . SET _CAMPAIGN _ACTIVE _CHANGESET : return ( 0 , s . default ) ( o ( { } , e , { campaignId : t . payload . campaignId , view : t . payload . view , changeSetItemId : null } ) )
case u . default . PUBLISH _CAMPAIGN _REQUEST : return ( 0 , s . default ) ( o ( { } , e , { isPublishing : ! 0 } ) )
case u . default . PUBLISH _CAMPAIGN _SUCCESS : case u . default . PUBLISH _CAMPAIGN _FAILURE : return ( 0 , s . default ) ( o ( { } , e , { isPublishing : ! 1 } ) )
2017-02-28 04:01:13 +01:00
default : return e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
var o = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-03-09 23:47:09 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , a = n ( 108 ) , s = r ( a ) , l = n ( 232 ) , u = r ( l ) , c = ( 0 , s . default ) ( { campaignId : null , changeSetItemId : null , isPublishing : ! 1 , view : null } )
t . default = i } , function ( e , t ) { "use strict"
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . default = { SET _CAMPAIGN _ACTIVE _CHANGESET : "SET_CAMPAIGN_ACTIVE_CHANGESET" , SET _CAMPAIGN _SELECTED _CHANGESETITEM : "SET_CAMPAIGN_SELECTED_CHANGESETITEM" , PUBLISH _CAMPAIGN _REQUEST : "PUBLISH_CAMPAIGN_REQUEST" ,
2016-09-21 07:30:24 +02:00
PUBLISH _CAMPAIGN _SUCCESS : "PUBLISH_CAMPAIGN_SUCCESS" , PUBLISH _CAMPAIGN _FAILURE : "PUBLISH_CAMPAIGN_FAILURE" } } , function ( e , t , n ) { "use strict"
2017-03-09 23:47:09 +01:00
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( ) { var e = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : c , t = arguments [ 1 ]
switch ( t . type ) { case u . default . SET _BREADCRUMBS : return ( 0 , s . default ) ( o ( [ ] , t . payload . breadcrumbs ) )
2016-09-21 07:30:24 +02:00
default : return e } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var o = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-03-09 23:47:09 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , a = n ( 108 ) , s = r ( a ) , l = n ( 145 ) , u = r ( l ) , c = ( 0 , s . default ) ( [ ] )
t . default = i } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-02-28 04:01:13 +01:00
var o = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , a = n ( 103 ) , s = r ( a ) , l = n ( 134 ) , u = r ( l ) , c = n ( 132 ) , d = r ( c ) , f = n ( 235 ) , p = r ( f ) , h = n ( 237 ) , m = r ( h ) , g = n ( 238 ) , y = r ( g ) , v = n ( 239 ) , b = r ( v ) , _ = n ( 240 ) , w = r ( _ ) , C = n ( 241 ) , T = r ( C ) , P = n ( 242 ) , E = r ( P ) , k = n ( 137 ) , O = r ( k ) , S = n ( 243 ) , j = r ( S ) , x = n ( 244 ) , R = r ( x ) , I = n ( 245 ) , A = r ( I ) , D = n ( 246 ) , M = r ( D ) , F = n ( 247 ) , N = r ( F ) , L = n ( 248 ) , U = r ( L ) , B = n ( 249 ) , H = r ( B ) , $ = function ( ) {
function e ( ) { i ( this , e ) } return o ( e , [ { key : "start" , value : function e ( ) { s . default . register ( "TextField" , u . default ) , s . default . register ( "HiddenField" , d . default ) , s . default . register ( "CheckboxField" , p . default ) , s . default . register ( "CheckboxSetField" , m . default ) ,
s . default . register ( "OptionsetField" , y . default ) , s . default . register ( "GridField" , b . default ) , s . default . register ( "FieldGroup" , H . default ) , s . default . register ( "SingleSelectField" , w . default ) , s . default . register ( "PopoverField" , T . default ) ,
s . default . register ( "HeaderField" , E . default ) , s . default . register ( "LiteralField" , O . default ) , s . default . register ( "HtmlReadonlyField" , j . default ) , s . default . register ( "LookupField" , R . default ) , s . default . register ( "CompositeField" , A . default ) ,
s . default . register ( "Tabs" , M . default ) , s . default . register ( "TabItem" , N . default ) , s . default . register ( "FormAction" , U . default ) } } ] ) , e } ( )
t . default = new $ } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-29 22:10:02 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-29 22:10:02 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 236 ) , f = r ( d ) , p = n ( 135 ) , h = r ( p ) , m = n ( 20 ) , g = r ( m ) , y = function ( e ) {
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , l ( t , [ { key : "render" , value : function e ( ) { var t = ( 0 , h . default ) ( f . default )
return c . default . createElement ( t , s ( { } , this . props , { type : "checkbox" , hideLabels : ! 0 } ) ) } } ] ) , t } ( g . default )
t . default = y } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 22 ) , p = r ( f ) , h = n ( 21 ) , m = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleChange = n . handleChange . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "handleChange" , value : function e ( t ) { "function" == typeof this . props . onChange ? this . props . onChange ( t , { id : this . props . id , value : t . target . checked ? 1 : 0
} ) : "function" == typeof this . props . onClick && this . props . onClick ( t , { id : this . props . id , value : t . target . checked ? 1 : 0 } ) } } , { key : "getInputProps" , value : function e ( ) { return { id : this . props . id , name : this . props . name , disabled : this . props . disabled ,
readOnly : this . props . readOnly , className : this . props . className + " " + this . props . extraClass , onChange : this . handleChange , checked : ! ! this . props . value , value : 1 } } } , { key : "render" , value : function e ( ) { var t = null !== this . props . leftTitle ? this . props . leftTitle : this . props . title , n = null
2016-09-29 22:10:02 +02:00
2017-03-09 23:47:09 +01:00
switch ( this . props . type ) { case "checkbox" : n = h . Checkbox
2016-09-29 22:10:02 +02:00
break
2017-03-09 23:47:09 +01:00
case "radio" : n = h . Radio
2016-09-29 22:10:02 +02:00
break
2017-03-09 23:47:09 +01:00
default : throw new Error ( "Invalid OptionField type: " + this . props . type ) } return ( 0 , p . default ) ( n , t , this . getInputProps ( ) ) } } ] ) , t } ( d . default )
m . propTypes = { type : u . default . PropTypes . oneOf ( [ "checkbox" , "radio" ] ) , leftTitle : u . default . PropTypes . any , title : u . default . PropTypes . any , extraClass : u . default . PropTypes . string , id : u . default . PropTypes . string , name : u . default . PropTypes . string . isRequired ,
onChange : u . default . PropTypes . func , value : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number , u . default . PropTypes . bool ] ) , readOnly : u . default . PropTypes . bool , disabled : u . default . PropTypes . bool
} , m . defaultProps = { extraClass : "" , className : "" , type : "radio" , leftTitle : null } , t . default = m } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-29 22:10:02 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-29 22:10:02 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . CheckboxSetField = void 0
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 236 ) , p = r ( f ) , h = n ( 135 ) , m = r ( h ) , g = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . getItemKey = n . getItemKey . bind ( n ) , n . getOptionProps = n . getOptionProps . bind ( n ) , n . handleChange = n . handleChange . bind ( n ) , n . getValues = n . getValues . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "getItemKey" , value : function e ( t , n ) {
return this . props . id + "-" + ( t . value || "empty" + n ) } } , { key : "getValues" , value : function e ( ) { var t = this . props . value
return Array . isArray ( t ) || ! t && "string" != typeof t && "number" != typeof t || ( t = [ t ] ) , t ? t . map ( function ( e ) { return "" + e } ) : [ ] } } , { key : "handleChange" , value : function e ( t , n ) { var r = this
if ( "function" == typeof this . props . onChange ) { var i = this . getValues ( ) , o = this . props . source . filter ( function ( e , t ) { return r . getItemKey ( e , t ) === n . id ? 1 === n . value : i . indexOf ( "" + e . value ) > - 1 } ) . map ( function ( e ) { return "" + e . value
2016-09-29 22:10:02 +02:00
} )
2017-03-09 23:47:09 +01:00
this . props . onChange ( o ) } } } , { key : "getOptionProps" , value : function e ( t , n ) { var r = this . getValues ( ) , i = this . getItemKey ( t , n )
return { key : i , id : i , name : this . props . name , className : this . props . itemClass , disabled : t . disabled || this . props . disabled , readOnly : this . props . readOnly , onChange : this . handleChange , value : r . indexOf ( "" + t . value ) > - 1 , title : t . title ,
type : "checkbox" } } } , { key : "render" , value : function e ( ) { var t = this
return this . props . source ? u . default . createElement ( "div" , null , this . props . source . map ( function ( e , n ) { return u . default . createElement ( p . default , t . getOptionProps ( e , n ) ) } ) ) : null } } ] ) , t } ( d . default )
g . propTypes = { className : u . default . PropTypes . string , extraClass : u . default . PropTypes . string , itemClass : u . default . PropTypes . string , id : u . default . PropTypes . string , name : u . default . PropTypes . string . isRequired , source : u . default . PropTypes . arrayOf ( u . default . PropTypes . shape ( {
value : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number ] ) , title : u . default . PropTypes . any , disabled : u . default . PropTypes . bool } ) ) , onChange : u . default . PropTypes . func , value : u . default . PropTypes . any ,
readOnly : u . default . PropTypes . bool , disabled : u . default . PropTypes . bool } , g . defaultProps = { extraClass : "" , className : "" , value : [ ] } , t . CheckboxSetField = g , t . default = ( 0 , m . default ) ( g ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-29 22:10:02 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-29 22:10:02 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . OptionsetField = void 0
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 236 ) , p = r ( f ) , h = n ( 135 ) , m = r ( h ) , g = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . getItemKey = n . getItemKey . bind ( n ) , n . getOptionProps = n . getOptionProps . bind ( n ) , n . handleChange = n . handleChange . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "getItemKey" , value : function e ( t , n ) { return this . props . id + "-" + ( t . value || "empty" + n )
2016-09-29 22:10:02 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "handleChange" , value : function e ( t , n ) { var r = this
if ( "function" == typeof this . props . onChange && 1 === n . value ) { var i = this . props . source . find ( function ( e , t ) { return r . getItemKey ( e , t ) === n . id } )
this . props . onChange ( i . value ) } } } , { key : "getOptionProps" , value : function e ( t , n ) { var r = this . getItemKey ( t , n )
return { key : r , id : r , name : this . props . name , className : this . props . itemClass , disabled : t . disabled || this . props . disabled , readOnly : this . props . readOnly , onChange : this . handleChange , value : "" + this . props . value == "" + t . value ,
title : t . title , type : "radio" } } } , { key : "render" , value : function e ( ) { var t = this
return this . props . source ? u . default . createElement ( "div" , null , this . props . source . map ( function ( e , n ) { return u . default . createElement ( p . default , t . getOptionProps ( e , n ) ) } ) ) : null } } ] ) , t } ( d . default )
g . propTypes = { extraClass : u . default . PropTypes . string , itemClass : u . default . PropTypes . string , id : u . default . PropTypes . string , name : u . default . PropTypes . string . isRequired , source : u . default . PropTypes . arrayOf ( u . default . PropTypes . shape ( {
value : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number ] ) , title : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number ] ) , disabled : u . default . PropTypes . bool
} ) ) , onChange : u . default . PropTypes . func , value : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number ] ) , readOnly : u . default . PropTypes . bool , disabled : u . default . PropTypes . bool } , g . defaultProps = {
extraClass : "" , className : "" } , t . OptionsetField = g , t . default = ( 0 , m . default ) ( g ) } , function ( e , t ) { e . exports = GridField } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-29 22:10:02 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-29 22:10:02 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . SingleSelectField = void 0
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = n ( 135 ) , h = r ( p ) , m = n ( 114 ) , g = r ( m ) , y = n ( 21 ) , v = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleChange = n . handleChange . bind ( n ) , n } return a ( t , e ) , l ( t , [ { key : "render" , value : function e ( ) { var t = null
return t = this . props . readOnly ? this . getReadonlyField ( ) : this . getSelectField ( ) } } , { key : "getReadonlyField" , value : function e ( ) { var t = this , n = this . props . source && this . props . source . find ( function ( e ) { return e . value === t . props . value
2016-09-21 07:30:24 +02:00
} )
2017-03-09 23:47:09 +01:00
return n = "string" == typeof n ? n : this . props . value , c . default . createElement ( y . FormControl . Static , this . getInputProps ( ) , n ) } } , { key : "getSelectField" , value : function e ( ) { var t = this , n = this . props . source ? this . props . source . slice ( ) : [ ]
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return this . props . data . hasEmptyDefault && ! n . find ( function ( e ) { return ! e . value } ) && n . unshift ( { value : "" , title : this . props . data . emptyString , disabled : ! 1 } ) , c . default . createElement ( y . FormControl , this . getInputProps ( ) , n . map ( function ( e , n ) {
var r = t . props . name + "-" + ( e . value || "empty" + n )
return c . default . createElement ( "option" , { key : r , value : e . value , disabled : e . disabled } , e . title ) } ) ) } } , { key : "getInputProps" , value : function e ( ) { var t = { bsClass : this . props . bsClass , className : this . props . className + " " + this . props . extraClass + " no-chosen" ,
2016-09-29 22:10:02 +02:00
id : this . props . id , name : this . props . name , disabled : this . props . disabled }
2017-03-09 23:47:09 +01:00
return this . props . readOnly || s ( t , { onChange : this . handleChange , value : this . props . value , componentClass : "select" } ) , t } } , { key : "handleChange" , value : function e ( t ) { "function" == typeof this . props . onChange && this . props . onChange ( t , {
id : this . props . id , value : t . target . value } ) } } ] ) , t } ( f . default )
v . propTypes = { id : c . default . PropTypes . string , name : c . default . PropTypes . string . isRequired , onChange : c . default . PropTypes . func , value : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . string , c . default . PropTypes . number ] ) ,
readOnly : c . default . PropTypes . bool , disabled : c . default . PropTypes . bool , source : c . default . PropTypes . arrayOf ( c . default . PropTypes . shape ( { value : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . string , c . default . PropTypes . number ] ) ,
title : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . string , c . default . PropTypes . number ] ) , disabled : c . default . PropTypes . bool } ) ) , data : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . array , c . default . PropTypes . shape ( {
hasEmptyDefault : c . default . PropTypes . bool , emptyString : c . default . PropTypes . oneOfType ( [ c . default . PropTypes . string , c . default . PropTypes . number ] ) } ) ] ) } , v . defaultProps = { source : [ ] , extraClass : "" , className : "" , data : {
emptyString : g . default . _t ( "Boolean.ANY" , "Any" ) } } , t . SingleSelectField = v , t . default = ( 0 , h . default ) ( v ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 21 ) , d = n ( 20 ) , f = r ( d ) , p = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleShow = n . handleShow . bind ( n ) , n . handleHide = n . handleHide . bind ( n ) , n . state = { showing : ! 1 } , n } return a ( t , e ) , s ( t , [ { key : "handleShow" , value : function e ( ) { this . setState ( { showing : ! 0 } ) } } , { key : "handleHide" ,
value : function e ( ) { this . setState ( { showing : ! 1 } ) } } , { key : "render" , value : function e ( ) { var t = this . getPlacement ( ) , n = u . default . createElement ( c . Popover , { id : this . props . id + "_Popover" , className : "fade in popover-" + t ,
title : this . props . data . popoverTitle } , this . props . children ) , r = [ "btn" , "btn-secondary" ]
this . state . showing && r . push ( "btn--no-focus" ) , this . props . title || r . push ( "font-icon-dot-3 btn--no-text btn--icon-xl" )
var i = { id : this . props . id , type : "button" , className : r . join ( " " ) }
return this . props . data . buttonTooltip && ( i . title = this . props . data . buttonTooltip ) , u . default . createElement ( c . OverlayTrigger , { rootClose : ! 0 , trigger : "click" , placement : t , overlay : n , onEnter : this . handleShow , onExited : this . handleHide
} , u . default . createElement ( "button" , i , this . props . title ) ) } } , { key : "getPlacement" , value : function e ( ) { var t = this . props . data . placement
return t || "bottom" } } ] ) , t } ( f . default )
p . propTypes = { id : u . default . PropTypes . string , title : u . default . PropTypes . any , data : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . array , u . default . PropTypes . shape ( { popoverTitle : u . default . PropTypes . string ,
buttonTooltip : u . default . PropTypes . string , placement : u . default . PropTypes . oneOf ( [ "top" , "right" , "bottom" , "left" ] ) } ) ] ) } , t . default = p } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = "h" + ( this . props . data . headingLevel || 3 )
return u . default . createElement ( "div" , { className : "field" } , u . default . createElement ( t , this . getInputProps ( ) , this . props . data . title ) ) } } , { key : "getInputProps" , value : function e ( ) { return { className : this . props . className + " " + this . props . extraClass ,
id : this . props . id } } } ] ) , t } ( d . default )
f . propTypes = { extraClass : u . default . PropTypes . string , id : u . default . PropTypes . string , data : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . array , u . default . PropTypes . shape ( { headingLevel : u . default . PropTypes . number ,
title : u . default . PropTypes . string } ) ] ) . isRequired } , f . defaultProps = { className : "" , extraClass : "" } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
2016-09-29 22:10:02 +02:00
value : ! 0 } ) , t . HtmlReadonlyField = void 0
var s = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , l = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , u = n ( 5 ) , c = r ( u ) , d = n ( 20 ) , f = r ( d ) , p = n ( 135 ) , h = r ( p ) , m = n ( 21 ) , g = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . getContent = n . getContent . bind ( n ) , n } return a ( t , e ) , l ( t , [ { key : "getContent" , value : function e ( ) { return { _ _html : this . props . value } } } , { key : "getInputProps" , value : function e ( ) { return { bsClass : this . props . bsClass ,
componentClass : this . props . componentClass , className : this . props . className + " " + this . props . extraClass , id : this . props . id , name : this . props . name } } } , { key : "render" , value : function e ( ) { return c . default . createElement ( m . FormControl . Static , s ( { } , this . getInputProps ( ) , {
dangerouslySetInnerHTML : this . getContent ( ) } ) ) } } ] ) , t } ( f . default )
g . propTypes = { id : c . default . PropTypes . string , name : c . default . PropTypes . string . isRequired , extraClass : c . default . PropTypes . string , value : c . default . PropTypes . string } , g . defaultProps = { extraClass : "" , className : "" } ,
t . HtmlReadonlyField = g , t . default = ( 0 , h . default ) ( g ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-10-05 03:30:19 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . LookupField = void 0
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 21 ) , p = n ( 135 ) , h = r ( p ) , m = n ( 114 ) , g = r ( m ) , y = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . getValueCSV = n . getValueCSV . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "getValueCSV" , value : function e ( ) { var t = this , n = this . props . value
if ( ! Array . isArray ( n ) && ( n || "string" == typeof n || "number" == typeof n ) ) { var r = this . props . source . find ( function ( e ) { return e . value === n } )
return r ? r . title : "" } return n && n . length ? n . map ( function ( e ) { var n = t . props . source . find ( function ( t ) { return t . value === e } )
return n && n . title } ) . filter ( function ( e ) { return ( "" + e ) . length } ) . join ( ", " ) : "" } } , { key : "getFieldProps" , value : function e ( ) { return { id : this . props . id , name : this . props . name , className : this . props . className + " " + this . props . extraClass
} } } , { key : "render" , value : function e ( ) { if ( ! this . props . source ) return null
var t = "('" + g . default . _t ( "FormField.NONE" , "None" ) + "')"
return u . default . createElement ( f . FormControl . Static , this . getFieldProps ( ) , this . getValueCSV ( ) || t ) } } ] ) , t } ( d . default )
y . propTypes = { extraClass : u . default . PropTypes . string , id : u . default . PropTypes . string , name : u . default . PropTypes . string . isRequired , source : u . default . PropTypes . arrayOf ( u . default . PropTypes . shape ( { value : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . string , u . default . PropTypes . number ] ) ,
title : u . default . PropTypes . any , disabled : u . default . PropTypes . bool } ) ) , value : u . default . PropTypes . any } , y . defaultProps = { extraClass : "" , className : "" , value : [ ] } , t . LookupField = y , t . default = ( 0 , h . default ) ( y ) } , function ( e , t , n ) {
"use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-10-05 03:30:19 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 22 ) , p = r ( f ) , h = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "getLegend" , value : function e ( ) { return "fieldset" === this . props . data . tag && this . props . data . legend ? ( 0 ,
p . default ) ( "legend" , this . props . data . legend ) : null } } , { key : "getClassName" , value : function e ( ) { return this . props . className + " " + this . props . extraClass } } , { key : "render" , value : function e ( ) { var t = this . getLegend ( ) , n = this . props . data . tag || "div" , r = this . getClassName ( )
2016-12-12 03:25:18 +01:00
2017-03-09 23:47:09 +01:00
return u . default . createElement ( n , { className : r } , t , this . props . children ) } } ] ) , t } ( d . default )
h . propTypes = { data : u . default . PropTypes . oneOfType ( [ u . default . PropTypes . array , u . default . PropTypes . shape ( { tag : u . default . PropTypes . string , legend : u . default . PropTypes . string } ) ] ) , extraClass : u . default . PropTypes . string
} , h . defaultProps = { className : "" , extraClass : "" } , t . default = h } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 21 ) , p = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "getContainerProps" , value : function e ( ) { var t = this . props , n = t . activeKey , r = t . onSelect , i = t . className , o = t . extraClass , a = t . id , s = i + " " + o
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return { activeKey : n , className : s , defaultActiveKey : this . getDefaultActiveKey ( ) , onSelect : r , id : a } } } , { key : "getDefaultActiveKey" , value : function e ( ) { var t = this , n = null
if ( "string" == typeof this . props . defaultActiveKey ) { var r = u . default . Children . toArray ( this . props . children ) . find ( function ( e ) { return e . props . name === t . props . defaultActiveKey } )
r && ( n = r . props . name ) } return "string" != typeof n && u . default . Children . forEach ( this . props . children , function ( e ) { "string" != typeof n && ( n = e . props . name ) } ) , n } } , { key : "renderTab" , value : function e ( t ) { return null === t . props . title ? null : u . default . createElement ( f . NavItem , {
eventKey : t . props . name , disabled : t . props . disabled , className : t . props . tabClassName } , t . props . title ) } } , { key : "renderNav" , value : function e ( ) { var t = u . default . Children . map ( this . props . children , this . renderTab )
return t . length <= 1 ? null : u . default . createElement ( f . Nav , { bsStyle : this . props . bsStyle , role : "tablist" } , t ) } } , { key : "render" , value : function e ( ) { var t = this . getContainerProps ( ) , n = this . renderNav ( )
return u . default . createElement ( f . Tab . Container , t , u . default . createElement ( "div" , { className : "wrapper" } , n , u . default . createElement ( f . Tab . Content , { animation : this . props . animation } , this . props . children ) ) ) } } ] ) ,
t } ( d . default )
p . propTypes = { id : u . default . PropTypes . string . isRequired , defaultActiveKey : u . default . PropTypes . string , extraClass : u . default . PropTypes . string } , p . defaultProps = { bsStyle : "tabs" , className : "" , extraClass : "" } , t . default = p
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 21 ) , p = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "getTabProps" , value : function e ( ) { var t = this . props , n = t . name , r = t . className , i = t . extraClass , o = t . disabled , a = t . bsClass , s = t . onEnter , l = t . onEntering , u = t . onEntered , c = t . onExit , d = t . onExiting , f = t . onExited , p = t . animation , h = t . unmountOnExit
2016-09-22 04:21:07 +02:00
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return { eventKey : n , className : r + " " + i , disabled : o , bsClass : a , onEnter : s , onEntering : l , onEntered : u , onExit : c , onExiting : d , onExited : f , animation : p , unmountOnExit : h } } } , { key : "render" , value : function e ( ) { var t = this . getTabProps ( )
2016-09-21 07:30:24 +02:00
2016-09-29 22:10:02 +02:00
2017-03-09 23:47:09 +01:00
return u . default . createElement ( f . Tab . Pane , t , this . props . children ) } } ] ) , t } ( d . default )
p . propTypes = { name : u . default . PropTypes . string . isRequired , extraClass : u . default . PropTypes . string , tabClassName : u . default . PropTypes . string } , p . defaultProps = { className : "" , extraClass : "" } , t . default = p } , function ( e , t ) {
e . exports = FormAction } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-12-12 03:25:18 +01:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-12-12 03:25:18 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } ) , t . FieldGroup = void 0
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = function e ( t , n , r ) { null === t && ( t = Function . prototype )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
var i = Object . getOwnPropertyDescriptor ( t , n )
if ( void 0 === i ) { var o = Object . getPrototypeOf ( t )
return null === o ? void 0 : e ( o , n , r ) } if ( "value" in i ) return i . value
var a = i . get
if ( void 0 !== a ) return a . call ( r ) } , u = n ( 245 ) , c = r ( u ) , d = n ( 135 ) , f = r ( d ) , p = function ( e ) { function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "getClassName" ,
value : function e ( ) { return "field-group-component " + l ( t . prototype . _ _proto _ _ || Object . getPrototypeOf ( t . prototype ) , "getClassName" , this ) . call ( this ) } } ] ) , t } ( c . default )
t . FieldGroup = p , t . default = ( 0 , f . default ) ( p ) } , function ( e , t ) { e . exports = ApolloClient } , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function ( e , t , n ) {
"use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } var i = n ( 142 ) , o = n ( 149 ) , a = r ( o ) , s = n ( 221 ) , l = r ( s ) , u = n ( 388 ) , c = r ( u )
document . addEventListener ( "DOMContentLoaded" , function ( ) { var e = a . default . getSection ( "SilverStripe\\Admin\\CampaignAdmin" )
l . default . add ( { path : e . url , component : ( 0 , i . withRouter ) ( c . default ) , childRoutes : [ { path : ":type/:id/:view" , component : c . default } , { path : "set/:id/:view" , component : c . default } ] } ) } ) } , function ( e , t , n ) { "use strict"
2017-02-28 04:01:13 +01:00
function r ( e ) { if ( e && e . _ _esModule ) return e
2016-09-21 07:30:24 +02:00
var t = { }
if ( null != e ) for ( var n in e ) Object . prototype . hasOwnProperty . call ( e , n ) && ( t [ n ] = e [ n ] )
2017-03-09 23:47:09 +01:00
return t . default = e , t } function i ( e ) { return e && e . _ _esModule ? e : { default : e } } function o ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function a ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function s ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function l ( e ) { return { config : e . config ,
campaignId : e . campaign . campaignId , view : e . campaign . view , breadcrumbs : e . breadcrumbs , sectionConfig : e . config . sections [ "SilverStripe\\Admin\\CampaignAdmin" ] , securityId : e . config . SecurityID } } function u ( e ) { return {
2016-12-12 03:25:18 +01:00
breadcrumbsActions : ( 0 , m . bindActionCreators ) ( _ , e ) } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-01-26 05:20:08 +01:00
var c = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , d = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , f = n ( 5 ) , p = i ( f ) , h = n ( 106 ) , m = n ( 107 ) , g = n ( 142 ) , y = n ( 102 ) , v = i ( y ) , b = n ( 389 ) , _ = r ( b ) , w = n ( 390 ) , C = i ( w ) , T = n ( 20 ) , P = i ( T ) , E = n ( 248 ) , k = i ( E ) , O = n ( 114 ) , S = i ( O ) , j = n ( 391 ) , x = i ( j ) , R = n ( 115 ) , I = i ( R ) , A = n ( 392 ) , D = i ( A ) , M = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { o ( this , t )
var n = a ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . publishApi = v . default . createEndpointFetcher ( { url : n . props . sectionConfig . publishEndpoint . url , method : n . props . sectionConfig . publishEndpoint . method , defaultData : { SecurityID : n . props . securityId } , payloadSchema : {
id : { urlReplacement : ":id" , remove : ! 0 } } } ) , n . handleBackButtonClick = n . handleBackButtonClick . bind ( n ) , n } return s ( t , e ) , d ( t , [ { key : "componentWillMount" , value : function e ( ) { 0 === this . props . breadcrumbs . length && this . setBreadcrumbs ( this . props . params . view , this . props . params . id )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } , { key : "componentWillReceiveProps" , value : function e ( t ) { var n = this . props . params . id !== t . params . id || this . props . params . view !== t . params . view
n && this . setBreadcrumbs ( t . params . view , t . params . id ) } } , { key : "setBreadcrumbs" , value : function e ( t , n ) { var r = [ { text : S . default . _t ( "Campaigns.CAMPAIGN" , "Campaigns" ) , href : this . props . sectionConfig . url } ]
switch ( t ) { case "show" : break
case "edit" : r . push ( { text : S . default . _t ( "Campaigns.EDIT_CAMPAIGN" , "Editing Campaign" ) , href : this . getActionRoute ( n , t ) } )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "create" : r . push ( { text : S . default . _t ( "Campaigns.ADD_CAMPAIGN" , "Add Campaign" ) , href : this . getActionRoute ( n , t ) } ) } this . props . breadcrumbsActions . setBreadcrumbs ( r ) } } , { key : "handleBackButtonClick" , value : function e ( t ) {
if ( this . props . breadcrumbs . length > 1 ) { var n = this . props . breadcrumbs [ this . props . breadcrumbs . length - 2 ]
n && n . href && ( t . preventDefault ( ) , this . props . router . push ( n . href ) ) } } } , { key : "render" , value : function e ( ) { var t = null
switch ( this . props . params . view ) { case "show" : t = this . renderItemListView ( )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "edit" : t = this . renderDetailEditView ( )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "create" : t = this . renderCreateView ( )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
default : t = this . renderIndexView ( ) } return t } } , { key : "renderIndexView" , value : function e ( ) { var t = this . props . sectionConfig . form . EditForm . schemaUrl , n = { title : S . default . _t ( "Campaigns.ADDCAMPAIGN" ) , icon : "plus" , handleClick : this . addCampaign . bind ( this )
} , r = { createFn : this . campaignListCreateFn . bind ( this ) , schemaUrl : t }
return p . default . createElement ( "div" , { className : "fill-height" , "aria-expanded" : "true" } , p . default . createElement ( x . default , null , p . default . createElement ( C . default , { multiline : ! 0 } ) ) , p . default . createElement ( "div" , {
className : "panel panel--padded panel--scrollable flexbox-area-grow" } , p . default . createElement ( "div" , { className : "toolbar toolbar--content" } , p . default . createElement ( "div" , { className : "btn-toolbar" } , p . default . createElement ( k . default , n ) ) ) , p . default . createElement ( I . default , r ) ) )
2016-11-22 03:18:26 +01:00
2017-03-09 23:47:09 +01:00
} } , { key : "renderItemListView" , value : function e ( ) { var t = { sectionConfig : this . props . sectionConfig , campaignId : this . props . params . id , itemListViewEndpoint : this . props . sectionConfig . itemListViewEndpoint , publishApi : this . publishApi ,
2016-11-22 03:18:26 +01:00
handleBackButtonClick : this . handleBackButtonClick . bind ( this ) }
2017-03-09 23:47:09 +01:00
return p . default . createElement ( D . default , t ) } } , { key : "renderDetailEditView" , value : function e ( ) { var t = this . props . sectionConfig . form . DetailEditForm . schemaUrl , n = t
this . props . params . id > 0 && ( n = t + "/" + this . props . params . id )
var r = { createFn : this . campaignEditCreateFn . bind ( this ) , schemaUrl : n }
return p . default . createElement ( "div" , { className : "fill-height" } , p . default . createElement ( x . default , { showBackButton : ! 0 , handleBackButtonClick : this . handleBackButtonClick } , p . default . createElement ( C . default , {
multiline : ! 0 } ) ) , p . default . createElement ( "div" , { className : "panel panel--padded panel--scrollable flexbox-area-grow form--inline" } , p . default . createElement ( I . default , r ) ) ) } } , { key : "renderCreateView" , value : function e ( ) {
var t = this . props . sectionConfig . form . DetailEditForm . schemaUrl , n = t
this . props . params . id > 0 && ( n = t + "/" + this . props . params . id )
var r = { createFn : this . campaignAddCreateFn . bind ( this ) , schemaUrl : n }
return p . default . createElement ( "div" , { className : "fill-height" } , p . default . createElement ( x . default , { showBackButton : ! 0 , handleBackButtonClick : this . handleBackButtonClick } , p . default . createElement ( C . default , {
multiline : ! 0 } ) ) , p . default . createElement ( "div" , { className : "panel panel--padded panel--scrollable flexbox-area-grow form--inline" } , p . default . createElement ( I . default , r ) ) ) } } , { key : "campaignEditCreateFn" , value : function e ( t , n ) {
var r = this , i = this . props . sectionConfig . url
if ( "action_cancel" === n . name ) { var o = c ( { } , n , { handleClick : function e ( t ) { t . preventDefault ( ) , r . props . router . push ( i ) } } )
return p . default . createElement ( t , c ( { key : n . id } , o ) ) } return p . default . createElement ( t , c ( { key : n . id } , n ) ) } } , { key : "campaignAddCreateFn" , value : function e ( t , n ) { var r = this , i = this . props . sectionConfig . url
if ( "action_cancel" === n . name ) { var o = c ( { } , n , { handleClick : function e ( t ) { t . preventDefault ( ) , r . props . router . push ( i ) } } )
return p . default . createElement ( t , c ( { key : n . name } , o ) ) } return p . default . createElement ( t , c ( { key : n . name } , n ) ) } } , { key : "campaignListCreateFn" , value : function e ( t , n ) { var r = this , i = this . props . sectionConfig . url , o = "set"
if ( "GridField" === n . schemaComponent ) { var a = c ( { } , n , { data : c ( { } , n . data , { handleDrillDown : function e ( t , n ) { r . props . router . push ( i + "/" + o + "/" + n . ID + "/show" ) } , handleEditRecord : function e ( t , n ) { r . props . router . push ( i + "/" + o + "/" + n + "/edit" )
2016-09-21 07:30:24 +02:00
} } ) } )
2017-03-09 23:47:09 +01:00
return p . default . createElement ( t , c ( { key : a . name } , a ) ) } return p . default . createElement ( t , c ( { key : n . name } , n ) ) } } , { key : "addCampaign" , value : function e ( ) { var t = this . getActionRoute ( 0 , "create" )
this . props . router . push ( t ) } } , { key : "getActionRoute" , value : function e ( t , n ) { return this . props . sectionConfig . url + "/set/" + t + "/" + n } } ] ) , t } ( P . default )
M . propTypes = { breadcrumbsActions : p . default . PropTypes . object . isRequired , campaignId : p . default . PropTypes . string , sectionConfig : p . default . PropTypes . object . isRequired , securityId : p . default . PropTypes . string . isRequired ,
view : p . default . PropTypes . string } , t . default = ( 0 , g . withRouter ) ( ( 0 , h . connect ) ( l , u ) ( M ) ) } , function ( e , t ) { e . exports = BreadcrumbsActions } , function ( e , t ) { e . exports = Breadcrumb } , function ( e , t ) { e . exports = Toolbar } , function ( e , t , n ) {
"use strict"
2017-02-28 04:01:13 +01:00
function r ( e ) { if ( e && e . _ _esModule ) return e
2016-09-21 07:30:24 +02:00
var t = { }
if ( null != e ) for ( var n in e ) Object . prototype . hasOwnProperty . call ( e , n ) && ( t [ n ] = e [ n ] )
2017-03-09 23:47:09 +01:00
return t . default = e , t } function i ( e ) { return e && e . _ _esModule ? e : { default : e } } function o ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function a ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function s ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2017-02-28 04:01:13 +01:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } function l ( e , t ) { var n = null , r = t . sectionConfig . treeClass
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
return e . records && e . records [ r ] && t . campaignId && ( n = e . records [ r ] [ parseInt ( t . campaignId , 10 ) ] ) , { config : e . config , record : n || { } , campaign : e . campaign , treeClass : r } } function u ( e ) { return { breadcrumbsActions : ( 0 , m . bindActionCreators ) ( v , e ) ,
2016-12-12 03:25:18 +01:00
recordActions : ( 0 , m . bindActionCreators ) ( _ , e ) , campaignActions : ( 0 , m . bindActionCreators ) ( C , e ) } } Object . defineProperty ( t , "__esModule" , { value : ! 0 } )
2017-01-26 05:20:08 +01:00
var c = Object . assign || function ( e ) { for ( var t = 1 ; t < arguments . length ; t ++ ) { var n = arguments [ t ]
2017-02-28 04:01:13 +01:00
for ( var r in n ) Object . prototype . hasOwnProperty . call ( n , r ) && ( e [ r ] = n [ r ] ) } return e } , d = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
2017-03-09 23:47:09 +01:00
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , f = function e ( t , n , r ) { null === t && ( t = Function . prototype )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
var i = Object . getOwnPropertyDescriptor ( t , n )
if ( void 0 === i ) { var o = Object . getPrototypeOf ( t )
return null === o ? void 0 : e ( o , n , r ) } if ( "value" in i ) return i . value
var a = i . get
if ( void 0 !== a ) return a . call ( r ) } , p = n ( 5 ) , h = i ( p ) , m = n ( 107 ) , g = n ( 106 ) , y = n ( 389 ) , v = r ( y ) , b = n ( 124 ) , _ = r ( b ) , w = n ( 393 ) , C = r ( w ) , T = n ( 20 ) , P = i ( T ) , E = n ( 394 ) , k = i ( E ) , O = n ( 395 ) , S = i ( O ) , j = n ( 397 ) , x = i ( j ) , R = n ( 391 ) , I = i ( R ) , A = n ( 248 ) , D = i ( A ) , M = n ( 398 ) , F = i ( M ) , N = n ( 390 ) , L = i ( N ) , U = n ( 399 ) , B = i ( U ) , H = n ( 114 ) , $ = i ( H ) , q = function ( e ) {
2017-02-28 04:01:13 +01:00
function t ( e ) { o ( this , t )
var n = a ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-01-26 05:20:08 +01:00
return n . handlePublish = n . handlePublish . bind ( n ) , n . handleItemSelected = n . handleItemSelected . bind ( n ) , n . setBreadcrumbs = n . setBreadcrumbs . bind ( n ) , n . handleCloseItem = n . handleCloseItem . bind ( n ) , n } return s ( t , e ) , d ( t , [ {
2017-03-09 23:47:09 +01:00
key : "componentDidMount" , value : function e ( ) { var n = this . props . itemListViewEndpoint . url . replace ( /:id/ , this . props . campaignId )
f ( t . prototype . _ _proto _ _ || Object . getPrototypeOf ( t . prototype ) , "componentDidMount" , this ) . call ( this ) , this . setBreadcrumbs ( ) , Object . keys ( this . props . record ) . length || this . props . recordActions . fetchRecord ( this . props . treeClass , "get" , n ) . then ( this . setBreadcrumbs )
} } , { key : "setBreadcrumbs" , value : function e ( ) { if ( this . props . record ) { var t = [ { text : $ . default . _t ( "Campaigns.CAMPAIGN" , "Campaigns" ) , href : this . props . sectionConfig . url } ]
t . push ( { text : this . props . record . Name , href : this . props . sectionConfig . url + "/set/" + this . props . campaignId + "/show" } ) , this . props . breadcrumbsActions . setBreadcrumbs ( t ) } } } , { key : "render" , value : function e ( ) { var t = this , n = this . props . campaign . changeSetItemId , r = null , i = n ? "" : "campaign-admin__campaign--hide-preview" , o = this . props . campaignId , a = this . props . record , s = this . groupItemsForSet ( ) , l = [ ]
Object . keys ( s ) . forEach ( function ( e ) { var i = s [ e ] , u = i . items . length , c = [ ] , d = u + " " + ( 1 === u ? i . singular : i . plural ) , f = "Set_" + o + "_Group_" + e
i . items . forEach ( function ( e ) { n || ( n = e . ID )
var i = n === e . ID
i && e . _links && ( r = e . _links )
var o = [ ]
"none" !== e . ChangeType && "published" !== a . State || o . push ( "list-group-item--inactive" ) , i && o . push ( "active" ) , c . push ( h . default . createElement ( x . default , { key : e . ID , className : o . join ( " " ) , handleClick : t . handleItemSelected ,
handleClickArg : e . ID } , h . default . createElement ( F . default , { item : e , campaign : t . props . record } ) ) ) } ) , l . push ( h . default . createElement ( S . default , { key : f , groupid : f , title : d } , c ) ) } )
var u = [ this . props . config . absoluteBaseUrl , this . props . config . sections [ "SilverStripe\\CMS\\Controllers\\CMSPagesController" ] . url ] . join ( "" ) , c = l . length ? h . default . createElement ( k . default , null , l ) : h . default . createElement ( "div" , {
className : "alert alert-warning" , role : "alert" } , h . default . createElement ( "strong" , null , "This campaign is empty." ) , " You can add items to a campaign by selecting " , h . default . createElement ( "em" , null , "Add to campaign" ) , " from within the " , h . default . createElement ( "em" , null , "More Options " ) , "popup on " , h . default . createElement ( "a" , {
href : u } , "pages" ) , " and files." ) , d = [ "panel" , "panel--padded" , "panel--scrollable" , "flexbox-area-grow" ]
return h . default . createElement ( "div" , { className : "fill-width campaign-admin__campaign " + i } , h . default . createElement ( "div" , { className : "fill-height campaign-admin__campaign-items" , "aria-expanded" : "true" } , h . default . createElement ( I . default , {
showBackButton : ! 0 , handleBackButtonClick : this . props . handleBackButtonClick } , h . default . createElement ( L . default , { multiline : ! 0 } ) ) , h . default . createElement ( "div" , { className : d . join ( " " ) } , c ) , h . default . createElement ( "div" , {
className : "toolbar toolbar--south" } , this . renderButtonToolbar ( ) ) ) , h . default . createElement ( B . default , { itemLinks : r , itemId : n , onBack : this . handleCloseItem } ) ) } } , { key : "handleItemSelected" , value : function e ( t , n ) {
this . props . campaignActions . selectChangeSetItem ( n ) } } , { key : "handleCloseItem" , value : function e ( ) { this . props . campaignActions . selectChangeSetItem ( null ) } } , { key : "renderButtonToolbar" , value : function e ( ) { var t = this . getItems ( )
if ( ! t || ! t . length ) return h . default . createElement ( "div" , { className : "btn-toolbar" } )
var n = { }
return "open" === this . props . record . State ? n = c ( n , { title : $ . default . _t ( "Campaigns.PUBLISHCAMPAIGN" ) , buttonStyle : "primary" , loading : this . props . campaign . isPublishing , handleClick : this . handlePublish , icon : "rocket"
} ) : "published" === this . props . record . State && ( n = c ( n , { title : $ . default . _t ( "Campaigns.REVERTCAMPAIGN" ) , buttonStyle : "secondary-outline" , icon : "back-in-time" , disabled : ! 0 } ) ) , h . default . createElement ( "div" , { className : "btn-toolbar"
} , h . default . createElement ( D . default , n ) ) } } , { key : "getItems" , value : function e ( ) { return this . props . record && this . props . record . _embedded ? this . props . record . _embedded . items : null } } , { key : "groupItemsForSet" , value : function e ( ) {
var t = { } , n = this . getItems ( )
return n ? ( n . forEach ( function ( e ) { var n = e . BaseClass
t [ n ] || ( t [ n ] = { singular : e . Singular , plural : e . Plural , items : [ ] } ) , t [ n ] . items . push ( e ) } ) , t ) : t } } , { key : "handlePublish" , value : function e ( t ) { t . preventDefault ( ) , this . props . campaignActions . publishCampaign ( this . props . publishApi , this . props . treeClass , this . props . campaignId )
} } ] ) , t } ( P . default )
q . propTypes = { campaign : h . default . PropTypes . shape ( { isPublishing : h . default . PropTypes . bool . isRequired , changeSetItemId : h . default . PropTypes . number } ) , breadcrumbsActions : h . default . PropTypes . object . isRequired , campaignActions : h . default . PropTypes . object . isRequired ,
publishApi : h . default . PropTypes . func . isRequired , record : h . default . PropTypes . object . isRequired , recordActions : h . default . PropTypes . object . isRequired , sectionConfig : h . default . PropTypes . object . isRequired , handleBackButtonClick : h . default . PropTypes . func
} , t . default = ( 0 , g . connect ) ( l , u ) ( q ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e ) { return { type : l . default . SET _CAMPAIGN _SELECTED _CHANGESETITEM , payload : { changeSetItemId : e } } } function o ( e , t ) { return function ( n ) { n ( { type : l . default . SET _CAMPAIGN _ACTIVE _CHANGESET ,
payload : { campaignId : e , view : t } } ) } } function a ( e , t , n ) { return function ( r ) { r ( { type : l . default . PUBLISH _CAMPAIGN _REQUEST , payload : { campaignId : n } } ) , e ( { id : n } ) . then ( function ( e ) { r ( { type : l . default . PUBLISH _CAMPAIGN _SUCCESS ,
payload : { campaignId : n } } ) , r ( { type : c . default . FETCH _RECORD _SUCCESS , payload : { recordType : t , data : e } } ) } ) . catch ( function ( e ) { r ( { type : l . default . PUBLISH _CAMPAIGN _FAILURE , payload : { error : e } } ) } ) } } Object . defineProperty ( t , "__esModule" , {
2017-02-28 04:01:13 +01:00
value : ! 0 } ) , t . selectChangeSetItem = i , t . showCampaignView = o , t . publishCampaign = a
2017-03-09 23:47:09 +01:00
var s = n ( 232 ) , l = r ( s ) , u = n ( 125 ) , c = r ( u ) } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { return u . default . createElement ( "div" , { className : "accordion" ,
role : "tablist" , "aria-multiselectable" : "true" } , this . props . children ) } } ] ) , t } ( d . default )
t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
n ( 396 )
var f = function ( e ) { function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = this . props . groupid + "_Header" , n = this . props . groupid + "_Items" , r = n . replace ( /\\/g , "_" ) , i = t . replace ( /\\/g , "_" ) , o = "#" + r , a = {
id : r , "aria-expanded" : ! 0 , className : "list-group list-group-flush collapse in" , role : "tabpanel" , "aria-labelledby" : t }
return u . default . createElement ( "div" , { className : "accordion__block" } , u . default . createElement ( "a" , { className : "accordion__title" , "data-toggle" : "collapse" , href : o , "aria-expanded" : "true" , "aria-controls" : n , id : i ,
role : "tab" } , this . props . title ) , u . default . createElement ( "div" , a , this . props . children ) ) } } ] ) , t } ( d . default )
t . default = f } , function ( e , t ) { e . exports = BootstrapCollapse } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleClick = n . handleClick . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = "list-group-item " + this . props . className
return u . default . createElement ( "a" , { tabIndex : "0" , className : t , onClick : this . handleClick } , this . props . children ) } } , { key : "handleClick" , value : function e ( t ) { this . props . handleClick && this . props . handleClick ( t , this . props . handleClickArg )
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
} } ] ) , t } ( d . default )
f . propTypes = { handleClickArg : u . default . PropTypes . any , handleClick : u . default . PropTypes . func } , t . default = f } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 20 ) , d = r ( c ) , f = n ( 114 ) , p = r ( f ) , h = function ( e ) {
2017-03-09 23:47:09 +01:00
function t ( ) { return i ( this , t ) , o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . apply ( this , arguments ) ) } return a ( t , e ) , s ( t , [ { key : "render" , value : function e ( ) { var t = null , n = { } , r = this . props . item , i = this . props . campaign
2016-09-21 07:30:24 +02:00
2017-03-09 23:47:09 +01:00
if ( "open" === i . State ) switch ( r . ChangeType ) { case "created" : n . className = "label label-warning list-group-item__status" , n . Title = p . default . _t ( "CampaignItem.DRAFT" , "Draft" )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "modified" : n . className = "label label-warning list-group-item__status" , n . Title = p . default . _t ( "CampaignItem.MODIFIED" , "Modified" )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "deleted" : n . className = "label label-error list-group-item__status" , n . Title = p . default . _t ( "CampaignItem.REMOVED" , "Removed" )
2016-09-21 07:30:24 +02:00
break
2017-03-09 23:47:09 +01:00
case "none" : default : n . className = "label label-success list-group-item__status" , n . Title = p . default . _t ( "CampaignItem.NO_CHANGES" , "No changes" ) } var o = u . default . createElement ( "span" , { className : "list-group-item__info campaign-admin__item-links--has-links font-icon-link"
2016-09-21 07:30:24 +02:00
} , "3 linked items" )
2017-03-09 23:47:09 +01:00
return r . Thumbnail && ( t = u . default . createElement ( "span" , { className : "list-group-item__thumbnail" } , u . default . createElement ( "img" , { alt : r . Title , src : r . Thumbnail } ) ) ) , u . default . createElement ( "div" , { className : "fill-height"
} , t , u . default . createElement ( "h4" , { className : "list-group-item-heading" } , r . Title ) , u . default . createElement ( "span" , { className : "list-group-item__info campaign-admin__item-links--is-linked font-icon-link" } ) , o , n . className && n . Title && u . default . createElement ( "span" , {
className : n . className } , n . Title ) ) } } ] ) , t } ( d . default )
h . propTypes = { campaign : u . default . PropTypes . object . isRequired , item : u . default . PropTypes . object . isRequired } , t . default = h } , function ( e , t , n ) { "use strict"
function r ( e ) { return e && e . _ _esModule ? e : { default : e } } function i ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function o ( e , t ) { if ( ! e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
2016-09-21 07:30:24 +02:00
2017-02-28 04:01:13 +01:00
return ! t || "object" != typeof t && "function" != typeof t ? e : t } function a ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof t )
2016-09-21 07:30:24 +02:00
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , t && ( Object . setPrototypeOf ? Object . setPrototypeOf ( e , t ) : e . _ _proto _ _ = t ) } Object . defineProperty ( t , "__esModule" , {
value : ! 0 } )
2017-02-28 04:01:13 +01:00
var s = function ( ) { function e ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } return function ( t , n , r ) { return n && e ( t . prototype , n ) , r && e ( t , r ) , t } } ( ) , l = n ( 5 ) , u = r ( l ) , c = n ( 114 ) , d = r ( c ) , f = n ( 20 ) , p = r ( f ) , h = function ( e ) {
function t ( e ) { i ( this , t )
var n = o ( this , ( t . _ _proto _ _ || Object . getPrototypeOf ( t ) ) . call ( this , e ) )
2017-03-09 23:47:09 +01:00
return n . handleBackClick = n . handleBackClick . bind ( n ) , n } return a ( t , e ) , s ( t , [ { key : "handleBackClick" , value : function e ( t ) { "function" == typeof this . props . onBack && ( t . preventDefault ( ) , this . props . onBack ( t ) ) } } , { key : "render" ,
value : function e ( ) { var t = null , n = null , r = ""
this . props . itemLinks && this . props . itemLinks . preview && ( this . props . itemLinks . preview . Stage ? ( n = this . props . itemLinks . preview . Stage . href , r = this . props . itemLinks . preview . Stage . type ) : this . props . itemLinks . preview . Live && ( n = this . props . itemLinks . preview . Live . href ,
r = this . props . itemLinks . preview . Live . type ) )
var i = null , o = "edit" , a = [ ]
this . props . itemLinks && this . props . itemLinks . edit && ( i = this . props . itemLinks . edit . href , a . push ( u . default . createElement ( "a" , { key : o , href : i , className : "btn btn-secondary-outline font-icon-edit" } , u . default . createElement ( "span" , {
className : "btn__title" } , d . default . _t ( "Preview.EDIT" , "Edit" ) ) ) ) ) , t = this . props . itemId ? n ? r && 0 === r . indexOf ( "image/" ) ? u . default . createElement ( "div" , { className : "preview__file-container panel--scrollable" } , u . default . createElement ( "img" , {
alt : n , className : "preview__file--fits-space" , src : n } ) ) : u . default . createElement ( "iframe" , { className : "flexbox-area-grow preview__iframe" , src : n } ) : u . default . createElement ( "div" , { className : "preview__overlay" } , u . default . createElement ( "h3" , {
className : "preview__overlay-text" } , "There is no preview available for this item." ) ) : u . default . createElement ( "div" , { className : "preview__overlay" } , u . default . createElement ( "h3" , { className : "preview__overlay-text"
} , "No preview available." ) )
var s = "function" == typeof this . props . onBack && u . default . createElement ( "button" , { className : "btn btn-secondary font-icon-left-open-big toolbar__back-button hidden-lg-up" , type : "button" , onClick : this . handleBackClick
2016-10-28 09:48:24 +02:00
} , "Back" )
2017-03-09 23:47:09 +01:00
return u . default . createElement ( "div" , { className : "flexbox-area-grow fill-height preview campaign-admin__campaign-preview" } , t , u . default . createElement ( "div" , { className : "toolbar toolbar--south" } , s , u . default . createElement ( "div" , {
className : "btn-toolbar" } , a ) ) ) } } ] ) , t } ( p . default )
h . propTypes = { itemLinks : u . default . PropTypes . object , itemId : u . default . PropTypes . number , onBack : u . default . PropTypes . func } , t . default = h } ] )