| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055 |
- /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
- ! ( function ( n ) {
- 'function' == typeof define && define.amd
- ? define( [ 'jquery' ], n )
- : 'object' == typeof module && module.exports
- ? ( module.exports = function ( e, t ) {
- return (
- void 0 === t &&
- ( t =
- 'undefined' != typeof window
- ? require( 'jquery' )
- : require( 'jquery' )( e ) ),
- n( t ),
- t
- );
- } )
- : n( jQuery );
- } )( function ( t ) {
- var e,
- n,
- p,
- o,
- r,
- h,
- f,
- g,
- m,
- v,
- y,
- s,
- i,
- _,
- a,
- a =
- ( t &&
- t.fn &&
- t.fn.select2 &&
- t.fn.select2.amd &&
- ( u = t.fn.select2.amd ),
- ( u && u.requirejs ) ||
- ( u ? ( n = u ) : ( u = {} ),
- ( g = {} ),
- ( m = {} ),
- ( v = {} ),
- ( y = {} ),
- ( s = Object.prototype.hasOwnProperty ),
- ( i = [].slice ),
- ( _ = /\.js$/ ),
- ( h = function ( e, t ) {
- var n,
- s,
- i = c( e ),
- o = i[ 0 ],
- t = t[ 1 ];
- return (
- ( e = i[ 1 ] ),
- o && ( n = x( ( o = l( o, t ) ) ) ),
- o
- ? ( e =
- n && n.normalize
- ? n.normalize(
- e,
- ( ( s = t ),
- function ( e ) {
- return l( e, s );
- } )
- )
- : l( e, t ) )
- : ( ( o = ( i = c( ( e = l( e, t ) ) ) )[ 0 ] ),
- ( e = i[ 1 ] ),
- o && ( n = x( o ) ) ),
- { f: o ? o + '!' + e : e, n: e, pr: o, p: n }
- );
- } ),
- ( f = {
- require: function ( e ) {
- return w( e );
- },
- exports: function ( e ) {
- var t = g[ e ];
- return void 0 !== t ? t : ( g[ e ] = {} );
- },
- module: function ( e ) {
- return {
- id: e,
- uri: '',
- exports: g[ e ],
- config:
- ( ( t = e ),
- function () {
- return (
- ( v && v.config && v.config[ t ] ) || {}
- );
- } ),
- };
- var t;
- },
- } ),
- ( o = function ( e, t, n, s ) {
- var i,
- o,
- r,
- a,
- l,
- c = [],
- u = typeof n,
- d = A( ( s = s || e ) );
- if ( 'undefined' == u || 'function' == u ) {
- for (
- t =
- ! t.length && n.length
- ? [ 'require', 'exports', 'module' ]
- : t,
- a = 0;
- a < t.length;
- a += 1
- )
- if (
- 'require' === ( o = ( r = h( t[ a ], d ) ).f )
- )
- c[ a ] = f.require( e );
- else if ( 'exports' === o )
- ( c[ a ] = f.exports( e ) ), ( l = ! 0 );
- else if ( 'module' === o )
- i = c[ a ] = f.module( e );
- else if ( b( g, o ) || b( m, o ) || b( y, o ) )
- c[ a ] = x( o );
- else {
- if ( ! r.p )
- throw new Error( e + ' missing ' + o );
- r.p.load(
- r.n,
- w( s, ! 0 ),
- ( function ( t ) {
- return function ( e ) {
- g[ t ] = e;
- };
- } )( o ),
- {}
- ),
- ( c[ a ] = g[ o ] );
- }
- ( u = n ? n.apply( g[ e ], c ) : void 0 ),
- e &&
- ( i && i.exports !== p && i.exports !== g[ e ]
- ? ( g[ e ] = i.exports )
- : ( u === p && l ) || ( g[ e ] = u ) );
- } else e && ( g[ e ] = n );
- } ),
- ( e = n = r = function ( e, t, n, s, i ) {
- if ( 'string' == typeof e )
- return f[ e ] ? f[ e ]( t ) : x( h( e, A( t ) ).f );
- if ( ! e.splice ) {
- if (
- ( ( v = e ).deps && r( v.deps, v.callback ), ! t )
- )
- return;
- t.splice
- ? ( ( e = t ), ( t = n ), ( n = null ) )
- : ( e = p );
- }
- return (
- ( t = t || function () {} ),
- 'function' == typeof n && ( ( n = s ), ( s = i ) ),
- s
- ? o( p, e, t, n )
- : setTimeout( function () {
- o( p, e, t, n );
- }, 4 ),
- r
- );
- } ),
- ( r.config = function ( e ) {
- return r( e );
- } ),
- ( e._defined = g ),
- ( ( a = function ( e, t, n ) {
- if ( 'string' != typeof e )
- throw new Error(
- 'See almond README: incorrect module build, no module name'
- );
- t.splice || ( ( n = t ), ( t = [] ) ),
- b( g, e ) || b( m, e ) || ( m[ e ] = [ e, t, n ] );
- } ).amd = { jQuery: ! 0 } ),
- ( u.requirejs = e ),
- ( u.require = n ),
- ( u.define = a ) ),
- u.define( 'almond', function () {} ),
- u.define( 'jquery', [], function () {
- var e = t || $;
- return (
- null == e &&
- console &&
- console.error &&
- console.error(
- 'Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page.'
- ),
- e
- );
- } ),
- u.define( 'select2/utils', [ 'jquery' ], function ( o ) {
- var s = {};
- function c( e ) {
- var t,
- n = e.prototype,
- s = [];
- for ( t in n )
- 'function' == typeof n[ t ] &&
- 'constructor' !== t &&
- s.push( t );
- return s;
- }
- ( s.Extend = function ( e, t ) {
- var n,
- s = {}.hasOwnProperty;
- function i() {
- this.constructor = e;
- }
- for ( n in t ) s.call( t, n ) && ( e[ n ] = t[ n ] );
- return (
- ( i.prototype = t.prototype ),
- ( e.prototype = new i() ),
- ( e.__super__ = t.prototype ),
- e
- );
- } ),
- ( s.Decorate = function ( s, i ) {
- var e = c( i ),
- t = c( s );
- function o() {
- var e = Array.prototype.unshift,
- t = i.prototype.constructor.length,
- n = s.prototype.constructor;
- 0 < t &&
- ( e.call( arguments, s.prototype.constructor ),
- ( n = i.prototype.constructor ) ),
- n.apply( this, arguments );
- }
- ( i.displayName = s.displayName ),
- ( o.prototype = new ( function () {
- this.constructor = o;
- } )() );
- for ( var n = 0; n < t.length; n++ ) {
- var r = t[ n ];
- o.prototype[ r ] = s.prototype[ r ];
- }
- for ( var a = 0; a < e.length; a++ ) {
- var l = e[ a ];
- o.prototype[ l ] = ( function ( e ) {
- var t = function () {};
- e in o.prototype && ( t = o.prototype[ e ] );
- var n = i.prototype[ e ];
- return function () {
- return (
- Array.prototype.unshift.call(
- arguments,
- t
- ),
- n.apply( this, arguments )
- );
- };
- } )( l );
- }
- return o;
- } );
- function e() {
- this.listeners = {};
- }
- ( e.prototype.on = function ( e, t ) {
- ( this.listeners = this.listeners || {} ),
- e in this.listeners
- ? this.listeners[ e ].push( t )
- : ( this.listeners[ e ] = [ t ] );
- } ),
- ( e.prototype.trigger = function ( e ) {
- var t = Array.prototype.slice,
- n = t.call( arguments, 1 );
- ( this.listeners = this.listeners || {} ),
- null == n && ( n = [] ),
- 0 === n.length && n.push( {} ),
- ( n[ 0 ]._type = e ) in this.listeners &&
- this.invoke(
- this.listeners[ e ],
- t.call( arguments, 1 )
- ),
- '*' in this.listeners &&
- this.invoke( this.listeners[ '*' ], arguments );
- } ),
- ( e.prototype.invoke = function ( e, t ) {
- for ( var n = 0, s = e.length; n < s; n++ )
- e[ n ].apply( this, t );
- } ),
- ( s.Observable = e ),
- ( s.generateChars = function ( e ) {
- for ( var t = '', n = 0; n < e; n++ )
- t += Math.floor( 36 * Math.random() ).toString(
- 36
- );
- return t;
- } ),
- ( s.bind = function ( e, t ) {
- return function () {
- e.apply( t, arguments );
- };
- } ),
- ( s._convertData = function ( e ) {
- for ( var t in e ) {
- var n = t.split( '-' ),
- s = e;
- if ( 1 !== n.length ) {
- for ( var i = 0; i < n.length; i++ ) {
- var o = n[ i ];
- ( o =
- o.substring( 0, 1 ).toLowerCase() +
- o.substring( 1 ) ) in s ||
- ( s[ o ] = {} ),
- i == n.length - 1 &&
- ( s[ o ] = e[ t ] ),
- ( s = s[ o ] );
- }
- delete e[ t ];
- }
- }
- return e;
- } ),
- ( s.hasScroll = function ( e, t ) {
- var n = o( t ),
- s = t.style.overflowX,
- i = t.style.overflowY;
- return (
- ( s !== i ||
- ( 'hidden' !== i && 'visible' !== i ) ) &&
- ( 'scroll' === s ||
- 'scroll' === i ||
- n.innerHeight() < t.scrollHeight ||
- n.innerWidth() < t.scrollWidth )
- );
- } ),
- ( s.escapeMarkup = function ( e ) {
- var t = {
- '\\': '\',
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '/': '/',
- };
- return 'string' != typeof e
- ? e
- : String( e ).replace(
- /[&<>"'\/\\]/g,
- function ( e ) {
- return t[ e ];
- }
- );
- } ),
- ( s.__cache = {} );
- var n = 0;
- return (
- ( s.GetUniqueElementId = function ( e ) {
- var t = e.getAttribute( 'data-select2-id' );
- return (
- null != t ||
- ( ( t = e.id
- ? 'select2-data-' + e.id
- : 'select2-data-' +
- ( ++n ).toString() +
- '-' +
- s.generateChars( 4 ) ),
- e.setAttribute( 'data-select2-id', t ) ),
- t
- );
- } ),
- ( s.StoreData = function ( e, t, n ) {
- e = s.GetUniqueElementId( e );
- s.__cache[ e ] || ( s.__cache[ e ] = {} ),
- ( s.__cache[ e ][ t ] = n );
- } ),
- ( s.GetData = function ( e, t ) {
- var n = s.GetUniqueElementId( e );
- return t
- ? s.__cache[ n ] && null != s.__cache[ n ][ t ]
- ? s.__cache[ n ][ t ]
- : o( e ).data( t )
- : s.__cache[ n ];
- } ),
- ( s.RemoveData = function ( e ) {
- var t = s.GetUniqueElementId( e );
- null != s.__cache[ t ] && delete s.__cache[ t ],
- e.removeAttribute( 'data-select2-id' );
- } ),
- ( s.copyNonInternalCssClasses = function ( e, t ) {
- var n = ( n = e
- .getAttribute( 'class' )
- .trim()
- .split( /\s+/ ) ).filter( function ( e ) {
- return 0 === e.indexOf( 'select2-' );
- } ),
- t = ( t = t
- .getAttribute( 'class' )
- .trim()
- .split( /\s+/ ) ).filter( function ( e ) {
- return 0 !== e.indexOf( 'select2-' );
- } ),
- t = n.concat( t );
- e.setAttribute( 'class', t.join( ' ' ) );
- } ),
- s
- );
- } ),
- u.define(
- 'select2/results',
- [ 'jquery', './utils' ],
- function ( d, p ) {
- function s( e, t, n ) {
- ( this.$element = e ),
- ( this.data = n ),
- ( this.options = t ),
- s.__super__.constructor.call( this );
- }
- return (
- p.Extend( s, p.Observable ),
- ( s.prototype.render = function () {
- var e = d(
- '<ul class="select2-results__options" role="listbox"></ul>'
- );
- return (
- this.options.get( 'multiple' ) &&
- e.attr( 'aria-multiselectable', 'true' ),
- ( this.$results = e )
- );
- } ),
- ( s.prototype.clear = function () {
- this.$results.empty();
- } ),
- ( s.prototype.displayMessage = function ( e ) {
- var t = this.options.get( 'escapeMarkup' );
- this.clear(), this.hideLoading();
- var n = d(
- '<li role="alert" aria-live="assertive" class="select2-results__option"></li>'
- ),
- s = this.options
- .get( 'translations' )
- .get( e.message );
- n.append( t( s( e.args ) ) ),
- ( n[ 0 ].className +=
- ' select2-results__message' ),
- this.$results.append( n );
- } ),
- ( s.prototype.hideMessages = function () {
- this.$results
- .find( '.select2-results__message' )
- .remove();
- } ),
- ( s.prototype.append = function ( e ) {
- this.hideLoading();
- var t = [];
- if ( null != e.results && 0 !== e.results.length ) {
- e.results = this.sort( e.results );
- for ( var n = 0; n < e.results.length; n++ ) {
- var s = e.results[ n ],
- s = this.option( s );
- t.push( s );
- }
- this.$results.append( t );
- } else
- 0 === this.$results.children().length &&
- this.trigger( 'results:message', {
- message: 'noResults',
- } );
- } ),
- ( s.prototype.position = function ( e, t ) {
- t.find( '.select2-results' ).append( e );
- } ),
- ( s.prototype.sort = function ( e ) {
- return this.options.get( 'sorter' )( e );
- } ),
- ( s.prototype.highlightFirstItem = function () {
- var e = this.$results.find(
- '.select2-results__option--selectable'
- ),
- t = e.filter(
- '.select2-results__option--selected'
- );
- ( 0 < t.length ? t : e )
- .first()
- .trigger( 'mouseenter' ),
- this.ensureHighlightVisible();
- } ),
- ( s.prototype.setClasses = function () {
- var t = this;
- this.data.current( function ( e ) {
- var s = e.map( function ( e ) {
- return e.id.toString();
- } );
- t.$results
- .find(
- '.select2-results__option--selectable'
- )
- .each( function () {
- var e = d( this ),
- t = p.GetData( this, 'data' ),
- n = '' + t.id;
- ( null != t.element &&
- t.element.selected ) ||
- ( null == t.element &&
- -1 < s.indexOf( n ) )
- ? ( this.classList.add(
- 'select2-results__option--selected'
- ),
- e.attr(
- 'aria-selected',
- 'true'
- ) )
- : ( this.classList.remove(
- 'select2-results__option--selected'
- ),
- e.attr(
- 'aria-selected',
- 'false'
- ) );
- } );
- } );
- } ),
- ( s.prototype.showLoading = function ( e ) {
- this.hideLoading();
- ( e = {
- disabled: ! 0,
- loading: ! 0,
- text: this.options
- .get( 'translations' )
- .get( 'searching' )( e ),
- } ),
- ( e = this.option( e ) );
- ( e.className += ' loading-results' ),
- this.$results.prepend( e );
- } ),
- ( s.prototype.hideLoading = function () {
- this.$results.find( '.loading-results' ).remove();
- } ),
- ( s.prototype.option = function ( e ) {
- var t = document.createElement( 'li' );
- t.classList.add( 'select2-results__option' ),
- t.classList.add(
- 'select2-results__option--selectable'
- );
- var n,
- s = { role: 'option' },
- i =
- window.Element.prototype.matches ||
- window.Element.prototype
- .msMatchesSelector ||
- window.Element.prototype
- .webkitMatchesSelector;
- for ( n in ( ( ( null != e.element &&
- i.call( e.element, ':disabled' ) ) ||
- ( null == e.element && e.disabled ) ) &&
- ( ( s[ 'aria-disabled' ] = 'true' ),
- t.classList.remove(
- 'select2-results__option--selectable'
- ),
- t.classList.add(
- 'select2-results__option--disabled'
- ) ),
- null == e.id &&
- t.classList.remove(
- 'select2-results__option--selectable'
- ),
- null != e._resultId && ( t.id = e._resultId ),
- e.title && ( t.title = e.title ),
- e.children &&
- ( ( s.role = 'group' ),
- ( s[ 'aria-label' ] = e.text ),
- t.classList.remove(
- 'select2-results__option--selectable'
- ),
- t.classList.add(
- 'select2-results__option--group'
- ) ),
- s ) ) {
- var o = s[ n ];
- t.setAttribute( n, o );
- }
- if ( e.children ) {
- var r = d( t ),
- a = document.createElement( 'strong' );
- ( a.className = 'select2-results__group' ),
- this.template( e, a );
- for (
- var l = [], c = 0;
- c < e.children.length;
- c++
- ) {
- var u = e.children[ c ],
- u = this.option( u );
- l.push( u );
- }
- i = d( '<ul></ul>', {
- class:
- 'select2-results__options select2-results__options--nested',
- role: 'none',
- } );
- i.append( l ), r.append( a ), r.append( i );
- } else this.template( e, t );
- return p.StoreData( t, 'data', e ), t;
- } ),
- ( s.prototype.bind = function ( t, e ) {
- var i = this,
- n = t.id + '-results';
- this.$results.attr( 'id', n ),
- t.on( 'results:all', function ( e ) {
- i.clear(),
- i.append( e.data ),
- t.isOpen() &&
- ( i.setClasses(),
- i.highlightFirstItem() );
- } ),
- t.on( 'results:append', function ( e ) {
- i.append( e.data ),
- t.isOpen() && i.setClasses();
- } ),
- t.on( 'query', function ( e ) {
- i.hideMessages(), i.showLoading( e );
- } ),
- t.on( 'select', function () {
- t.isOpen() &&
- ( i.setClasses(),
- i.options.get( 'scrollAfterSelect' ) &&
- i.highlightFirstItem() );
- } ),
- t.on( 'unselect', function () {
- t.isOpen() &&
- ( i.setClasses(),
- i.options.get( 'scrollAfterSelect' ) &&
- i.highlightFirstItem() );
- } ),
- t.on( 'open', function () {
- i.$results.attr( 'aria-expanded', 'true' ),
- i.$results.attr(
- 'aria-hidden',
- 'false'
- ),
- i.setClasses(),
- i.ensureHighlightVisible();
- } ),
- t.on( 'close', function () {
- i.$results.attr( 'aria-expanded', 'false' ),
- i.$results.attr(
- 'aria-hidden',
- 'true'
- ),
- i.$results.removeAttr(
- 'aria-activedescendant'
- );
- } ),
- t.on( 'results:toggle', function () {
- var e = i.getHighlightedResults();
- 0 !== e.length && e.trigger( 'mouseup' );
- } ),
- t.on( 'results:select', function () {
- var e,
- t = i.getHighlightedResults();
- 0 !== t.length &&
- ( ( e = p.GetData( t[ 0 ], 'data' ) ),
- t.hasClass(
- 'select2-results__option--selected'
- )
- ? i.trigger( 'close', {} )
- : i.trigger( 'select', {
- data: e,
- } ) );
- } ),
- t.on( 'results:previous', function () {
- var e,
- t = i.getHighlightedResults(),
- n = i.$results.find(
- '.select2-results__option--selectable'
- ),
- s = n.index( t );
- s <= 0 ||
- ( ( e = s - 1 ),
- 0 === t.length && ( e = 0 ),
- ( s = n.eq( e ) ).trigger(
- 'mouseenter'
- ),
- ( t = i.$results.offset().top ),
- ( n = s.offset().top ),
- ( s =
- i.$results.scrollTop() +
- ( n - t ) ),
- 0 === e
- ? i.$results.scrollTop( 0 )
- : n - t < 0 &&
- i.$results.scrollTop( s ) );
- } ),
- t.on( 'results:next', function () {
- var e,
- t = i.getHighlightedResults(),
- n = i.$results.find(
- '.select2-results__option--selectable'
- ),
- s = n.index( t ) + 1;
- s >= n.length ||
- ( ( e = n.eq( s ) ).trigger(
- 'mouseenter'
- ),
- ( t =
- i.$results.offset().top +
- i.$results.outerHeight( ! 1 ) ),
- ( n =
- e.offset().top +
- e.outerHeight( ! 1 ) ),
- ( e = i.$results.scrollTop() + n - t ),
- 0 === s
- ? i.$results.scrollTop( 0 )
- : t < n &&
- i.$results.scrollTop( e ) );
- } ),
- t.on( 'results:focus', function ( e ) {
- e.element[ 0 ].classList.add(
- 'select2-results__option--highlighted'
- ),
- e.element[ 0 ].setAttribute(
- 'aria-selected',
- 'true'
- );
- } ),
- t.on( 'results:message', function ( e ) {
- i.displayMessage( e );
- } ),
- d.fn.mousewheel &&
- this.$results.on(
- 'mousewheel',
- function ( e ) {
- var t = i.$results.scrollTop(),
- n =
- i.$results.get( 0 )
- .scrollHeight -
- t +
- e.deltaY,
- t =
- 0 < e.deltaY &&
- t - e.deltaY <= 0,
- n =
- e.deltaY < 0 &&
- n <= i.$results.height();
- t
- ? ( i.$results.scrollTop( 0 ),
- e.preventDefault(),
- e.stopPropagation() )
- : n &&
- ( i.$results.scrollTop(
- i.$results.get( 0 )
- .scrollHeight -
- i.$results.height()
- ),
- e.preventDefault(),
- e.stopPropagation() );
- }
- ),
- this.$results.on(
- 'mouseup',
- '.select2-results__option--selectable',
- function ( e ) {
- var t = d( this ),
- n = p.GetData( this, 'data' );
- t.hasClass(
- 'select2-results__option--selected'
- )
- ? i.options.get( 'multiple' )
- ? i.trigger( 'unselect', {
- originalEvent: e,
- data: n,
- } )
- : i.trigger( 'close', {} )
- : i.trigger( 'select', {
- originalEvent: e,
- data: n,
- } );
- }
- ),
- this.$results.on(
- 'mouseenter',
- '.select2-results__option--selectable',
- function ( e ) {
- var t = p.GetData( this, 'data' );
- i
- .getHighlightedResults()
- .removeClass(
- 'select2-results__option--highlighted'
- )
- .attr( 'aria-selected', 'false' ),
- i.trigger( 'results:focus', {
- data: t,
- element: d( this ),
- } );
- }
- );
- } ),
- ( s.prototype.getHighlightedResults = function () {
- return this.$results.find(
- '.select2-results__option--highlighted'
- );
- } ),
- ( s.prototype.destroy = function () {
- this.$results.remove();
- } ),
- ( s.prototype.ensureHighlightVisible = function () {
- var e,
- t,
- n,
- s,
- i = this.getHighlightedResults();
- 0 !== i.length &&
- ( ( e = this.$results
- .find(
- '.select2-results__option--selectable'
- )
- .index( i ) ),
- ( s = this.$results.offset().top ),
- ( t = i.offset().top ),
- ( n = this.$results.scrollTop() + ( t - s ) ),
- ( s = t - s ),
- ( n -= 2 * i.outerHeight( ! 1 ) ),
- e <= 2
- ? this.$results.scrollTop( 0 )
- : ( s > this.$results.outerHeight() ||
- s < 0 ) &&
- this.$results.scrollTop( n ) );
- } ),
- ( s.prototype.template = function ( e, t ) {
- var n = this.options.get( 'templateResult' ),
- s = this.options.get( 'escapeMarkup' ),
- e = n( e, t );
- null == e
- ? ( t.style.display = 'none' )
- : 'string' == typeof e
- ? ( t.innerHTML = s( e ) )
- : d( t ).append( e );
- } ),
- s
- );
- }
- ),
- u.define( 'select2/keys', [], function () {
- return {
- BACKSPACE: 8,
- TAB: 9,
- ENTER: 13,
- SHIFT: 16,
- CTRL: 17,
- ALT: 18,
- ESC: 27,
- SPACE: 32,
- PAGE_UP: 33,
- PAGE_DOWN: 34,
- END: 35,
- HOME: 36,
- LEFT: 37,
- UP: 38,
- RIGHT: 39,
- DOWN: 40,
- DELETE: 46,
- };
- } ),
- u.define(
- 'select2/selection/base',
- [ 'jquery', '../utils', '../keys' ],
- function ( n, s, i ) {
- function o( e, t ) {
- ( this.$element = e ),
- ( this.options = t ),
- o.__super__.constructor.call( this );
- }
- return (
- s.Extend( o, s.Observable ),
- ( o.prototype.render = function () {
- var e = n(
- '<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>'
- );
- return (
- ( this._tabindex = 0 ),
- null !=
- s.GetData( this.$element[ 0 ], 'old-tabindex' )
- ? ( this._tabindex = s.GetData(
- this.$element[ 0 ],
- 'old-tabindex'
- ) )
- : null !=
- this.$element.attr( 'tabindex' ) &&
- ( this._tabindex = this.$element.attr(
- 'tabindex'
- ) ),
- e.attr(
- 'title',
- this.$element.attr( 'title' )
- ),
- e.attr( 'tabindex', this._tabindex ),
- e.attr( 'aria-disabled', 'false' ),
- ( this.$selection = e )
- );
- } ),
- ( o.prototype.bind = function ( e, t ) {
- var n = this,
- s = e.id + '-results';
- ( this.container = e ),
- this.$selection.on( 'focus', function ( e ) {
- n.trigger( 'focus', e );
- } ),
- this.$selection.on( 'blur', function ( e ) {
- n._handleBlur( e );
- } ),
- this.$selection.on( 'keydown', function ( e ) {
- n.trigger( 'keypress', e ),
- e.which === i.SPACE &&
- e.preventDefault();
- } ),
- e.on( 'results:focus', function ( e ) {
- n.$selection.attr(
- 'aria-activedescendant',
- e.data._resultId
- );
- } ),
- e.on( 'selection:update', function ( e ) {
- n.update( e.data );
- } ),
- e.on( 'open', function () {
- n.$selection.attr(
- 'aria-expanded',
- 'true'
- ),
- n.$selection.attr( 'aria-owns', s ),
- n._attachCloseHandler( e );
- } ),
- e.on( 'close', function () {
- n.$selection.attr(
- 'aria-expanded',
- 'false'
- ),
- n.$selection.removeAttr(
- 'aria-activedescendant'
- ),
- n.$selection.removeAttr( 'aria-owns' ),
- n.$selection.trigger( 'focus' ),
- n._detachCloseHandler( e );
- } ),
- e.on( 'enable', function () {
- n.$selection.attr(
- 'tabindex',
- n._tabindex
- ),
- n.$selection.attr(
- 'aria-disabled',
- 'false'
- );
- } ),
- e.on( 'disable', function () {
- n.$selection.attr( 'tabindex', '-1' ),
- n.$selection.attr(
- 'aria-disabled',
- 'true'
- );
- } );
- } ),
- ( o.prototype._handleBlur = function ( e ) {
- var t = this;
- window.setTimeout( function () {
- document.activeElement == t.$selection[ 0 ] ||
- n.contains(
- t.$selection[ 0 ],
- document.activeElement
- ) ||
- t.trigger( 'blur', e );
- }, 1 );
- } ),
- ( o.prototype._attachCloseHandler = function ( e ) {
- n( document.body ).on(
- 'mousedown.select2.' + e.id,
- function ( e ) {
- var t = n( e.target ).closest( '.select2' );
- n(
- '.select2.select2-container--open'
- ).each( function () {
- this != t[ 0 ] &&
- s
- .GetData( this, 'element' )
- .select2( 'close' );
- } );
- }
- );
- } ),
- ( o.prototype._detachCloseHandler = function ( e ) {
- n( document.body ).off(
- 'mousedown.select2.' + e.id
- );
- } ),
- ( o.prototype.position = function ( e, t ) {
- t.find( '.selection' ).append( e );
- } ),
- ( o.prototype.destroy = function () {
- this._detachCloseHandler( this.container );
- } ),
- ( o.prototype.update = function ( e ) {
- throw new Error(
- 'The `update` method must be defined in child classes.'
- );
- } ),
- ( o.prototype.isEnabled = function () {
- return ! this.isDisabled();
- } ),
- ( o.prototype.isDisabled = function () {
- return this.options.get( 'disabled' );
- } ),
- o
- );
- }
- ),
- u.define(
- 'select2/selection/single',
- [ 'jquery', './base', '../utils', '../keys' ],
- function ( e, t, n, s ) {
- function i() {
- i.__super__.constructor.apply( this, arguments );
- }
- return (
- n.Extend( i, t ),
- ( i.prototype.render = function () {
- var e = i.__super__.render.call( this );
- return (
- e[ 0 ].classList.add(
- 'select2-selection--single'
- ),
- e.html(
- '<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'
- ),
- e
- );
- } ),
- ( i.prototype.bind = function ( t, e ) {
- var n = this;
- i.__super__.bind.apply( this, arguments );
- var s = t.id + '-container';
- this.$selection
- .find( '.select2-selection__rendered' )
- .attr( 'id', s )
- .attr( 'role', 'textbox' )
- .attr( 'aria-readonly', 'true' ),
- this.$selection.attr( 'aria-labelledby', s ),
- this.$selection.attr( 'aria-controls', s ),
- this.$selection.on(
- 'mousedown',
- function ( e ) {
- 1 === e.which &&
- n.trigger( 'toggle', {
- originalEvent: e,
- } );
- }
- ),
- this.$selection.on(
- 'focus',
- function ( e ) {}
- ),
- this.$selection.on( 'blur', function ( e ) {} ),
- t.on( 'focus', function ( e ) {
- t.isOpen() ||
- n.$selection.trigger( 'focus' );
- } );
- } ),
- ( i.prototype.clear = function () {
- var e = this.$selection.find(
- '.select2-selection__rendered'
- );
- e.empty(), e.removeAttr( 'title' );
- } ),
- ( i.prototype.display = function ( e, t ) {
- var n = this.options.get( 'templateSelection' );
- return this.options.get( 'escapeMarkup' )(
- n( e, t )
- );
- } ),
- ( i.prototype.selectionContainer = function () {
- return e( '<span></span>' );
- } ),
- ( i.prototype.update = function ( e ) {
- var t, n;
- 0 !== e.length
- ? ( ( n = e[ 0 ] ),
- ( t = this.$selection.find(
- '.select2-selection__rendered'
- ) ),
- ( e = this.display( n, t ) ),
- t.empty().append( e ),
- ( n = n.title || n.text )
- ? t.attr( 'title', n )
- : t.removeAttr( 'title' ) )
- : this.clear();
- } ),
- i
- );
- }
- ),
- u.define(
- 'select2/selection/multiple',
- [ 'jquery', './base', '../utils' ],
- function ( i, e, c ) {
- function o( e, t ) {
- o.__super__.constructor.apply( this, arguments );
- }
- return (
- c.Extend( o, e ),
- ( o.prototype.render = function () {
- var e = o.__super__.render.call( this );
- return (
- e[ 0 ].classList.add(
- 'select2-selection--multiple'
- ),
- e.html(
- '<ul class="select2-selection__rendered"></ul>'
- ),
- e
- );
- } ),
- ( o.prototype.bind = function ( e, t ) {
- var n = this;
- o.__super__.bind.apply( this, arguments );
- var s = e.id + '-container';
- this.$selection
- .find( '.select2-selection__rendered' )
- .attr( 'id', s ),
- this.$selection.on( 'click', function ( e ) {
- n.trigger( 'toggle', { originalEvent: e } );
- } ),
- this.$selection.on(
- 'click',
- '.select2-selection__choice__remove',
- function ( e ) {
- var t;
- n.isDisabled() ||
- ( ( t = i( this ).parent() ),
- ( t = c.GetData( t[ 0 ], 'data' ) ),
- n.trigger( 'unselect', {
- originalEvent: e,
- data: t,
- } ) );
- }
- ),
- this.$selection.on(
- 'keydown',
- '.select2-selection__choice__remove',
- function ( e ) {
- n.isDisabled() || e.stopPropagation();
- }
- );
- } ),
- ( o.prototype.clear = function () {
- var e = this.$selection.find(
- '.select2-selection__rendered'
- );
- e.empty(), e.removeAttr( 'title' );
- } ),
- ( o.prototype.display = function ( e, t ) {
- var n = this.options.get( 'templateSelection' );
- return this.options.get( 'escapeMarkup' )(
- n( e, t )
- );
- } ),
- ( o.prototype.selectionContainer = function () {
- return i(
- '<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">×</span></button><span class="select2-selection__choice__display"></span></li>'
- );
- } ),
- ( o.prototype.update = function ( e ) {
- if ( ( this.clear(), 0 !== e.length ) ) {
- for (
- var t = [],
- n =
- this.$selection
- .find(
- '.select2-selection__rendered'
- )
- .attr( 'id' ) + '-choice-',
- s = 0;
- s < e.length;
- s++
- ) {
- var i = e[ s ],
- o = this.selectionContainer(),
- r = this.display( i, o ),
- a = n + c.generateChars( 4 ) + '-';
- i.id
- ? ( a += i.id )
- : ( a += c.generateChars( 4 ) ),
- o
- .find(
- '.select2-selection__choice__display'
- )
- .append( r )
- .attr( 'id', a );
- var l = i.title || i.text;
- l && o.attr( 'title', l );
- ( r = this.options
- .get( 'translations' )
- .get( 'removeItem' ) ),
- ( l = o.find(
- '.select2-selection__choice__remove'
- ) );
- l.attr( 'title', r() ),
- l.attr( 'aria-label', r() ),
- l.attr( 'aria-describedby', a ),
- c.StoreData( o[ 0 ], 'data', i ),
- t.push( o );
- }
- this.$selection
- .find( '.select2-selection__rendered' )
- .append( t );
- }
- } ),
- o
- );
- }
- ),
- u.define( 'select2/selection/placeholder', [], function () {
- function e( e, t, n ) {
- ( this.placeholder = this.normalizePlaceholder(
- n.get( 'placeholder' )
- ) ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.normalizePlaceholder = function ( e, t ) {
- return (
- 'string' == typeof t && ( t = { id: '', text: t } ),
- t
- );
- } ),
- ( e.prototype.createPlaceholder = function ( e, t ) {
- var n = this.selectionContainer();
- n.html( this.display( t ) ),
- n[ 0 ].classList.add(
- 'select2-selection__placeholder'
- ),
- n[ 0 ].classList.remove(
- 'select2-selection__choice'
- );
- t = t.title || t.text || n.text();
- return (
- this.$selection
- .find( '.select2-selection__rendered' )
- .attr( 'title', t ),
- n
- );
- } ),
- ( e.prototype.update = function ( e, t ) {
- var n =
- 1 == t.length && t[ 0 ].id != this.placeholder.id;
- if ( 1 < t.length || n ) return e.call( this, t );
- this.clear();
- t = this.createPlaceholder( this.placeholder );
- this.$selection
- .find( '.select2-selection__rendered' )
- .append( t );
- } ),
- e
- );
- } ),
- u.define(
- 'select2/selection/allowClear',
- [ 'jquery', '../keys', '../utils' ],
- function ( i, s, a ) {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- null == this.placeholder &&
- this.options.get( 'debug' ) &&
- window.console &&
- console.error &&
- console.error(
- 'Select2: The `allowClear` option should be used in combination with the `placeholder` option.'
- ),
- this.$selection.on(
- 'mousedown',
- '.select2-selection__clear',
- function ( e ) {
- s._handleClear( e );
- }
- ),
- t.on( 'keypress', function ( e ) {
- s._handleKeyboardClear( e, t );
- } );
- } ),
- ( e.prototype._handleClear = function ( e, t ) {
- if ( ! this.isDisabled() ) {
- var n = this.$selection.find(
- '.select2-selection__clear'
- );
- if ( 0 !== n.length ) {
- t.stopPropagation();
- var s = a.GetData( n[ 0 ], 'data' ),
- i = this.$element.val();
- this.$element.val( this.placeholder.id );
- var o = { data: s };
- if (
- ( this.trigger( 'clear', o ),
- o.prevented )
- )
- this.$element.val( i );
- else {
- for ( var r = 0; r < s.length; r++ )
- if (
- ( ( o = { data: s[ r ] } ),
- this.trigger( 'unselect', o ),
- o.prevented )
- )
- return void this.$element.val(
- i
- );
- this.$element
- .trigger( 'input' )
- .trigger( 'change' ),
- this.trigger( 'toggle', {} );
- }
- }
- }
- } ),
- ( e.prototype._handleKeyboardClear = function (
- e,
- t,
- n
- ) {
- n.isOpen() ||
- ( t.which != s.DELETE &&
- t.which != s.BACKSPACE ) ||
- this._handleClear( t );
- } ),
- ( e.prototype.update = function ( e, t ) {
- var n, s;
- e.call( this, t ),
- this.$selection
- .find( '.select2-selection__clear' )
- .remove(),
- this.$selection[ 0 ].classList.remove(
- 'select2-selection--clearable'
- ),
- 0 <
- this.$selection.find(
- '.select2-selection__placeholder'
- ).length ||
- 0 === t.length ||
- ( ( n = this.$selection
- .find( '.select2-selection__rendered' )
- .attr( 'id' ) ),
- ( s = this.options
- .get( 'translations' )
- .get( 'removeAllItems' ) ),
- ( e = i(
- '<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">×</span></button>'
- ) ).attr( 'title', s() ),
- e.attr( 'aria-label', s() ),
- e.attr( 'aria-describedby', n ),
- a.StoreData( e[ 0 ], 'data', t ),
- this.$selection.prepend( e ),
- this.$selection[ 0 ].classList.add(
- 'select2-selection--clearable'
- ) );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/selection/search',
- [ 'jquery', '../utils', '../keys' ],
- function ( s, a, l ) {
- function e( e, t, n ) {
- e.call( this, t, n );
- }
- return (
- ( e.prototype.render = function ( e ) {
- var t = this.options
- .get( 'translations' )
- .get( 'search' ),
- n = s(
- '<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>'
- );
- ( this.$searchContainer = n ),
- ( this.$search = n.find( 'textarea' ) ),
- this.$search.prop(
- 'autocomplete',
- this.options.get( 'autocomplete' )
- ),
- this.$search.attr( 'aria-label', t() );
- e = e.call( this );
- return (
- this._transferTabIndex(),
- e.append( this.$searchContainer ),
- e
- );
- } ),
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this,
- i = t.id + '-results',
- o = t.id + '-container';
- e.call( this, t, n ),
- s.$search.attr( 'aria-describedby', o ),
- t.on( 'open', function () {
- s.$search.attr( 'aria-controls', i ),
- s.$search.trigger( 'focus' );
- } ),
- t.on( 'close', function () {
- s.$search.val( '' ),
- s.resizeSearch(),
- s.$search.removeAttr( 'aria-controls' ),
- s.$search.removeAttr(
- 'aria-activedescendant'
- ),
- s.$search.trigger( 'focus' );
- } ),
- t.on( 'enable', function () {
- s.$search.prop( 'disabled', ! 1 ),
- s._transferTabIndex();
- } ),
- t.on( 'disable', function () {
- s.$search.prop( 'disabled', ! 0 );
- } ),
- t.on( 'focus', function ( e ) {
- s.$search.trigger( 'focus' );
- } ),
- t.on( 'results:focus', function ( e ) {
- e.data._resultId
- ? s.$search.attr(
- 'aria-activedescendant',
- e.data._resultId
- )
- : s.$search.removeAttr(
- 'aria-activedescendant'
- );
- } ),
- this.$selection.on(
- 'focusin',
- '.select2-search--inline',
- function ( e ) {
- s.trigger( 'focus', e );
- }
- ),
- this.$selection.on(
- 'focusout',
- '.select2-search--inline',
- function ( e ) {
- s._handleBlur( e );
- }
- ),
- this.$selection.on(
- 'keydown',
- '.select2-search--inline',
- function ( e ) {
- var t;
- e.stopPropagation(),
- s.trigger( 'keypress', e ),
- ( s._keyUpPrevented = e.isDefaultPrevented() ),
- e.which !== l.BACKSPACE ||
- '' !== s.$search.val() ||
- ( 0 <
- ( t = s.$selection
- .find(
- '.select2-selection__choice'
- )
- .last() ).length &&
- ( ( t = a.GetData(
- t[ 0 ],
- 'data'
- ) ),
- s.searchRemoveChoice( t ),
- e.preventDefault() ) );
- }
- ),
- this.$selection.on(
- 'click',
- '.select2-search--inline',
- function ( e ) {
- s.$search.val() && e.stopPropagation();
- }
- );
- var t = document.documentMode,
- r = t && t <= 11;
- this.$selection.on(
- 'input.searchcheck',
- '.select2-search--inline',
- function ( e ) {
- r
- ? s.$selection.off(
- 'input.search input.searchcheck'
- )
- : s.$selection.off( 'keyup.search' );
- }
- ),
- this.$selection.on(
- 'keyup.search input.search',
- '.select2-search--inline',
- function ( e ) {
- var t;
- r && 'input' === e.type
- ? s.$selection.off(
- 'input.search input.searchcheck'
- )
- : ( t = e.which ) != l.SHIFT &&
- t != l.CTRL &&
- t != l.ALT &&
- t != l.TAB &&
- s.handleSearch( e );
- }
- );
- } ),
- ( e.prototype._transferTabIndex = function ( e ) {
- this.$search.attr(
- 'tabindex',
- this.$selection.attr( 'tabindex' )
- ),
- this.$selection.attr( 'tabindex', '-1' );
- } ),
- ( e.prototype.createPlaceholder = function ( e, t ) {
- this.$search.attr( 'placeholder', t.text );
- } ),
- ( e.prototype.update = function ( e, t ) {
- var n = this.$search[ 0 ] == document.activeElement;
- this.$search.attr( 'placeholder', '' ),
- e.call( this, t ),
- this.resizeSearch(),
- n && this.$search.trigger( 'focus' );
- } ),
- ( e.prototype.handleSearch = function () {
- var e;
- this.resizeSearch(),
- this._keyUpPrevented ||
- ( ( e = this.$search.val() ),
- this.trigger( 'query', { term: e } ) ),
- ( this._keyUpPrevented = ! 1 );
- } ),
- ( e.prototype.searchRemoveChoice = function ( e, t ) {
- this.trigger( 'unselect', { data: t } ),
- this.$search.val( t.text ),
- this.handleSearch();
- } ),
- ( e.prototype.resizeSearch = function () {
- this.$search.css( 'width', '25px' );
- var e = '100%';
- '' === this.$search.attr( 'placeholder' ) &&
- ( e =
- 0.75 * ( this.$search.val().length + 1 ) +
- 'em' ),
- this.$search.css( 'width', e );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/selection/selectionCss',
- [ '../utils' ],
- function ( n ) {
- function e() {}
- return (
- ( e.prototype.render = function ( e ) {
- var t = e.call( this ),
- e =
- this.options.get( 'selectionCssClass' ) ||
- '';
- return (
- -1 !== e.indexOf( ':all:' ) &&
- ( ( e = e.replace( ':all:', '' ) ),
- n.copyNonInternalCssClasses(
- t[ 0 ],
- this.$element[ 0 ]
- ) ),
- t.addClass( e ),
- t
- );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/selection/eventRelay',
- [ 'jquery' ],
- function ( r ) {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this,
- i = [
- 'open',
- 'opening',
- 'close',
- 'closing',
- 'select',
- 'selecting',
- 'unselect',
- 'unselecting',
- 'clear',
- 'clearing',
- ],
- o = [
- 'opening',
- 'closing',
- 'selecting',
- 'unselecting',
- 'clearing',
- ];
- e.call( this, t, n ),
- t.on( '*', function ( e, t ) {
- var n;
- -1 !== i.indexOf( e ) &&
- ( ( t = t || {} ),
- ( n = r.Event( 'select2:' + e, {
- params: t,
- } ) ),
- s.$element.trigger( n ),
- -1 !== o.indexOf( e ) &&
- ( t.prevented = n.isDefaultPrevented() ) );
- } );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/translation',
- [ 'jquery', 'require' ],
- function ( t, n ) {
- function s( e ) {
- this.dict = e || {};
- }
- return (
- ( s.prototype.all = function () {
- return this.dict;
- } ),
- ( s.prototype.get = function ( e ) {
- return this.dict[ e ];
- } ),
- ( s.prototype.extend = function ( e ) {
- this.dict = t.extend( {}, e.all(), this.dict );
- } ),
- ( s._cache = {} ),
- ( s.loadPath = function ( e ) {
- var t;
- return (
- e in s._cache ||
- ( ( t = n( e ) ), ( s._cache[ e ] = t ) ),
- new s( s._cache[ e ] )
- );
- } ),
- s
- );
- }
- ),
- u.define( 'select2/diacritics', [], function () {
- return {
- 'Ⓐ': 'A',
- A: 'A',
- À: 'A',
- Á: 'A',
- Â: 'A',
- Ầ: 'A',
- Ấ: 'A',
- Ẫ: 'A',
- Ẩ: 'A',
- Ã: 'A',
- Ā: 'A',
- Ă: 'A',
- Ằ: 'A',
- Ắ: 'A',
- Ẵ: 'A',
- Ẳ: 'A',
- Ȧ: 'A',
- Ǡ: 'A',
- Ä: 'A',
- Ǟ: 'A',
- Ả: 'A',
- Å: 'A',
- Ǻ: 'A',
- Ǎ: 'A',
- Ȁ: 'A',
-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'o',
- ọ: 'o',
- ộ: 'o',
- ǫ: 'o',
- ǭ: 'o',
- ø: 'o',
- ǿ: 'o',
- ɔ: 'o',
- ꝋ: 'o',
- ꝍ: 'o',
- ɵ: 'o',
- œ: 'oe',
- ƣ: 'oi',
- ȣ: 'ou',
- ꝏ: 'oo',
- 'ⓟ': 'p',
- p: 'p',
- ṕ: 'p',
- ṗ: 'p',
- ƥ: 'p',
- ᵽ: 'p',
- ꝑ: 'p',
- ꝓ: 'p',
- ꝕ: 'p',
- 'ⓠ': 'q',
- q: 'q',
- ɋ: 'q',
- ꝗ: 'q',
- ꝙ: 'q',
- 'ⓡ': 'r',
- r: 'r',
- ŕ: 'r',
- ṙ: 'r',
- ř: 'r',
- ȑ: 'r',
- ȓ: 'r',
- ṛ: 'r',
- ṝ: 'r',
- ŗ: 'r',
- ṟ: 'r',
- ɍ: 'r',
- ɽ: 'r',
- ꝛ: 'r',
- ꞧ: 'r',
- ꞃ: 'r',
- 'ⓢ': 's',
- s: 's',
- ß: 's',
- ś: 's',
- ṥ: 's',
- ŝ: 's',
- ṡ: 's',
- š: 's',
- ṧ: 's',
- ṣ: 's',
- ṩ: 's',
- ș: 's',
- ş: 's',
- ȿ: 's',
- ꞩ: 's',
- ꞅ: 's',
- ẛ: 's',
- 'ⓣ': 't',
- t: 't',
- ṫ: 't',
- ẗ: 't',
- ť: 't',
- ṭ: 't',
- ț: 't',
- ţ: 't',
- ṱ: 't',
- ṯ: 't',
- ŧ: 't',
- ƭ: 't',
- ʈ: 't',
- ⱦ: 't',
- ꞇ: 't',
- ꜩ: 'tz',
- 'ⓤ': 'u',
- u: 'u',
- ù: 'u',
- ú: 'u',
- û: 'u',
- ũ: 'u',
- ṹ: 'u',
- ū: 'u',
- ṻ: 'u',
- ŭ: 'u',
- ü: 'u',
- ǜ: 'u',
- ǘ: 'u',
- ǖ: 'u',
- ǚ: 'u',
- ủ: 'u',
- ů: 'u',
- ű: 'u',
- ǔ: 'u',
- ȕ: 'u',
- ȗ: 'u',
- ư: 'u',
- ừ: 'u',
- ứ: 'u',
- ữ: 'u',
- ử: 'u',
- ự: 'u',
- ụ: 'u',
- ṳ: 'u',
- ų: 'u',
- ṷ: 'u',
- ṵ: 'u',
- ʉ: 'u',
- 'ⓥ': 'v',
- v: 'v',
- ṽ: 'v',
- ṿ: 'v',
- ʋ: 'v',
- ꝟ: 'v',
- ʌ: 'v',
- ꝡ: 'vy',
- 'ⓦ': 'w',
- w: 'w',
- ẁ: 'w',
- ẃ: 'w',
- ŵ: 'w',
- ẇ: 'w',
- ẅ: 'w',
- ẘ: 'w',
- ẉ: 'w',
- ⱳ: 'w',
- 'ⓧ': 'x',
- x: 'x',
- ẋ: 'x',
- ẍ: 'x',
- 'ⓨ': 'y',
- y: 'y',
- ỳ: 'y',
- ý: 'y',
- ŷ: 'y',
- ỹ: 'y',
- ȳ: 'y',
- ẏ: 'y',
- ÿ: 'y',
- ỷ: 'y',
- ẙ: 'y',
- ỵ: 'y',
- ƴ: 'y',
- ɏ: 'y',
- ỿ: 'y',
- 'ⓩ': 'z',
- z: 'z',
- ź: 'z',
- ẑ: 'z',
- ż: 'z',
- ž: 'z',
- ẓ: 'z',
- ẕ: 'z',
- ƶ: 'z',
- ȥ: 'z',
- ɀ: 'z',
- ⱬ: 'z',
- ꝣ: 'z',
- Ά: 'Α',
- Έ: 'Ε',
- Ή: 'Η',
- Ί: 'Ι',
- Ϊ: 'Ι',
- Ό: 'Ο',
- Ύ: 'Υ',
- Ϋ: 'Υ',
- Ώ: 'Ω',
- ά: 'α',
- έ: 'ε',
- ή: 'η',
- ί: 'ι',
- ϊ: 'ι',
- ΐ: 'ι',
- ό: 'ο',
- ύ: 'υ',
- ϋ: 'υ',
- ΰ: 'υ',
- ώ: 'ω',
- ς: 'σ',
- '’': "'",
- };
- } ),
- u.define( 'select2/data/base', [ '../utils' ], function ( n ) {
- function s( e, t ) {
- s.__super__.constructor.call( this );
- }
- return (
- n.Extend( s, n.Observable ),
- ( s.prototype.current = function ( e ) {
- throw new Error(
- 'The `current` method must be defined in child classes.'
- );
- } ),
- ( s.prototype.query = function ( e, t ) {
- throw new Error(
- 'The `query` method must be defined in child classes.'
- );
- } ),
- ( s.prototype.bind = function ( e, t ) {} ),
- ( s.prototype.destroy = function () {} ),
- ( s.prototype.generateResultId = function ( e, t ) {
- e = e.id + '-result-';
- return (
- ( e += n.generateChars( 4 ) ),
- null != t.id
- ? ( e += '-' + t.id.toString() )
- : ( e += '-' + n.generateChars( 4 ) ),
- e
- );
- } ),
- s
- );
- } ),
- u.define(
- 'select2/data/select',
- [ './base', '../utils', 'jquery' ],
- function ( e, a, l ) {
- function n( e, t ) {
- ( this.$element = e ),
- ( this.options = t ),
- n.__super__.constructor.call( this );
- }
- return (
- a.Extend( n, e ),
- ( n.prototype.current = function ( e ) {
- var t = this;
- e(
- Array.prototype.map.call(
- this.$element[ 0 ].querySelectorAll(
- ':checked'
- ),
- function ( e ) {
- return t.item( l( e ) );
- }
- )
- );
- } ),
- ( n.prototype.select = function ( i ) {
- var e,
- o = this;
- if (
- ( ( i.selected = ! 0 ),
- null != i.element &&
- 'option' ===
- i.element.tagName.toLowerCase() )
- )
- return (
- ( i.element.selected = ! 0 ),
- void this.$element
- .trigger( 'input' )
- .trigger( 'change' )
- );
- this.$element.prop( 'multiple' )
- ? this.current( function ( e ) {
- var t = [];
- ( i = [ i ] ).push.apply( i, e );
- for ( var n = 0; n < i.length; n++ ) {
- var s = i[ n ].id;
- -1 === t.indexOf( s ) &&
- t.push( s );
- }
- o.$element.val( t ),
- o.$element
- .trigger( 'input' )
- .trigger( 'change' );
- } )
- : ( ( e = i.id ),
- this.$element.val( e ),
- this.$element
- .trigger( 'input' )
- .trigger( 'change' ) );
- } ),
- ( n.prototype.unselect = function ( i ) {
- var o = this;
- if ( this.$element.prop( 'multiple' ) ) {
- if (
- ( ( i.selected = ! 1 ),
- null != i.element &&
- 'option' ===
- i.element.tagName.toLowerCase() )
- )
- return (
- ( i.element.selected = ! 1 ),
- void this.$element
- .trigger( 'input' )
- .trigger( 'change' )
- );
- this.current( function ( e ) {
- for (
- var t = [], n = 0;
- n < e.length;
- n++
- ) {
- var s = e[ n ].id;
- s !== i.id &&
- -1 === t.indexOf( s ) &&
- t.push( s );
- }
- o.$element.val( t ),
- o.$element
- .trigger( 'input' )
- .trigger( 'change' );
- } );
- }
- } ),
- ( n.prototype.bind = function ( e, t ) {
- var n = this;
- ( this.container = e ).on(
- 'select',
- function ( e ) {
- n.select( e.data );
- }
- ),
- e.on( 'unselect', function ( e ) {
- n.unselect( e.data );
- } );
- } ),
- ( n.prototype.destroy = function () {
- this.$element.find( '*' ).each( function () {
- a.RemoveData( this );
- } );
- } ),
- ( n.prototype.query = function ( t, e ) {
- var n = [],
- s = this;
- this.$element.children().each( function () {
- var e;
- ( 'option' !== this.tagName.toLowerCase() &&
- 'optgroup' !==
- this.tagName.toLowerCase() ) ||
- ( ( e = l( this ) ),
- ( e = s.item( e ) ),
- null !== ( e = s.matches( t, e ) ) &&
- n.push( e ) );
- } ),
- e( { results: n } );
- } ),
- ( n.prototype.addOptions = function ( e ) {
- this.$element.append( e );
- } ),
- ( n.prototype.option = function ( e ) {
- var t;
- e.children
- ? ( ( t = document.createElement(
- 'optgroup'
- ) ).label = e.text )
- : void 0 !==
- ( t = document.createElement( 'option' ) )
- .textContent
- ? ( t.textContent = e.text )
- : ( t.innerText = e.text ),
- void 0 !== e.id && ( t.value = e.id ),
- e.disabled && ( t.disabled = ! 0 ),
- e.selected && ( t.selected = ! 0 ),
- e.title && ( t.title = e.title );
- e = this._normalizeItem( e );
- return (
- ( e.element = t ),
- a.StoreData( t, 'data', e ),
- l( t )
- );
- } ),
- ( n.prototype.item = function ( e ) {
- var t = {};
- if ( null != ( t = a.GetData( e[ 0 ], 'data' ) ) )
- return t;
- var n = e[ 0 ];
- if ( 'option' === n.tagName.toLowerCase() )
- t = {
- id: e.val(),
- text: e.text(),
- disabled: e.prop( 'disabled' ),
- selected: e.prop( 'selected' ),
- title: e.prop( 'title' ),
- };
- else if ( 'optgroup' === n.tagName.toLowerCase() ) {
- t = {
- text: e.prop( 'label' ),
- children: [],
- title: e.prop( 'title' ),
- };
- for (
- var s = e.children( 'option' ),
- i = [],
- o = 0;
- o < s.length;
- o++
- ) {
- var r = l( s[ o ] ),
- r = this.item( r );
- i.push( r );
- }
- t.children = i;
- }
- return (
- ( ( t = this._normalizeItem( t ) ).element =
- e[ 0 ] ),
- a.StoreData( e[ 0 ], 'data', t ),
- t
- );
- } ),
- ( n.prototype._normalizeItem = function ( e ) {
- e !== Object( e ) && ( e = { id: e, text: e } );
- return (
- null !=
- ( e = l.extend( {}, { text: '' }, e ) )
- .id && ( e.id = e.id.toString() ),
- null != e.text &&
- ( e.text = e.text.toString() ),
- null == e._resultId &&
- e.id &&
- null != this.container &&
- ( e._resultId = this.generateResultId(
- this.container,
- e
- ) ),
- l.extend(
- {},
- { selected: ! 1, disabled: ! 1 },
- e
- )
- );
- } ),
- ( n.prototype.matches = function ( e, t ) {
- return this.options.get( 'matcher' )( e, t );
- } ),
- n
- );
- }
- ),
- u.define(
- 'select2/data/array',
- [ './select', '../utils', 'jquery' ],
- function ( e, t, c ) {
- function s( e, t ) {
- ( this._dataToConvert = t.get( 'data' ) || [] ),
- s.__super__.constructor.call( this, e, t );
- }
- return (
- t.Extend( s, e ),
- ( s.prototype.bind = function ( e, t ) {
- s.__super__.bind.call( this, e, t ),
- this.addOptions(
- this.convertToOptions( this._dataToConvert )
- );
- } ),
- ( s.prototype.select = function ( n ) {
- var e = this.$element
- .find( 'option' )
- .filter( function ( e, t ) {
- return t.value == n.id.toString();
- } );
- 0 === e.length &&
- ( ( e = this.option( n ) ),
- this.addOptions( e ) ),
- s.__super__.select.call( this, n );
- } ),
- ( s.prototype.convertToOptions = function ( e ) {
- var t = this,
- n = this.$element.find( 'option' ),
- s = n
- .map( function () {
- return t.item( c( this ) ).id;
- } )
- .get(),
- i = [];
- for ( var o = 0; o < e.length; o++ ) {
- var r,
- a,
- l = this._normalizeItem( e[ o ] );
- 0 <= s.indexOf( l.id )
- ? ( ( r = n.filter(
- ( function ( e ) {
- return function () {
- return (
- c( this ).val() == e.id
- );
- };
- } )( l )
- ) ),
- ( a = this.item( r ) ),
- ( a = c.extend( ! 0, {}, l, a ) ),
- ( a = this.option( a ) ),
- r.replaceWith( a ) )
- : ( ( a = this.option( l ) ),
- l.children &&
- ( ( l = this.convertToOptions(
- l.children
- ) ),
- a.append( l ) ),
- i.push( a ) );
- }
- return i;
- } ),
- s
- );
- }
- ),
- u.define(
- 'select2/data/ajax',
- [ './array', '../utils', 'jquery' ],
- function ( e, t, o ) {
- function n( e, t ) {
- ( this.ajaxOptions = this._applyDefaults(
- t.get( 'ajax' )
- ) ),
- null != this.ajaxOptions.processResults &&
- ( this.processResults = this.ajaxOptions.processResults ),
- n.__super__.constructor.call( this, e, t );
- }
- return (
- t.Extend( n, e ),
- ( n.prototype._applyDefaults = function ( e ) {
- var t = {
- data: function ( e ) {
- return o.extend( {}, e, { q: e.term } );
- },
- transport: function ( e, t, n ) {
- e = o.ajax( e );
- return e.then( t ), e.fail( n ), e;
- },
- };
- return o.extend( {}, t, e, ! 0 );
- } ),
- ( n.prototype.processResults = function ( e ) {
- return e;
- } ),
- ( n.prototype.query = function ( t, n ) {
- var s = this;
- null != this._request &&
- ( 'function' == typeof this._request.abort &&
- this._request.abort(),
- ( this._request = null ) );
- var i = o.extend(
- { type: 'GET' },
- this.ajaxOptions
- );
- function e() {
- var e = i.transport(
- i,
- function ( e ) {
- e = s.processResults( e, t );
- s.options.get( 'debug' ) &&
- window.console &&
- console.error &&
- ( ( e &&
- e.results &&
- Array.isArray( e.results ) ) ||
- console.error(
- 'Select2: The AJAX results did not return an array in the `results` key of the response.'
- ) ),
- n( e );
- },
- function () {
- ( 'status' in e &&
- ( 0 === e.status ||
- '0' === e.status ) ) ||
- s.trigger( 'results:message', {
- message: 'errorLoading',
- } );
- }
- );
- s._request = e;
- }
- 'function' == typeof i.url &&
- ( i.url = i.url.call( this.$element, t ) ),
- 'function' == typeof i.data &&
- ( i.data = i.data.call(
- this.$element,
- t
- ) ),
- this.ajaxOptions.delay && null != t.term
- ? ( this._queryTimeout &&
- window.clearTimeout(
- this._queryTimeout
- ),
- ( this._queryTimeout = window.setTimeout(
- e,
- this.ajaxOptions.delay
- ) ) )
- : e();
- } ),
- n
- );
- }
- ),
- u.define( 'select2/data/tags', [ 'jquery' ], function ( t ) {
- function e( e, t, n ) {
- var s = n.get( 'tags' ),
- i = n.get( 'createTag' );
- void 0 !== i && ( this.createTag = i );
- i = n.get( 'insertTag' );
- if (
- ( void 0 !== i && ( this.insertTag = i ),
- e.call( this, t, n ),
- Array.isArray( s ) )
- )
- for ( var o = 0; o < s.length; o++ ) {
- var r = s[ o ],
- r = this._normalizeItem( r ),
- r = this.option( r );
- this.$element.append( r );
- }
- }
- return (
- ( e.prototype.query = function ( e, c, u ) {
- var d = this;
- this._removeOldTags(),
- null != c.term && null == c.page
- ? e.call( this, c, function e( t, n ) {
- for (
- var s = t.results, i = 0;
- i < s.length;
- i++
- ) {
- var o = s[ i ],
- r =
- null != o.children &&
- ! e(
- { results: o.children },
- ! 0
- );
- if (
- (
- o.text || ''
- ).toUpperCase() ===
- (
- c.term || ''
- ).toUpperCase() ||
- r
- )
- return (
- ! n &&
- ( ( t.data = s ),
- void u( t ) )
- );
- }
- if ( n ) return ! 0;
- var a,
- l = d.createTag( c );
- null != l &&
- ( ( a = d.option( l ) ).attr(
- 'data-select2-tag',
- 'true'
- ),
- d.addOptions( [ a ] ),
- d.insertTag( s, l ) ),
- ( t.results = s ),
- u( t );
- } )
- : e.call( this, c, u );
- } ),
- ( e.prototype.createTag = function ( e, t ) {
- if ( null == t.term ) return null;
- t = t.term.trim();
- return '' === t ? null : { id: t, text: t };
- } ),
- ( e.prototype.insertTag = function ( e, t, n ) {
- t.unshift( n );
- } ),
- ( e.prototype._removeOldTags = function ( e ) {
- this.$element
- .find( 'option[data-select2-tag]' )
- .each( function () {
- this.selected || t( this ).remove();
- } );
- } ),
- e
- );
- } ),
- u.define( 'select2/data/tokenizer', [ 'jquery' ], function ( c ) {
- function e( e, t, n ) {
- var s = n.get( 'tokenizer' );
- void 0 !== s && ( this.tokenizer = s ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- e.call( this, t, n ),
- ( this.$search =
- t.dropdown.$search ||
- t.selection.$search ||
- n.find( '.select2-search__field' ) );
- } ),
- ( e.prototype.query = function ( e, t, n ) {
- var s = this;
- t.term = t.term || '';
- var i = this.tokenizer(
- t,
- this.options,
- function ( e ) {
- var t,
- n = s._normalizeItem( e );
- s.$element
- .find( 'option' )
- .filter( function () {
- return c( this ).val() === n.id;
- } ).length ||
- ( ( t = s.option( n ) ).attr(
- 'data-select2-tag',
- ! 0
- ),
- s._removeOldTags(),
- s.addOptions( [ t ] ) ),
- ( t = n ),
- s.trigger( 'select', { data: t } );
- }
- );
- i.term !== t.term &&
- ( this.$search.length &&
- ( this.$search.val( i.term ),
- this.$search.trigger( 'focus' ) ),
- ( t.term = i.term ) ),
- e.call( this, t, n );
- } ),
- ( e.prototype.tokenizer = function ( e, t, n, s ) {
- for (
- var i = n.get( 'tokenSeparators' ) || [],
- o = t.term,
- r = 0,
- a =
- this.createTag ||
- function ( e ) {
- return { id: e.term, text: e.term };
- };
- r < o.length;
- ) {
- var l = o[ r ];
- -1 !== i.indexOf( l )
- ? ( ( l = o.substr( 0, r ) ),
- null !=
- ( l = a( c.extend( {}, t, { term: l } ) ) )
- ? ( s( l ),
- ( o = o.substr( r + 1 ) || '' ),
- ( r = 0 ) )
- : r++ )
- : r++;
- }
- return { term: o };
- } ),
- e
- );
- } ),
- u.define( 'select2/data/minimumInputLength', [], function () {
- function e( e, t, n ) {
- ( this.minimumInputLength = n.get( 'minimumInputLength' ) ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.query = function ( e, t, n ) {
- ( t.term = t.term || '' ),
- t.term.length < this.minimumInputLength
- ? this.trigger( 'results:message', {
- message: 'inputTooShort',
- args: {
- minimum: this.minimumInputLength,
- input: t.term,
- params: t,
- },
- } )
- : e.call( this, t, n );
- } ),
- e
- );
- } ),
- u.define( 'select2/data/maximumInputLength', [], function () {
- function e( e, t, n ) {
- ( this.maximumInputLength = n.get( 'maximumInputLength' ) ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.query = function ( e, t, n ) {
- ( t.term = t.term || '' ),
- 0 < this.maximumInputLength &&
- t.term.length > this.maximumInputLength
- ? this.trigger( 'results:message', {
- message: 'inputTooLong',
- args: {
- maximum: this.maximumInputLength,
- input: t.term,
- params: t,
- },
- } )
- : e.call( this, t, n );
- } ),
- e
- );
- } ),
- u.define( 'select2/data/maximumSelectionLength', [], function () {
- function e( e, t, n ) {
- ( this.maximumSelectionLength = n.get(
- 'maximumSelectionLength'
- ) ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- t.on( 'select', function () {
- s._checkIfMaximumSelected();
- } );
- } ),
- ( e.prototype.query = function ( e, t, n ) {
- var s = this;
- this._checkIfMaximumSelected( function () {
- e.call( s, t, n );
- } );
- } ),
- ( e.prototype._checkIfMaximumSelected = function ( e, t ) {
- var n = this;
- this.current( function ( e ) {
- e = null != e ? e.length : 0;
- 0 < n.maximumSelectionLength &&
- e >= n.maximumSelectionLength
- ? n.trigger( 'results:message', {
- message: 'maximumSelected',
- args: {
- maximum: n.maximumSelectionLength,
- },
- } )
- : t && t();
- } );
- } ),
- e
- );
- } ),
- u.define(
- 'select2/dropdown',
- [ 'jquery', './utils' ],
- function ( t, e ) {
- function n( e, t ) {
- ( this.$element = e ),
- ( this.options = t ),
- n.__super__.constructor.call( this );
- }
- return (
- e.Extend( n, e.Observable ),
- ( n.prototype.render = function () {
- var e = t(
- '<span class="select2-dropdown"><span class="select2-results"></span></span>'
- );
- return (
- e.attr( 'dir', this.options.get( 'dir' ) ),
- ( this.$dropdown = e )
- );
- } ),
- ( n.prototype.bind = function () {} ),
- ( n.prototype.position = function ( e, t ) {} ),
- ( n.prototype.destroy = function () {
- this.$dropdown.remove();
- } ),
- n
- );
- }
- ),
- u.define( 'select2/dropdown/search', [ 'jquery' ], function ( o ) {
- function e() {}
- return (
- ( e.prototype.render = function ( e ) {
- var t = e.call( this ),
- n = this.options
- .get( 'translations' )
- .get( 'search' ),
- e = o(
- '<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>'
- );
- return (
- ( this.$searchContainer = e ),
- ( this.$search = e.find( 'input' ) ),
- this.$search.prop(
- 'autocomplete',
- this.options.get( 'autocomplete' )
- ),
- this.$search.attr( 'aria-label', n() ),
- t.prepend( e ),
- t
- );
- } ),
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this,
- i = t.id + '-results';
- e.call( this, t, n ),
- this.$search.on( 'keydown', function ( e ) {
- s.trigger( 'keypress', e ),
- ( s._keyUpPrevented = e.isDefaultPrevented() );
- } ),
- this.$search.on( 'input', function ( e ) {
- o( this ).off( 'keyup' );
- } ),
- this.$search.on( 'keyup input', function ( e ) {
- s.handleSearch( e );
- } ),
- t.on( 'open', function () {
- s.$search.attr( 'tabindex', 0 ),
- s.$search.attr( 'aria-controls', i ),
- s.$search.trigger( 'focus' ),
- window.setTimeout( function () {
- s.$search.trigger( 'focus' );
- }, 0 );
- } ),
- t.on( 'close', function () {
- s.$search.attr( 'tabindex', -1 ),
- s.$search.removeAttr( 'aria-controls' ),
- s.$search.removeAttr(
- 'aria-activedescendant'
- ),
- s.$search.val( '' ),
- s.$search.trigger( 'blur' );
- } ),
- t.on( 'focus', function () {
- t.isOpen() || s.$search.trigger( 'focus' );
- } ),
- t.on( 'results:all', function ( e ) {
- ( null != e.query.term &&
- '' !== e.query.term ) ||
- ( s.showSearch( e )
- ? s.$searchContainer[ 0 ].classList.remove(
- 'select2-search--hide'
- )
- : s.$searchContainer[ 0 ].classList.add(
- 'select2-search--hide'
- ) );
- } ),
- t.on( 'results:focus', function ( e ) {
- e.data._resultId
- ? s.$search.attr(
- 'aria-activedescendant',
- e.data._resultId
- )
- : s.$search.removeAttr(
- 'aria-activedescendant'
- );
- } );
- } ),
- ( e.prototype.handleSearch = function ( e ) {
- var t;
- this._keyUpPrevented ||
- ( ( t = this.$search.val() ),
- this.trigger( 'query', { term: t } ) ),
- ( this._keyUpPrevented = ! 1 );
- } ),
- ( e.prototype.showSearch = function ( e, t ) {
- return ! 0;
- } ),
- e
- );
- } ),
- u.define( 'select2/dropdown/hidePlaceholder', [], function () {
- function e( e, t, n, s ) {
- ( this.placeholder = this.normalizePlaceholder(
- n.get( 'placeholder' )
- ) ),
- e.call( this, t, n, s );
- }
- return (
- ( e.prototype.append = function ( e, t ) {
- ( t.results = this.removePlaceholder( t.results ) ),
- e.call( this, t );
- } ),
- ( e.prototype.normalizePlaceholder = function ( e, t ) {
- return (
- 'string' == typeof t && ( t = { id: '', text: t } ),
- t
- );
- } ),
- ( e.prototype.removePlaceholder = function ( e, t ) {
- for (
- var n = t.slice( 0 ), s = t.length - 1;
- 0 <= s;
- s--
- ) {
- var i = t[ s ];
- this.placeholder.id === i.id && n.splice( s, 1 );
- }
- return n;
- } ),
- e
- );
- } ),
- u.define(
- 'select2/dropdown/infiniteScroll',
- [ 'jquery' ],
- function ( n ) {
- function e( e, t, n, s ) {
- ( this.lastParams = {} ),
- e.call( this, t, n, s ),
- ( this.$loadingMore = this.createLoadingMore() ),
- ( this.loading = ! 1 );
- }
- return (
- ( e.prototype.append = function ( e, t ) {
- this.$loadingMore.remove(),
- ( this.loading = ! 1 ),
- e.call( this, t ),
- this.showLoadingMore( t ) &&
- ( this.$results.append( this.$loadingMore ),
- this.loadMoreIfNeeded() );
- } ),
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- t.on( 'query', function ( e ) {
- ( s.lastParams = e ), ( s.loading = ! 0 );
- } ),
- t.on( 'query:append', function ( e ) {
- ( s.lastParams = e ), ( s.loading = ! 0 );
- } ),
- this.$results.on(
- 'scroll',
- this.loadMoreIfNeeded.bind( this )
- );
- } ),
- ( e.prototype.loadMoreIfNeeded = function () {
- var e = n.contains(
- document.documentElement,
- this.$loadingMore[ 0 ]
- );
- ! this.loading &&
- e &&
- ( ( e =
- this.$results.offset().top +
- this.$results.outerHeight( ! 1 ) ),
- this.$loadingMore.offset().top +
- this.$loadingMore.outerHeight( ! 1 ) <=
- e + 50 && this.loadMore() );
- } ),
- ( e.prototype.loadMore = function () {
- this.loading = ! 0;
- var e = n.extend(
- {},
- { page: 1 },
- this.lastParams
- );
- e.page++, this.trigger( 'query:append', e );
- } ),
- ( e.prototype.showLoadingMore = function ( e, t ) {
- return t.pagination && t.pagination.more;
- } ),
- ( e.prototype.createLoadingMore = function () {
- var e = n(
- '<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'
- ),
- t = this.options
- .get( 'translations' )
- .get( 'loadingMore' );
- return e.html( t( this.lastParams ) ), e;
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/dropdown/attachBody',
- [ 'jquery', '../utils' ],
- function ( u, r ) {
- function e( e, t, n ) {
- ( this.$dropdownParent = u(
- n.get( 'dropdownParent' ) || document.body
- ) ),
- e.call( this, t, n );
- }
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- t.on( 'open', function () {
- s._showDropdown(),
- s._attachPositioningHandler( t ),
- s._bindContainerResultHandlers( t );
- } ),
- t.on( 'close', function () {
- s._hideDropdown(),
- s._detachPositioningHandler( t );
- } ),
- this.$dropdownContainer.on(
- 'mousedown',
- function ( e ) {
- e.stopPropagation();
- }
- );
- } ),
- ( e.prototype.destroy = function ( e ) {
- e.call( this ), this.$dropdownContainer.remove();
- } ),
- ( e.prototype.position = function ( e, t, n ) {
- t.attr( 'class', n.attr( 'class' ) ),
- t[ 0 ].classList.remove( 'select2' ),
- t[ 0 ].classList.add(
- 'select2-container--open'
- ),
- t.css( { position: 'absolute', top: -999999 } ),
- ( this.$container = n );
- } ),
- ( e.prototype.render = function ( e ) {
- var t = u( '<span></span>' ),
- e = e.call( this );
- return (
- t.append( e ), ( this.$dropdownContainer = t )
- );
- } ),
- ( e.prototype._hideDropdown = function ( e ) {
- this.$dropdownContainer.detach();
- } ),
- ( e.prototype._bindContainerResultHandlers = function (
- e,
- t
- ) {
- var n;
- this._containerResultsHandlersBound ||
- ( ( n = this ),
- t.on( 'results:all', function () {
- n._positionDropdown(), n._resizeDropdown();
- } ),
- t.on( 'results:append', function () {
- n._positionDropdown(), n._resizeDropdown();
- } ),
- t.on( 'results:message', function () {
- n._positionDropdown(), n._resizeDropdown();
- } ),
- t.on( 'select', function () {
- n._positionDropdown(), n._resizeDropdown();
- } ),
- t.on( 'unselect', function () {
- n._positionDropdown(), n._resizeDropdown();
- } ),
- ( this._containerResultsHandlersBound = ! 0 ) );
- } ),
- ( e.prototype._attachPositioningHandler = function (
- e,
- t
- ) {
- var n = this,
- s = 'scroll.select2.' + t.id,
- i = 'resize.select2.' + t.id,
- o = 'orientationchange.select2.' + t.id,
- t = this.$container
- .parents()
- .filter( r.hasScroll );
- t.each( function () {
- r.StoreData( this, 'select2-scroll-position', {
- x: u( this ).scrollLeft(),
- y: u( this ).scrollTop(),
- } );
- } ),
- t.on( s, function ( e ) {
- var t = r.GetData(
- this,
- 'select2-scroll-position'
- );
- u( this ).scrollTop( t.y );
- } ),
- u( window ).on(
- s + ' ' + i + ' ' + o,
- function ( e ) {
- n._positionDropdown(),
- n._resizeDropdown();
- }
- );
- } ),
- ( e.prototype._detachPositioningHandler = function (
- e,
- t
- ) {
- var n = 'scroll.select2.' + t.id,
- s = 'resize.select2.' + t.id,
- t = 'orientationchange.select2.' + t.id;
- this.$container
- .parents()
- .filter( r.hasScroll )
- .off( n ),
- u( window ).off( n + ' ' + s + ' ' + t );
- } ),
- ( e.prototype._positionDropdown = function () {
- var e = u( window ),
- t = this.$dropdown[ 0 ].classList.contains(
- 'select2-dropdown--above'
- ),
- n = this.$dropdown[ 0 ].classList.contains(
- 'select2-dropdown--below'
- ),
- s = null,
- i = this.$container.offset();
- i.bottom =
- i.top + this.$container.outerHeight( ! 1 );
- var o = {
- height: this.$container.outerHeight( ! 1 ),
- };
- ( o.top = i.top ), ( o.bottom = i.top + o.height );
- var r = this.$dropdown.outerHeight( ! 1 ),
- a = e.scrollTop(),
- l = e.scrollTop() + e.height(),
- c = a < i.top - r,
- e = l > i.bottom + r,
- a = { left: i.left, top: o.bottom },
- l = this.$dropdownParent;
- 'static' === l.css( 'position' ) &&
- ( l = l.offsetParent() );
- i = { top: 0, left: 0 };
- ( u.contains( document.body, l[ 0 ] ) ||
- l[ 0 ].isConnected ) &&
- ( i = l.offset() ),
- ( a.top -= i.top ),
- ( a.left -= i.left ),
- t || n || ( s = 'below' ),
- e || ! c || t
- ? ! c && e && t && ( s = 'below' )
- : ( s = 'above' ),
- ( 'above' == s || ( t && 'below' !== s ) ) &&
- ( a.top = o.top - i.top - r ),
- null != s &&
- ( this.$dropdown[ 0 ].classList.remove(
- 'select2-dropdown--below'
- ),
- this.$dropdown[ 0 ].classList.remove(
- 'select2-dropdown--above'
- ),
- this.$dropdown[ 0 ].classList.add(
- 'select2-dropdown--' + s
- ),
- this.$container[ 0 ].classList.remove(
- 'select2-container--below'
- ),
- this.$container[ 0 ].classList.remove(
- 'select2-container--above'
- ),
- this.$container[ 0 ].classList.add(
- 'select2-container--' + s
- ) ),
- this.$dropdownContainer.css( a );
- } ),
- ( e.prototype._resizeDropdown = function () {
- var e = {
- width: this.$container.outerWidth( ! 1 ) + 'px',
- };
- this.options.get( 'dropdownAutoWidth' ) &&
- ( ( e.minWidth = e.width ),
- ( e.position = 'relative' ),
- ( e.width = 'auto' ) ),
- this.$dropdown.css( e );
- } ),
- ( e.prototype._showDropdown = function ( e ) {
- this.$dropdownContainer.appendTo(
- this.$dropdownParent
- ),
- this._positionDropdown(),
- this._resizeDropdown();
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/dropdown/minimumResultsForSearch',
- [],
- function () {
- function e( e, t, n, s ) {
- ( this.minimumResultsForSearch = n.get(
- 'minimumResultsForSearch'
- ) ),
- this.minimumResultsForSearch < 0 &&
- ( this.minimumResultsForSearch = 1 / 0 ),
- e.call( this, t, n, s );
- }
- return (
- ( e.prototype.showSearch = function ( e, t ) {
- return (
- ! (
- ( function e( t ) {
- for (
- var n = 0, s = 0;
- s < t.length;
- s++
- ) {
- var i = t[ s ];
- i.children
- ? ( n += e( i.children ) )
- : n++;
- }
- return n;
- } )( t.data.results ) <
- this.minimumResultsForSearch
- ) && e.call( this, t )
- );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/dropdown/selectOnClose',
- [ '../utils' ],
- function ( s ) {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- t.on( 'close', function ( e ) {
- s._handleSelectOnClose( e );
- } );
- } ),
- ( e.prototype._handleSelectOnClose = function ( e, t ) {
- if ( t && null != t.originalSelect2Event ) {
- var n = t.originalSelect2Event;
- if (
- 'select' === n._type ||
- 'unselect' === n._type
- )
- return;
- }
- n = this.getHighlightedResults();
- n.length < 1 ||
- ( null !=
- ( n = s.GetData( n[ 0 ], 'data' ) )
- .element &&
- n.element.selected ) ||
- ( null == n.element && n.selected ) ||
- this.trigger( 'select', { data: n } );
- } ),
- e
- );
- }
- ),
- u.define( 'select2/dropdown/closeOnSelect', [], function () {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- var s = this;
- e.call( this, t, n ),
- t.on( 'select', function ( e ) {
- s._selectTriggered( e );
- } ),
- t.on( 'unselect', function ( e ) {
- s._selectTriggered( e );
- } );
- } ),
- ( e.prototype._selectTriggered = function ( e, t ) {
- var n = t.originalEvent;
- ( n && ( n.ctrlKey || n.metaKey ) ) ||
- this.trigger( 'close', {
- originalEvent: n,
- originalSelect2Event: t,
- } );
- } ),
- e
- );
- } ),
- u.define(
- 'select2/dropdown/dropdownCss',
- [ '../utils' ],
- function ( n ) {
- function e() {}
- return (
- ( e.prototype.render = function ( e ) {
- var t = e.call( this ),
- e =
- this.options.get( 'dropdownCssClass' ) ||
- '';
- return (
- -1 !== e.indexOf( ':all:' ) &&
- ( ( e = e.replace( ':all:', '' ) ),
- n.copyNonInternalCssClasses(
- t[ 0 ],
- this.$element[ 0 ]
- ) ),
- t.addClass( e ),
- t
- );
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/dropdown/tagsSearchHighlight',
- [ '../utils' ],
- function ( s ) {
- function e() {}
- return (
- ( e.prototype.highlightFirstItem = function ( e ) {
- var t = this.$results.find(
- '.select2-results__option--selectable:not(.select2-results__option--selected)'
- );
- if ( 0 < t.length ) {
- var n = t.first(),
- t = s.GetData( n[ 0 ], 'data' ).element;
- if (
- t &&
- t.getAttribute &&
- 'true' ===
- t.getAttribute( 'data-select2-tag' )
- )
- return void n.trigger( 'mouseenter' );
- }
- e.call( this );
- } ),
- e
- );
- }
- ),
- u.define( 'select2/i18n/en', [], function () {
- return {
- errorLoading: function () {
- return 'The results could not be loaded.';
- },
- inputTooLong: function ( e ) {
- var t = e.input.length - e.maximum,
- e = 'Please delete ' + t + ' character';
- return 1 != t && ( e += 's' ), e;
- },
- inputTooShort: function ( e ) {
- return (
- 'Please enter ' +
- ( e.minimum - e.input.length ) +
- ' or more characters'
- );
- },
- loadingMore: function () {
- return 'Loading more results…';
- },
- maximumSelected: function ( e ) {
- var t = 'You can only select ' + e.maximum + ' item';
- return 1 != e.maximum && ( t += 's' ), t;
- },
- noResults: function () {
- return 'No results found';
- },
- searching: function () {
- return 'Searching…';
- },
- removeAllItems: function () {
- return 'Remove all items';
- },
- removeItem: function () {
- return 'Remove item';
- },
- search: function () {
- return 'Search';
- },
- };
- } ),
- u.define(
- 'select2/defaults',
- [
- 'jquery',
- './results',
- './selection/single',
- './selection/multiple',
- './selection/placeholder',
- './selection/allowClear',
- './selection/search',
- './selection/selectionCss',
- './selection/eventRelay',
- './utils',
- './translation',
- './diacritics',
- './data/select',
- './data/array',
- './data/ajax',
- './data/tags',
- './data/tokenizer',
- './data/minimumInputLength',
- './data/maximumInputLength',
- './data/maximumSelectionLength',
- './dropdown',
- './dropdown/search',
- './dropdown/hidePlaceholder',
- './dropdown/infiniteScroll',
- './dropdown/attachBody',
- './dropdown/minimumResultsForSearch',
- './dropdown/selectOnClose',
- './dropdown/closeOnSelect',
- './dropdown/dropdownCss',
- './dropdown/tagsSearchHighlight',
- './i18n/en',
- ],
- function (
- l,
- o,
- r,
- a,
- c,
- u,
- d,
- p,
- h,
- f,
- g,
- t,
- m,
- v,
- y,
- _,
- b,
- w,
- $,
- x,
- A,
- D,
- S,
- O,
- L,
- E,
- C,
- T,
- q,
- I,
- e
- ) {
- function n() {
- this.reset();
- }
- return (
- ( n.prototype.apply = function ( e ) {
- var t;
- null ==
- ( e = l.extend( ! 0, {}, this.defaults, e ) )
- .dataAdapter &&
- ( null != e.ajax
- ? ( e.dataAdapter = y )
- : null != e.data
- ? ( e.dataAdapter = v )
- : ( e.dataAdapter = m ),
- 0 < e.minimumInputLength &&
- ( e.dataAdapter = f.Decorate(
- e.dataAdapter,
- w
- ) ),
- 0 < e.maximumInputLength &&
- ( e.dataAdapter = f.Decorate(
- e.dataAdapter,
- $
- ) ),
- 0 < e.maximumSelectionLength &&
- ( e.dataAdapter = f.Decorate(
- e.dataAdapter,
- x
- ) ),
- e.tags &&
- ( e.dataAdapter = f.Decorate(
- e.dataAdapter,
- _
- ) ),
- ( null == e.tokenSeparators &&
- null == e.tokenizer ) ||
- ( e.dataAdapter = f.Decorate(
- e.dataAdapter,
- b
- ) ) ),
- null == e.resultsAdapter &&
- ( ( e.resultsAdapter = o ),
- null != e.ajax &&
- ( e.resultsAdapter = f.Decorate(
- e.resultsAdapter,
- O
- ) ),
- null != e.placeholder &&
- ( e.resultsAdapter = f.Decorate(
- e.resultsAdapter,
- S
- ) ),
- e.selectOnClose &&
- ( e.resultsAdapter = f.Decorate(
- e.resultsAdapter,
- C
- ) ),
- e.tags &&
- ( e.resultsAdapter = f.Decorate(
- e.resultsAdapter,
- I
- ) ) ),
- null == e.dropdownAdapter &&
- ( e.multiple
- ? ( e.dropdownAdapter = A )
- : ( ( t = f.Decorate( A, D ) ),
- ( e.dropdownAdapter = t ) ),
- 0 !== e.minimumResultsForSearch &&
- ( e.dropdownAdapter = f.Decorate(
- e.dropdownAdapter,
- E
- ) ),
- e.closeOnSelect &&
- ( e.dropdownAdapter = f.Decorate(
- e.dropdownAdapter,
- T
- ) ),
- null != e.dropdownCssClass &&
- ( e.dropdownAdapter = f.Decorate(
- e.dropdownAdapter,
- q
- ) ),
- ( e.dropdownAdapter = f.Decorate(
- e.dropdownAdapter,
- L
- ) ) ),
- null == e.selectionAdapter &&
- ( e.multiple
- ? ( e.selectionAdapter = a )
- : ( e.selectionAdapter = r ),
- null != e.placeholder &&
- ( e.selectionAdapter = f.Decorate(
- e.selectionAdapter,
- c
- ) ),
- e.allowClear &&
- ( e.selectionAdapter = f.Decorate(
- e.selectionAdapter,
- u
- ) ),
- e.multiple &&
- ( e.selectionAdapter = f.Decorate(
- e.selectionAdapter,
- d
- ) ),
- null != e.selectionCssClass &&
- ( e.selectionAdapter = f.Decorate(
- e.selectionAdapter,
- p
- ) ),
- ( e.selectionAdapter = f.Decorate(
- e.selectionAdapter,
- h
- ) ) ),
- ( e.language = this._resolveLanguage(
- e.language
- ) ),
- e.language.push( 'en' );
- for (
- var n = [], s = 0;
- s < e.language.length;
- s++
- ) {
- var i = e.language[ s ];
- -1 === n.indexOf( i ) && n.push( i );
- }
- return (
- ( e.language = n ),
- ( e.translations = this._processTranslations(
- e.language,
- e.debug
- ) ),
- e
- );
- } ),
- ( n.prototype.reset = function () {
- function a( e ) {
- return e.replace(
- /[^\u0000-\u007E]/g,
- function ( e ) {
- return t[ e ] || e;
- }
- );
- }
- this.defaults = {
- amdLanguageBase: './i18n/',
- autocomplete: 'off',
- closeOnSelect: ! 0,
- debug: ! 1,
- dropdownAutoWidth: ! 1,
- escapeMarkup: f.escapeMarkup,
- language: {},
- matcher: function e( t, n ) {
- if (
- null == t.term ||
- '' === t.term.trim()
- )
- return n;
- if ( n.children && 0 < n.children.length ) {
- for (
- var s = l.extend( ! 0, {}, n ),
- i = n.children.length - 1;
- 0 <= i;
- i--
- )
- null == e( t, n.children[ i ] ) &&
- s.children.splice( i, 1 );
- return 0 < s.children.length
- ? s
- : e( t, s );
- }
- var o = a( n.text ).toUpperCase(),
- r = a( t.term ).toUpperCase();
- return -1 < o.indexOf( r ) ? n : null;
- },
- minimumInputLength: 0,
- maximumInputLength: 0,
- maximumSelectionLength: 0,
- minimumResultsForSearch: 0,
- selectOnClose: ! 1,
- scrollAfterSelect: ! 1,
- sorter: function ( e ) {
- return e;
- },
- templateResult: function ( e ) {
- return e.text;
- },
- templateSelection: function ( e ) {
- return e.text;
- },
- theme: 'default',
- width: 'resolve',
- };
- } ),
- ( n.prototype.applyFromElement = function ( e, t ) {
- var n = e.language,
- s = this.defaults.language,
- i = t.prop( 'lang' ),
- t = t.closest( '[lang]' ).prop( 'lang' ),
- t = Array.prototype.concat.call(
- this._resolveLanguage( i ),
- this._resolveLanguage( n ),
- this._resolveLanguage( s ),
- this._resolveLanguage( t )
- );
- return ( e.language = t ), e;
- } ),
- ( n.prototype._resolveLanguage = function ( e ) {
- if ( ! e ) return [];
- if ( l.isEmptyObject( e ) ) return [];
- if ( l.isPlainObject( e ) ) return [ e ];
- for (
- var t,
- n = Array.isArray( e ) ? e : [ e ],
- s = [],
- i = 0;
- i < n.length;
- i++
- )
- s.push( n[ i ] ),
- 'string' == typeof n[ i ] &&
- 0 < n[ i ].indexOf( '-' ) &&
- ( ( t = n[ i ].split( '-' )[ 0 ] ),
- s.push( t ) );
- return s;
- } ),
- ( n.prototype._processTranslations = function ( e, t ) {
- for ( var n = new g(), s = 0; s < e.length; s++ ) {
- var i = new g(),
- o = e[ s ];
- if ( 'string' == typeof o )
- try {
- i = g.loadPath( o );
- } catch ( e ) {
- try {
- ( o =
- this.defaults.amdLanguageBase +
- o ),
- ( i = g.loadPath( o ) );
- } catch ( e ) {
- t &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: The language file for "' +
- o +
- '" could not be automatically loaded. A fallback will be used instead.'
- );
- }
- }
- else i = l.isPlainObject( o ) ? new g( o ) : o;
- n.extend( i );
- }
- return n;
- } ),
- ( n.prototype.set = function ( e, t ) {
- var n = {};
- n[ l.camelCase( e ) ] = t;
- n = f._convertData( n );
- l.extend( ! 0, this.defaults, n );
- } ),
- new n()
- );
- }
- ),
- u.define(
- 'select2/options',
- [ 'jquery', './defaults', './utils' ],
- function ( c, n, u ) {
- function e( e, t ) {
- ( this.options = e ),
- null != t && this.fromElement( t ),
- null != t &&
- ( this.options = n.applyFromElement(
- this.options,
- t
- ) ),
- ( this.options = n.apply( this.options ) );
- }
- return (
- ( e.prototype.fromElement = function ( e ) {
- var t = [ 'select2' ];
- null == this.options.multiple &&
- ( this.options.multiple = e.prop(
- 'multiple'
- ) ),
- null == this.options.disabled &&
- ( this.options.disabled = e.prop(
- 'disabled'
- ) ),
- null == this.options.autocomplete &&
- e.prop( 'autocomplete' ) &&
- ( this.options.autocomplete = e.prop(
- 'autocomplete'
- ) ),
- null == this.options.dir &&
- ( e.prop( 'dir' )
- ? ( this.options.dir = e.prop( 'dir' ) )
- : e.closest( '[dir]' ).prop( 'dir' )
- ? ( this.options.dir = e
- .closest( '[dir]' )
- .prop( 'dir' ) )
- : ( this.options.dir = 'ltr' ) ),
- e.prop( 'disabled', this.options.disabled ),
- e.prop( 'multiple', this.options.multiple ),
- u.GetData( e[ 0 ], 'select2Tags' ) &&
- ( this.options.debug &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'
- ),
- u.StoreData(
- e[ 0 ],
- 'data',
- u.GetData( e[ 0 ], 'select2Tags' )
- ),
- u.StoreData( e[ 0 ], 'tags', ! 0 ) ),
- u.GetData( e[ 0 ], 'ajaxUrl' ) &&
- ( this.options.debug &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.'
- ),
- e.attr(
- 'ajax--url',
- u.GetData( e[ 0 ], 'ajaxUrl' )
- ),
- u.StoreData(
- e[ 0 ],
- 'ajax-Url',
- u.GetData( e[ 0 ], 'ajaxUrl' )
- ) );
- var n = {};
- function s( e, t ) {
- return t.toUpperCase();
- }
- for (
- var i = 0;
- i < e[ 0 ].attributes.length;
- i++
- ) {
- var o = e[ 0 ].attributes[ i ].name,
- r = 'data-';
- o.substr( 0, r.length ) == r &&
- ( ( o = o.substring( r.length ) ),
- ( r = u.GetData( e[ 0 ], o ) ),
- ( n[ o.replace( /-([a-z])/g, s ) ] = r ) );
- }
- c.fn.jquery &&
- '1.' == c.fn.jquery.substr( 0, 2 ) &&
- e[ 0 ].dataset &&
- ( n = c.extend( ! 0, {}, e[ 0 ].dataset, n ) );
- var a,
- l = c.extend( ! 0, {}, u.GetData( e[ 0 ] ), n );
- for ( a in ( l = u._convertData( l ) ) )
- -1 < t.indexOf( a ) ||
- ( c.isPlainObject( this.options[ a ] )
- ? c.extend( this.options[ a ], l[ a ] )
- : ( this.options[ a ] = l[ a ] ) );
- return this;
- } ),
- ( e.prototype.get = function ( e ) {
- return this.options[ e ];
- } ),
- ( e.prototype.set = function ( e, t ) {
- this.options[ e ] = t;
- } ),
- e
- );
- }
- ),
- u.define(
- 'select2/core',
- [ 'jquery', './options', './utils', './keys' ],
- function ( t, i, o, s ) {
- var r = function ( e, t ) {
- null != o.GetData( e[ 0 ], 'select2' ) &&
- o.GetData( e[ 0 ], 'select2' ).destroy(),
- ( this.$element = e ),
- ( this.id = this._generateId( e ) ),
- ( t = t || {} ),
- ( this.options = new i( t, e ) ),
- r.__super__.constructor.call( this );
- var n = e.attr( 'tabindex' ) || 0;
- o.StoreData( e[ 0 ], 'old-tabindex', n ),
- e.attr( 'tabindex', '-1' );
- t = this.options.get( 'dataAdapter' );
- this.dataAdapter = new t( e, this.options );
- n = this.render();
- this._placeContainer( n );
- t = this.options.get( 'selectionAdapter' );
- ( this.selection = new t( e, this.options ) ),
- ( this.$selection = this.selection.render() ),
- this.selection.position( this.$selection, n );
- t = this.options.get( 'dropdownAdapter' );
- ( this.dropdown = new t( e, this.options ) ),
- ( this.$dropdown = this.dropdown.render() ),
- this.dropdown.position( this.$dropdown, n );
- n = this.options.get( 'resultsAdapter' );
- ( this.results = new n(
- e,
- this.options,
- this.dataAdapter
- ) ),
- ( this.$results = this.results.render() ),
- this.results.position(
- this.$results,
- this.$dropdown
- );
- var s = this;
- this._bindAdapters(),
- this._registerDomEvents(),
- this._registerDataEvents(),
- this._registerSelectionEvents(),
- this._registerDropdownEvents(),
- this._registerResultsEvents(),
- this._registerEvents(),
- this.dataAdapter.current( function ( e ) {
- s.trigger( 'selection:update', { data: e } );
- } ),
- e[ 0 ].classList.add( 'select2-hidden-accessible' ),
- e.attr( 'aria-hidden', 'true' ),
- this._syncAttributes(),
- o.StoreData( e[ 0 ], 'select2', this ),
- e.data( 'select2', this );
- };
- return (
- o.Extend( r, o.Observable ),
- ( r.prototype._generateId = function ( e ) {
- return (
- 'select2-' +
- ( null != e.attr( 'id' )
- ? e.attr( 'id' )
- : null != e.attr( 'name' )
- ? e.attr( 'name' ) +
- '-' +
- o.generateChars( 2 )
- : o.generateChars( 4 )
- ).replace( /(:|\.|\[|\]|,)/g, '' )
- );
- } ),
- ( r.prototype._placeContainer = function ( e ) {
- e.insertAfter( this.$element );
- var t = this._resolveWidth(
- this.$element,
- this.options.get( 'width' )
- );
- null != t && e.css( 'width', t );
- } ),
- ( r.prototype._resolveWidth = function ( e, t ) {
- var n = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
- if ( 'resolve' == t ) {
- var s = this._resolveWidth( e, 'style' );
- return null != s
- ? s
- : this._resolveWidth( e, 'element' );
- }
- if ( 'element' == t ) {
- s = e.outerWidth( ! 1 );
- return s <= 0 ? 'auto' : s + 'px';
- }
- if ( 'style' != t )
- return 'computedstyle' != t
- ? t
- : window.getComputedStyle( e[ 0 ] ).width;
- e = e.attr( 'style' );
- if ( 'string' != typeof e ) return null;
- for (
- var i = e.split( ';' ), o = 0, r = i.length;
- o < r;
- o += 1
- ) {
- var a = i[ o ].replace( /\s/g, '' ).match( n );
- if ( null !== a && 1 <= a.length )
- return a[ 1 ];
- }
- return null;
- } ),
- ( r.prototype._bindAdapters = function () {
- this.dataAdapter.bind( this, this.$container ),
- this.selection.bind( this, this.$container ),
- this.dropdown.bind( this, this.$container ),
- this.results.bind( this, this.$container );
- } ),
- ( r.prototype._registerDomEvents = function () {
- var t = this;
- this.$element.on( 'change.select2', function () {
- t.dataAdapter.current( function ( e ) {
- t.trigger( 'selection:update', {
- data: e,
- } );
- } );
- } ),
- this.$element.on(
- 'focus.select2',
- function ( e ) {
- t.trigger( 'focus', e );
- }
- ),
- ( this._syncA = o.bind(
- this._syncAttributes,
- this
- ) ),
- ( this._syncS = o.bind(
- this._syncSubtree,
- this
- ) ),
- ( this._observer = new window.MutationObserver(
- function ( e ) {
- t._syncA(), t._syncS( e );
- }
- ) ),
- this._observer.observe( this.$element[ 0 ], {
- attributes: ! 0,
- childList: ! 0,
- subtree: ! 1,
- } );
- } ),
- ( r.prototype._registerDataEvents = function () {
- var n = this;
- this.dataAdapter.on( '*', function ( e, t ) {
- n.trigger( e, t );
- } );
- } ),
- ( r.prototype._registerSelectionEvents = function () {
- var n = this,
- s = [ 'toggle', 'focus' ];
- this.selection.on( 'toggle', function () {
- n.toggleDropdown();
- } ),
- this.selection.on( 'focus', function ( e ) {
- n.focus( e );
- } ),
- this.selection.on( '*', function ( e, t ) {
- -1 === s.indexOf( e ) && n.trigger( e, t );
- } );
- } ),
- ( r.prototype._registerDropdownEvents = function () {
- var n = this;
- this.dropdown.on( '*', function ( e, t ) {
- n.trigger( e, t );
- } );
- } ),
- ( r.prototype._registerResultsEvents = function () {
- var n = this;
- this.results.on( '*', function ( e, t ) {
- n.trigger( e, t );
- } );
- } ),
- ( r.prototype._registerEvents = function () {
- var n = this;
- this.on( 'open', function () {
- n.$container[ 0 ].classList.add(
- 'select2-container--open'
- );
- } ),
- this.on( 'close', function () {
- n.$container[ 0 ].classList.remove(
- 'select2-container--open'
- );
- } ),
- this.on( 'enable', function () {
- n.$container[ 0 ].classList.remove(
- 'select2-container--disabled'
- );
- } ),
- this.on( 'disable', function () {
- n.$container[ 0 ].classList.add(
- 'select2-container--disabled'
- );
- } ),
- this.on( 'blur', function () {
- n.$container[ 0 ].classList.remove(
- 'select2-container--focus'
- );
- } ),
- this.on( 'query', function ( t ) {
- n.isOpen() || n.trigger( 'open', {} ),
- this.dataAdapter.query(
- t,
- function ( e ) {
- n.trigger( 'results:all', {
- data: e,
- query: t,
- } );
- }
- );
- } ),
- this.on( 'query:append', function ( t ) {
- this.dataAdapter.query( t, function ( e ) {
- n.trigger( 'results:append', {
- data: e,
- query: t,
- } );
- } );
- } ),
- this.on( 'keypress', function ( e ) {
- var t = e.which;
- n.isOpen()
- ? t === s.ESC ||
- ( t === s.UP && e.altKey )
- ? ( n.close( e ),
- e.preventDefault() )
- : t === s.ENTER || t === s.TAB
- ? ( n.trigger(
- 'results:select',
- {}
- ),
- e.preventDefault() )
- : t === s.SPACE && e.ctrlKey
- ? ( n.trigger(
- 'results:toggle',
- {}
- ),
- e.preventDefault() )
- : t === s.UP
- ? ( n.trigger(
- 'results:previous',
- {}
- ),
- e.preventDefault() )
- : t === s.DOWN &&
- ( n.trigger( 'results:next', {} ),
- e.preventDefault() )
- : ( t === s.ENTER ||
- t === s.SPACE ||
- ( t === s.DOWN &&
- e.altKey ) ) &&
- ( n.open(), e.preventDefault() );
- } );
- } ),
- ( r.prototype._syncAttributes = function () {
- this.options.set(
- 'disabled',
- this.$element.prop( 'disabled' )
- ),
- this.isDisabled()
- ? ( this.isOpen() && this.close(),
- this.trigger( 'disable', {} ) )
- : this.trigger( 'enable', {} );
- } ),
- ( r.prototype._isChangeMutation = function ( e ) {
- var t = this;
- if ( e.addedNodes && 0 < e.addedNodes.length ) {
- for ( var n = 0; n < e.addedNodes.length; n++ )
- if ( e.addedNodes[ n ].selected )
- return ! 0;
- } else {
- if (
- e.removedNodes &&
- 0 < e.removedNodes.length
- )
- return ! 0;
- if ( Array.isArray( e ) )
- return e.some( function ( e ) {
- return t._isChangeMutation( e );
- } );
- }
- return ! 1;
- } ),
- ( r.prototype._syncSubtree = function ( e ) {
- var e = this._isChangeMutation( e ),
- t = this;
- e &&
- this.dataAdapter.current( function ( e ) {
- t.trigger( 'selection:update', {
- data: e,
- } );
- } );
- } ),
- ( r.prototype.trigger = function ( e, t ) {
- var n = r.__super__.trigger,
- s = {
- open: 'opening',
- close: 'closing',
- select: 'selecting',
- unselect: 'unselecting',
- clear: 'clearing',
- };
- if ( ( void 0 === t && ( t = {} ), e in s ) ) {
- var i = s[ e ],
- s = { prevented: ! 1, name: e, args: t };
- if ( ( n.call( this, i, s ), s.prevented ) )
- return void ( t.prevented = ! 0 );
- }
- n.call( this, e, t );
- } ),
- ( r.prototype.toggleDropdown = function () {
- this.isDisabled() ||
- ( this.isOpen() ? this.close() : this.open() );
- } ),
- ( r.prototype.open = function () {
- this.isOpen() ||
- this.isDisabled() ||
- this.trigger( 'query', {} );
- } ),
- ( r.prototype.close = function ( e ) {
- this.isOpen() &&
- this.trigger( 'close', { originalEvent: e } );
- } ),
- ( r.prototype.isEnabled = function () {
- return ! this.isDisabled();
- } ),
- ( r.prototype.isDisabled = function () {
- return this.options.get( 'disabled' );
- } ),
- ( r.prototype.isOpen = function () {
- return this.$container[ 0 ].classList.contains(
- 'select2-container--open'
- );
- } ),
- ( r.prototype.hasFocus = function () {
- return this.$container[ 0 ].classList.contains(
- 'select2-container--focus'
- );
- } ),
- ( r.prototype.focus = function ( e ) {
- this.hasFocus() ||
- ( this.$container[ 0 ].classList.add(
- 'select2-container--focus'
- ),
- this.trigger( 'focus', {} ) );
- } ),
- ( r.prototype.enable = function ( e ) {
- this.options.get( 'debug' ) &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'
- ),
- ( null != e && 0 !== e.length ) ||
- ( e = [ ! 0 ] );
- e = ! e[ 0 ];
- this.$element.prop( 'disabled', e );
- } ),
- ( r.prototype.data = function () {
- this.options.get( 'debug' ) &&
- 0 < arguments.length &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.'
- );
- var t = [];
- return (
- this.dataAdapter.current( function ( e ) {
- t = e;
- } ),
- t
- );
- } ),
- ( r.prototype.val = function ( e ) {
- if (
- ( this.options.get( 'debug' ) &&
- window.console &&
- console.warn &&
- console.warn(
- 'Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'
- ),
- null == e || 0 === e.length )
- )
- return this.$element.val();
- e = e[ 0 ];
- Array.isArray( e ) &&
- ( e = e.map( function ( e ) {
- return e.toString();
- } ) ),
- this.$element
- .val( e )
- .trigger( 'input' )
- .trigger( 'change' );
- } ),
- ( r.prototype.destroy = function () {
- o.RemoveData( this.$container[ 0 ] ),
- this.$container.remove(),
- this._observer.disconnect(),
- ( this._observer = null ),
- ( this._syncA = null ),
- ( this._syncS = null ),
- this.$element.off( '.select2' ),
- this.$element.attr(
- 'tabindex',
- o.GetData(
- this.$element[ 0 ],
- 'old-tabindex'
- )
- ),
- this.$element[ 0 ].classList.remove(
- 'select2-hidden-accessible'
- ),
- this.$element.attr( 'aria-hidden', 'false' ),
- o.RemoveData( this.$element[ 0 ] ),
- this.$element.removeData( 'select2' ),
- this.dataAdapter.destroy(),
- this.selection.destroy(),
- this.dropdown.destroy(),
- this.results.destroy(),
- ( this.dataAdapter = null ),
- ( this.selection = null ),
- ( this.dropdown = null ),
- ( this.results = null );
- } ),
- ( r.prototype.render = function () {
- var e = t(
- '<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>'
- );
- return (
- e.attr( 'dir', this.options.get( 'dir' ) ),
- ( this.$container = e ),
- this.$container[ 0 ].classList.add(
- 'select2-container--' +
- this.options.get( 'theme' )
- ),
- o.StoreData( e[ 0 ], 'element', this.$element ),
- e
- );
- } ),
- r
- );
- }
- ),
- u.define( 'select2/dropdown/attachContainer', [], function () {
- function e( e, t, n ) {
- e.call( this, t, n );
- }
- return (
- ( e.prototype.position = function ( e, t, n ) {
- n.find( '.dropdown-wrapper' ).append( t ),
- t[ 0 ].classList.add( 'select2-dropdown--below' ),
- n[ 0 ].classList.add( 'select2-container--below' );
- } ),
- e
- );
- } ),
- u.define( 'select2/dropdown/stopPropagation', [], function () {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- e.call( this, t, n );
- this.$dropdown.on(
- [
- 'blur',
- 'change',
- 'click',
- 'dblclick',
- 'focus',
- 'focusin',
- 'focusout',
- 'input',
- 'keydown',
- 'keyup',
- 'keypress',
- 'mousedown',
- 'mouseenter',
- 'mouseleave',
- 'mousemove',
- 'mouseover',
- 'mouseup',
- 'search',
- 'touchend',
- 'touchstart',
- ].join( ' ' ),
- function ( e ) {
- e.stopPropagation();
- }
- );
- } ),
- e
- );
- } ),
- u.define( 'select2/selection/stopPropagation', [], function () {
- function e() {}
- return (
- ( e.prototype.bind = function ( e, t, n ) {
- e.call( this, t, n );
- this.$selection.on(
- [
- 'blur',
- 'change',
- 'click',
- 'dblclick',
- 'focus',
- 'focusin',
- 'focusout',
- 'input',
- 'keydown',
- 'keyup',
- 'keypress',
- 'mousedown',
- 'mouseenter',
- 'mouseleave',
- 'mousemove',
- 'mouseover',
- 'mouseup',
- 'search',
- 'touchend',
- 'touchstart',
- ].join( ' ' ),
- function ( e ) {
- e.stopPropagation();
- }
- );
- } ),
- e
- );
- } ),
- ( a = function ( u ) {
- var d,
- p,
- e = [
- 'wheel',
- 'mousewheel',
- 'DOMMouseScroll',
- 'MozMousePixelScroll',
- ],
- t =
- 'onwheel' in document || 9 <= document.documentMode
- ? [ 'wheel' ]
- : [
- 'mousewheel',
- 'DomMouseScroll',
- 'MozMousePixelScroll',
- ],
- h = Array.prototype.slice;
- if ( u.event.fixHooks )
- for ( var n = e.length; n; )
- u.event.fixHooks[ e[ --n ] ] = u.event.mouseHooks;
- var f = ( u.event.special.mousewheel = {
- version: '3.1.12',
- setup: function () {
- if ( this.addEventListener )
- for ( var e = t.length; e; )
- this.addEventListener( t[ --e ], s, ! 1 );
- else this.onmousewheel = s;
- u.data(
- this,
- 'mousewheel-line-height',
- f.getLineHeight( this )
- ),
- u.data(
- this,
- 'mousewheel-page-height',
- f.getPageHeight( this )
- );
- },
- teardown: function () {
- if ( this.removeEventListener )
- for ( var e = t.length; e; )
- this.removeEventListener( t[ --e ], s, ! 1 );
- else this.onmousewheel = null;
- u.removeData( this, 'mousewheel-line-height' ),
- u.removeData( this, 'mousewheel-page-height' );
- },
- getLineHeight: function ( e ) {
- var t = u( e ),
- e = t[
- 'offsetParent' in u.fn
- ? 'offsetParent'
- : 'parent'
- ]();
- return (
- e.length || ( e = u( 'body' ) ),
- parseInt( e.css( 'fontSize' ), 10 ) ||
- parseInt( t.css( 'fontSize' ), 10 ) ||
- 16
- );
- },
- getPageHeight: function ( e ) {
- return u( e ).height();
- },
- settings: { adjustOldDeltas: ! 0, normalizeOffset: ! 0 },
- } );
- function s( e ) {
- var t,
- n = e || window.event,
- s = h.call( arguments, 1 ),
- i = 0,
- o = 0,
- r = 0,
- a = 0,
- l = 0,
- c = 0;
- if (
- ( ( e = u.event.fix( n ) ),
- ( e.type = 'mousewheel' ),
- 'detail' in n && ( r = -1 * n.detail ),
- 'wheelDelta' in n && ( r = n.wheelDelta ),
- 'wheelDeltaY' in n && ( r = n.wheelDeltaY ),
- 'wheelDeltaX' in n && ( o = -1 * n.wheelDeltaX ),
- 'axis' in n &&
- n.axis === n.HORIZONTAL_AXIS &&
- ( ( o = -1 * r ), ( r = 0 ) ),
- ( i = 0 === r ? o : r ),
- 'deltaY' in n && ( i = r = -1 * n.deltaY ),
- 'deltaX' in n &&
- ( ( o = n.deltaX ), 0 === r && ( i = -1 * o ) ),
- 0 !== r || 0 !== o )
- )
- return (
- 1 === n.deltaMode
- ? ( ( i *= t = u.data(
- this,
- 'mousewheel-line-height'
- ) ),
- ( r *= t ),
- ( o *= t ) )
- : 2 === n.deltaMode &&
- ( ( i *= t = u.data(
- this,
- 'mousewheel-page-height'
- ) ),
- ( r *= t ),
- ( o *= t ) ),
- ( a = Math.max( Math.abs( r ), Math.abs( o ) ) ),
- ( ! p || a < p ) &&
- m( n, ( p = a ) ) &&
- ( p /= 40 ),
- m( n, a ) &&
- ( ( i /= 40 ), ( o /= 40 ), ( r /= 40 ) ),
- ( i = Math[ 1 <= i ? 'floor' : 'ceil' ]( i / p ) ),
- ( o = Math[ 1 <= o ? 'floor' : 'ceil' ]( o / p ) ),
- ( r = Math[ 1 <= r ? 'floor' : 'ceil' ]( r / p ) ),
- f.settings.normalizeOffset &&
- this.getBoundingClientRect &&
- ( ( a = this.getBoundingClientRect() ),
- ( l = e.clientX - a.left ),
- ( c = e.clientY - a.top ) ),
- ( e.deltaX = o ),
- ( e.deltaY = r ),
- ( e.deltaFactor = p ),
- ( e.offsetX = l ),
- ( e.offsetY = c ),
- ( e.deltaMode = 0 ),
- s.unshift( e, i, o, r ),
- d && clearTimeout( d ),
- ( d = setTimeout( g, 200 ) ),
- ( u.event.dispatch || u.event.handle ).apply(
- this,
- s
- )
- );
- }
- function g() {
- p = null;
- }
- function m( e, t ) {
- return (
- f.settings.adjustOldDeltas &&
- 'mousewheel' === e.type &&
- t % 120 == 0
- );
- }
- u.fn.extend( {
- mousewheel: function ( e ) {
- return e
- ? this.bind( 'mousewheel', e )
- : this.trigger( 'mousewheel' );
- },
- unmousewheel: function ( e ) {
- return this.unbind( 'mousewheel', e );
- },
- } );
- } ),
- 'function' == typeof u.define && u.define.amd
- ? u.define( 'jquery-mousewheel', [ 'jquery' ], a )
- : 'object' == typeof exports
- ? ( module.exports = a )
- : a( t ),
- u.define(
- 'jquery.select2',
- [
- 'jquery',
- 'jquery-mousewheel',
- './select2/core',
- './select2/defaults',
- './select2/utils',
- ],
- function ( i, e, o, t, r ) {
- var a;
- return (
- null == i.fn.select2 &&
- ( ( a = [ 'open', 'close', 'destroy' ] ),
- ( i.fn.select2 = function ( t ) {
- if ( 'object' == typeof ( t = t || {} ) )
- return (
- this.each( function () {
- var e = i.extend( ! 0, {}, t );
- new o( i( this ), e );
- } ),
- this
- );
- if ( 'string' != typeof t )
- throw new Error(
- 'Invalid arguments for Select2: ' + t
- );
- var n,
- s = Array.prototype.slice.call(
- arguments,
- 1
- );
- return (
- this.each( function () {
- var e = r.GetData( this, 'select2' );
- null == e &&
- window.console &&
- console.error &&
- console.error(
- "The select2('" +
- t +
- "') method was called on an element that is not using Select2."
- ),
- ( n = e[ t ].apply( e, s ) );
- } ),
- -1 < a.indexOf( t ) ? this : n
- );
- } ) ),
- null == i.fn.select2.defaults &&
- ( i.fn.select2.defaults = t ),
- o
- );
- }
- ),
- { define: u.define, require: u.require } );
- function b( e, t ) {
- return s.call( e, t );
- }
- function l( e, t ) {
- var n,
- s,
- i,
- o,
- r,
- a,
- l,
- c,
- u,
- d,
- p = t && t.split( '/' ),
- h = v.map,
- f = ( h && h[ '*' ] ) || {};
- if ( e ) {
- for (
- t = ( e = e.split( '/' ) ).length - 1,
- v.nodeIdCompat &&
- _.test( e[ t ] ) &&
- ( e[ t ] = e[ t ].replace( _, '' ) ),
- '.' === e[ 0 ].charAt( 0 ) &&
- p &&
- ( e = p.slice( 0, p.length - 1 ).concat( e ) ),
- c = 0;
- c < e.length;
- c++
- )
- '.' === ( d = e[ c ] )
- ? ( e.splice( c, 1 ), --c )
- : '..' === d &&
- ( 0 === c ||
- ( 1 === c && '..' === e[ 2 ] ) ||
- '..' === e[ c - 1 ] ||
- ( 0 < c && ( e.splice( c - 1, 2 ), ( c -= 2 ) ) ) );
- e = e.join( '/' );
- }
- if ( ( p || f ) && h ) {
- for ( c = ( n = e.split( '/' ) ).length; 0 < c; --c ) {
- if ( ( ( s = n.slice( 0, c ).join( '/' ) ), p ) )
- for ( u = p.length; 0 < u; --u )
- if (
- ( ( i = h[ p.slice( 0, u ).join( '/' ) ] ),
- ( i = i && i[ s ] ) )
- ) {
- ( o = i ), ( r = c );
- break;
- }
- if ( o ) break;
- ! a && f && f[ s ] && ( ( a = f[ s ] ), ( l = c ) );
- }
- ! o && a && ( ( o = a ), ( r = l ) ),
- o && ( n.splice( 0, r, o ), ( e = n.join( '/' ) ) );
- }
- return e;
- }
- function w( t, n ) {
- return function () {
- var e = i.call( arguments, 0 );
- return (
- 'string' != typeof e[ 0 ] && 1 === e.length && e.push( null ),
- r.apply( p, e.concat( [ t, n ] ) )
- );
- };
- }
- function x( e ) {
- var t;
- if (
- ( b( m, e ) &&
- ( ( t = m[ e ] ),
- delete m[ e ],
- ( y[ e ] = ! 0 ),
- o.apply( p, t ) ),
- ! b( g, e ) && ! b( y, e ) )
- )
- throw new Error( 'No ' + e );
- return g[ e ];
- }
- function c( e ) {
- var t,
- n = e ? e.indexOf( '!' ) : -1;
- return (
- -1 < n &&
- ( ( t = e.substring( 0, n ) ),
- ( e = e.substring( n + 1, e.length ) ) ),
- [ t, e ]
- );
- }
- function A( e ) {
- return e ? c( e ) : [];
- }
- var u = a.require( 'jquery.select2' );
- return ( t.fn.select2.amd = a ), u;
- } );
|